LWJGL
May 18, 2013, 17:00:59
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
LWJGL 2.9.0 released!
Home
Help
Search
Login
Register
LWJGL
>
Programming
>
Bug Reports / RFE
>
[BUG] in Matrix4f.translate
Pages: [
1
]
« previous
next »
Print
Author
Topic: [BUG] in Matrix4f.translate (Read 1242 times)
mattssp
Newbie
Posts: 1
[BUG] in Matrix4f.translate
«
on:
March 12, 2011, 12:08:07 »
Hi,
if I'm not totally wrong, translate should load dest with the values from src first.
/**
566 * Translate the source matrix and stash the result in the destination matrix
567 * @param vec The vector to translate by
568 * @param src The source matrix
569 * @param dest The destination matrix or null if a new matrix is to be created
570 * @return The translated matrix
571 */
572 public static Matrix4f translate(Vector3f vec, Matrix4f src, Matrix4f dest) {
573 if (dest == null)
574 dest = new Matrix4f();
575
576 dest.m30 += src.m00 * vec.x + src.m10 * vec.y + src.m20 * vec.z;
577 dest.m31 += src.m01 * vec.x + src.m11 * vec.y + src.m21 * vec.z;
578 dest.m32 += src.m02 * vec.x + src.m12 * vec.y + src.m22 * vec.z;
579 dest.m33 += src.m03 * vec.x + src.m13 * vec.y + src.m23 * vec.z;
580
581 return dest;
582 }
Regards,
Matthias
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Programming
-----------------------------
=> Lightweight Java Library Game Development
=> LWJGL Documentation
=> Bug Reports / RFE
=> OpenGL
=> OpenAL
=> General Java Game Development
-----------------------------
Archive
-----------------------------
=> Resolved Bugs/RFE
=> DirectX
=> DevIL
=> FMOD
Loading...