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.