Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Java 3D / August 2006

Tip: Looking for answers? Try searching our database.

rotX,totY,rotZ to transform a Cylinder

Thread view: 
Carste Marx - 25 Jul 2006 15:13 GMT
Hello,
for an expert in Java3D this might be an easy question. For me, novice,
it's driving me nuts...

Problem:

I have a StartPoint (sx,sy,sz) and a EndPoint (ex,ey,ez).
- I've created a Clylinder with some standard radius and the distance
between the two points as lenght.
- I've translated the Cylinder with Transform3D.setTranslation to the
right position.
- Now i want to rotate the Cylinder around the X,Y,Z axis to 'connect'
the two points withe the Cylinder.
For this rotation i need the angles to rotate and the way how (and in
which order) i must apply the rotations and translations....

Anybody out there whi has done this? Is not well documentated...

Please help me!!!

Thanks and best regards....

Carsten
MWKoenig - 29 Jul 2006 11:09 GMT
try this

every rot to have one transform3d

Transform3D myRotX = new Transform3D()
myRotX.rotZ = 15;

Transform3D myRotY = new Transform3D()
myRotX.rotZ = 15;

Transform3D myRotZ = new Transform3D()
myRotX.rotZ = 15;

Transform3D rotAll = new Transform3D()

rotAll.mul(myRotX);
rotAll.mul(myRotY);
rotAll.mul(myRotZ);

myTransfomGroup.setTranslation(rotAll)

Carste Marx schrieb:
> Hello,
> for an expert in Java3D this might be an easy question. For me, novice,
[quoted text clipped - 19 lines]
>
> Carsten
Gilbert Mirenque - 02 Aug 2006 09:03 GMT
> Transform3D myRotX = new Transform3D()
> myRotX.rotZ = 15;
[quoted text clipped - 4 lines]
> Transform3D myRotZ = new Transform3D()
> myRotX.rotZ = 15;

This seems to be a copy & paste error, isn't it? I have the same problem
like Carste so it would be very nice if you try it one more time
MWKoenig ;) And from where do you get the number 15 - what does it
express? And why do you rotate rotZ in myRotX?

greetz
G.M.
MWKoenig - 02 Aug 2006 19:13 GMT
sorry there was a wrong mistake. and copy paste.....

Transform3D myRotX = new Transform3D()
myRotX.rotX(15);
// 15 is a example for a angle in radian
// for degress // myRotX.rotZ(Math.toDegrees(15));

Transform3D myRotY = new Transform3D()
myRotY.rotY(15);

Transform3D myRotZ = new Transform3D()
myRotZ.rotZ(15);

Transform3D rotAll = new Transform3D()

rotAll.mul(myRotX);
rotAll.mul(myRotY);
rotAll.mul(myRotZ);

// with possible positions still

myTransform3Dpositions.mul(rotAll);

// without position       myTransfomGroup.setTranslation(rotAll)

myTransfomGroup.setTranslation(myTransform3Dpositions);

(i hope it is better.

sorry my english ist bad )

Gilbert Mirenque schrieb:
>> Transform3D myRotX = new Transform3D()
>> myRotX.rotZ = 15;
[quoted text clipped - 12 lines]
> greetz
> G.M.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.