I don’t really need to move the objects actually I’m just creating a fixed object (with orbitbehavior) which is comprised of say 200 smaller objects (eg Cube) To position each of the Cubes which make up the overall object I am putting each within a TransformGroup and using the translation method. That gives me 200 TransformGroups.

 

If I nest them in another transform group for rotation that gives me 400 total transformGroups… seems a tad excessive and I’m sure it’ll hit performance.

 

Is there any other (more efficient/faster) way I can do this without using hundreds of transformGroups??

 

Regards,

Spencer

 

-----Original Message-----
From: Discussion list for Java 3D API [mailto:[EMAIL PROTECTED]] On Behalf Of Kevin Williams
Sent:
29 August 2001 19:29
To: [EMAIL PROTECTED]
Subject: Re: [JAVA3D] Rotation Matrix

 

Use 2 transforms, one to translate and one to do the rotation.  Then you can use the rotX, rotY, rotZ. Also every time you move the object, you don't have to also rotate it (the rotation stays the same).

 

Kevin

 

 

 

 

-----Original Message-----
From: Discussion list for Java 3D API [mailto:[EMAIL PROTECTED]]On Behalf Of Spencer Goh
Sent:
Wednesday, August 29, 2001 10:54 AM
To: [EMAIL PROTECTED]
Subject: [JAVA3D] Rotation Matrix

Could anyone point me to a website which explains the matrix transforms for rotations. I need to do various rotations about a point, not necessarily the origin.  At the moment I’m computing them by hand using standard trig equations but I’m certain there is a nice neat was of putting it all into a Matrix but I just can’t remember how (Rusty on the old matrix maths !  J

 

transform.setRotation(Matrix3f)

{ a1, a2, a3

  b1, b2, b3

  c1, c2, c3

}

 

if anyonen could tell me what I have to put in those fields.. eg.. to get a rotation about the X-axis by n degrees about the point by m(xx, yy, zz) etc etc  just the whole load of them..

 

As I said, I currently use a load of sines and cosines to calculate it myself.. but then I’m stuck cos I can’t use rotX rotY rotZ because the reset the other transforms and I can’t figure out how to use setRotation…

 

Any explainations of how to use the rotation matrix or pointers to web resources appreciated.

 

Thanks

Spencer Goh

 

~~~~~~~~~~~~~~~~~~~~~~~~
Postgraduate
Computer Science
University of Birmingham
07747 600 436
www.spencergoh.com

[EMAIL PROTECTED]

 

 

 

Reply via email to