Rotations with the new SDK

View previous topic View next topic Go down

Rotations with the new SDK

Post  DumbGames on 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

View user profile

Back to top Go down

Re: Rotations with the new SDK

Post  sio2interactive on Mon May 18, 2009 5:37 pm

there is a new sdk?

_________________
SIO2 Interactive
Free Open Source 3D Game Engine for iPhone and iPod Touch
http://sio2interactive.com
avatar
sio2interactive

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

View user profile http://sio2interactive.com

Back to top Go down

new SIO2 version

Post  DumbGames on 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

View user profile

Back to top Go down

Re: Rotations with the new SDK

Post  sio2interactive on 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.

_________________
SIO2 Interactive
Free Open Source 3D Game Engine for iPhone and iPod Touch
http://sio2interactive.com
avatar
sio2interactive

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

View user profile http://sio2interactive.com

Back to top Go down

Re: Rotations with the new SDK

Post  Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top


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