jPCT-AE - a 3d engine for Android > Support
newbie question, how to rotate around a designated axis in jPct ?
guillaume:
said I want to rotate a rectangle around a axis which is parallel to XAxis, how can I do this in jPCT,
can someone show me some code ? I am new to opengl and jPCT programming. thanks.
EgonOlsen:
Like so: http://www.jpct.net/jpct-ae/doc/com/threed/jpct/Object3D.html#rotateAxis(com.threed.jpct.SimpleVector, float)
guillaume:
http://www.jpct.net/jpct-ae/doc/com/threed/jpct/Object3D.html#rotateAxis(com.threed.jpct.SimpleVector, float)
if I use this api, how should I represent a axis (for example x=4) in vector form ? thanks.
EgonOlsen:
x=4 is no axis. I'm not sure what you are after...maybe setRotationPivot() is more what you want?
guillaume:
--- Quote from: EgonOlsen on December 12, 2011, 12:34:21 pm ---x=4 is no axis. I'm not sure what you are after...maybe setRotationPivot() is more what you want?
--- End quote ---
oh, I mean a line parallel to Y axis and pass through point (4,0,0). how can I rotate around this ?
Navigation
[0] Message Index
[#] Next page
Go to full version