FORUM CLOSED, PLEASE REGISTER AT FORUM.SIO2INTERACTIVE.COM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Rotations with the new SDK

2 posters

Go down

Rotations with the new SDK Empty Rotations with the new SDK

Post  DumbGames Mon May 18, 2009 6:36 am

why does this code work with the new SDK

glPushMatrix();
{
glLoadIdentity();

glTranslatef( _SIO2object->_SIO2transform->loc->x,
_SIO2object->_SIO2transform->loc->y,
_SIO2object->_SIO2transform->loc->z );


glRotatef( _SIO2object->_SIO2transform->rot->z,
0.0f,
0.0f,
1.0f );

glRotatef( _SIO2object->_SIO2transform->rot->y,
0.0f,
1.0f,
0.0f );

glRotatef( _SIO2object->_SIO2transform->rot->x,
1.0f,
0.0f,
0.0f );

glRotatef(_SIO2object->relRot.z,
0.0f,
0.0f,
1.0f );

glRotatef( _SIO2object->relRot.y,
0.0f,
1.0f,
0.0f );

glRotatef( _SIO2object->relRot.x,
1.0f,
0.0f,
0.0f );

glRotatef(_SIO2object->rotFix,
0.0f,
0.0f,
1.0f );

// glRotatef(_SIO2object->pitchFix,
// 0.0f,
// 1.0f,
// 0.0f );


glScalef( _SIO2object->scl.x,
_SIO2object->scl.y,
_SIO2object->scl.z );

// glGetFloatv( GL_MODELVIEW_MATRIX, &_SIO2object->mat[0] );
}
glPopMatrix();

I apparently need to use the code...

_SIO2object->_SIO2transform->mat[ ];
sio2TransformRender( _SIO2object->_SIO2transform );

is there an easy way to do it? Can you describe the ->mat[] properties?

Also, it only works on static models... why?
Why do Static models render 100 times bigger than dynamic?

sorry for all the questions, but my programs don't run anymore with the new SDK

DumbGames

Posts : 16
Join date : 2008-12-03

Back to top Go down

Rotations with the new SDK Empty Re: Rotations with the new SDK

Post  sio2interactive Mon May 18, 2009 5:37 pm

there is a new sdk?
sio2interactive
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 45
Location : Shanghai

http://sio2interactive.com

Back to top Go down

Rotations with the new SDK Empty new SIO2 version

Post  DumbGames Mon May 18, 2009 9:43 pm

sorry, I meant new version of SIO2. the old code doesn't work, and it seems alot of the rotation function has been moved to sio2transform. why doesn't the above code work anymore? there was a typo... the above code, does NOT work anymore

DumbGames

Posts : 16
Join date : 2008-12-03

Back to top Go down

Rotations with the new SDK Empty Re: Rotations with the new SDK

Post  sio2interactive Tue May 19, 2009 1:57 pm

To use your own matrix on an object simply call the object passing SIO2_TRANSFORM_MATRIX_NONE to the usematrix parameter.
sio2interactive
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 45
Location : Shanghai

http://sio2interactive.com

Back to top Go down

Rotations with the new SDK Empty Re: Rotations with the new SDK

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum