If I use this code
invoke glpushmatrix
invoke glloadidentity
invoke glrotatef,30,0,1,0
invoke gltranslatef,0,0,0
invoke glGetFloatv,Matrix_arr
invoke glpopmatrix
On which cell on the Matrix_arr the position is stored?
That would be the sum of each column:
x = M11 + M21 + M31 + M41
y = M12 + M22 + M32 + M42
z = M13 + M23 + M33 + M43
If I understand your question correctly.
Quote from: Damos on August 07, 2009, 07:07:36 AM
That would be the sum of each column:
x = M11 + M21 + M31 + M41
y = M12 + M22 + M32 + M42
z = M13 + M23 + M33 + M43
If I understand your question correctly.
How is the matrix stored?
m11 m12 m13 m14
m21 m22 m23 m24
m31 m32 m33 m34
..
or
m11 m21 m31 ..
m12 m22 m32 .
m13 m23 m33 ..
m14 m24 m34 ..
In OpenGL matrices are column-major 4x4,like this:
m0 m4 m8 m12
m1 m5 m9 m13
m2 m6 m10 m14
m3 m7 m11 m15
@Farabi
if you can buy this book
http://www.opengl.org/documentation/red_book/
it was helpful to me when I was interested in opengl,
and all examples are in C so it is easly ported to masm...
Quote from: dancho on August 07, 2009, 03:11:36 PM
In OpenGL matrices are column-major 4x4,like this:
m0 m4 m8 m12
m1 m5 m9 m13
m2 m6 m10 m14
m3 m7 m11 m15
@Farabi
if you can buy this book
http://www.opengl.org/documentation/red_book/
it help me greatly when I was interested in opengl,
and all examples are in C so it is easly ported to masm...
Too expensive for me.
Does the matrices is mean like this?
m11 m21 m31 ..
m12 m22 m32 .
m13 m23 m33 ..
m14 m24 m34 ..
?
Yes,
there is a link for the free copy of the Redbook ( opengl 1.1 ) html format
at the page I posted...
Im stuck, I dont understand how to calculate the matrices, I uploaded my source.
Take a look at the Mocap.inc on fBVHCalculatePosition function. The fBVHCalculatePosition purpose is to calculate the real position of each node.
Any help would be appreaciated
[attachment deleted by admin]
There is a PDF copy of the redbook at http://www.4shared.com/file/7630450/5c8c4fd/redbook.html