Rotations with the new SDK
2 posters
Rotations with the new SDK
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
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
new SIO2 version
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
Re: Rotations with the new SDK
To use your own matrix on an object simply call the object passing SIO2_TRANSFORM_MATRIX_NONE to the usematrix parameter.
Permissions in this forum:
You cannot reply to topics in this forum