We are constructing an application to construct machines in 3D. We would
like to make it possible to rotate each object around its own axis. The
problem is that the object is always rotating over the center point of the
scene instead of the center point of the object. Even if we translate the
object first to the center of the scene, rotate, and translate the object
back to its center point it's still doesn't work. The geometry is loaded
from a VRML file. So the position is stored in the geometry. Perhaps this is
the problem.

Included in this mail you find the PickRotateBehavior and the RotateBehavior
we use to rotate the objects.

The Point3d center you find in the RotateBehavior is the center point of the
object. <<PickRotateBehavior.java>>  <<RotateBehavior.java>> 


Does anyone have any sugestions to solve this problem???

---------------------------------------------------------------------
Jochen Vande Walle
Software Developer

QMatics
Bruggesteenweg 112
8830 Hooglede - België
---------------------------------------------------------------------
Tel.    +32 51 272 400
Fax.   +32 51 272 401
---------------------------------------------------------------------
mailto:[EMAIL PROTECTED]

PickRotateBehavior.java

RotateBehavior.java

Reply via email to