News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

On which cell it stored?

Started by Farabi, August 07, 2009, 05:40:53 AM

Previous topic - Next topic

Farabi

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?
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

Damos

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.
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction. - Albert Einstien

Farabi

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 ..
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

dancho

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...

Farabi

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 ..

?
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

dancho

Yes,
there is a link for the free copy of the Redbook ( opengl 1.1 ) html format
at the page I posted...

Farabi

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]
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"