On Thu, 3 Oct 2002, Sean Sylvis wrote: > > Are you storing position and orientation (such as three direction normals) of the >object? How do you get B? > > Sean
This is how A is determined inside the Vehcile Code: Transform3D A = new Transform3D(); Transform3D xRot = new Transform3D(); Transform3D yRot = new Transform3d(); Transform3D zRot = new Transform3d(); Vector3d position = new Vector3d(currentx, currenty, currentz); //set xyzRotations to roll pitch and heading zRot.rotZ(heading); xRot.rotX(pitch); yRot.rotY(roll); //apply heading, pitch, roll A.mul(A, zRot); A.mul(A, xRot); A.mul(A, yRot); //apply position A.setTranslation(position); Now A contains both the translation and orientation of our Vehicle. The code works in cycles. At the end of a cycle the object responsible for updating the camera orientation tries to do so. B is simply the A of the previous cycle that has been saved. Does this shed any light on the matter? Noah > > > > -----Original Message----- > > From: Noah J. Ternullo [mailto:[EMAIL PROTECTED]] > > Sent: Thursday, October 03, 2002 11:10 AM > > To: [EMAIL PROTECTED] > > Subject: [JAVA3D] How to take the difference between two > > Transform3d's.. > > > > > > Howdy! > > I have three Transform3ds (A,B,C). > > > > A = the previous position and orientation of an object > > B = the current position and orientation of an object > > C = the current positoin and orientation of the camera > > > > I want to take the difference between A and B (the change in > > orientation and position) and apply it to C. > > > > Seems like a simple enough set of operations but I'm having > > difficulty. Any help would be *greatly* appreciated. > > > > > > Noah > > > > ============================================================== > > ============= > > To unsubscribe, send email to [EMAIL PROTECTED] and > > include in the body > > of the message "signoff JAVA3D-INTEREST". For general help, > > send email to > > [EMAIL PROTECTED] and include in the body of the message "help". > > > =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
