Hi Steven:

Translation in Crystal Space is handled with the function 
csTransform::Translate().  So, for example, if you wanted to apply a 
translation along the x axis to the code you previously showed, you 
could do:

// the camera...
iCamera* c = view->GetCamera();

// the translation vector
csVector3 tr = csVector3(0,-5,0);

// the rotation matrix
csMatrix3 rot = (csXRotMatrix3(rotX) * csYRotMatrix3(rotY));

// the camera position
csVector3 cam_pos = c->GetTransform().GetOrigin();


// do the transformation
csOrthoTransform ot(rot, cam_pos);
csOrthoTransform.Translate(tr);
c->SetTransform(ot);


~Scott

Thus Spoke Steven Truppe:
> ps: i'm from the opengl land, so this is normaly just glTranslatef() in 
> combination with glRotatef().
>
>
> best regards,
> Steven Truppe
>
> ------------------------------------------------------------------------------
> Stay on top of everything new and different, both inside and 
> around Java (TM) technology - register by April 22, and save
> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
> 300 plus technical and hands-on sessions. Register today. 
> Use priority code J9JMT32. http://p.sf.net/sfu/p
> _______________________________________________
> Crystal-main mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/crystal-main
> Unsubscribe: 
> mailto:[email protected]?subject=unsubscribe
>   

------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
Crystal-main mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/crystal-main
Unsubscribe: 
mailto:[email protected]?subject=unsubscribe

Reply via email to