QUESTION ABOUT JAVA3D

Hello,

I have a question about java 3d.

This is my first time i work with j3d so my question is probably a peace of cake for you.

I've made a cylinder with help from the tutorial. But this cylinder stays vertical. I want to topple over this cylinder for 90 degrees.

With other words: i want a horizontally cylinder.

Can please someone help me!!

TnX JOJO

[402 byte] By [deejeejojoa] at [2007-10-2 21:48:56]
# 1

This an example how to rotate Cube over X and Y axes:

public BranchGroup createSceneGraph() {

BranchGroup rootGroup = new BranchGroup();

Transform3D xRotate = new Transform3D();

Transform3D yRotate = new Transform3D();

xRotate.rotX(Math.PI/2.0d);

yRotate.rotY(Math.PI/5.0d);

xRotate.mul(yRotate);

TransformGroup rotGroup = new TransformGroup(xRotate);

rotGroup.addChild(new ColorCube(0.4));

rootGroup.addChild(rotGroup);

return rootGroup;

}

The more detailed information is on:

http://java.sun.com/developer/onlineTraining/java3d/

raindropa at 2007-7-14 1:04:40 > top of Java-index,Security,Cryptography...
# 2

If you're going to be working with java 3D, it's definitely worth your while to learn about Transform3D (actually, this is pretty well a MUST). And it's probably also worth while to learn about matrix transformations for translations, rotations, scaling, and shears, as well as learning about quaternions for rotations.

you should try googling for 3D Matrix Transformations, and for Quaternions.

- Adam

guitar_man_Fa at 2007-7-14 1:04:40 > top of Java-index,Security,Cryptography...
# 3
or, you can write your own transforms.thanks
geomana at 2007-7-14 1:04:40 > top of Java-index,Security,Cryptography...