Robert Gomez-Reino wrote:
Could anybody send me the source code of a very simple 3D class?
Something like the ColorCube class.  I'm a beginer but I need to learn
quickly how to create my own geometries and appeareances.

Hi, the source for ColorCube is in the java-utils-src.jar so you can look there.

To create a geometry you need to fill a float array with vertex coord,
then create some kind of geometryArray passing in the array.

float[] coord = new float[SIZE];
//fill the coords
TriangleArray ta = new TriangleArray(SIZE/3, GeometryArray.COORDINATES);
Shape3d s = new Shape3d(ta);

For complex geometries it's better to use some 3d editor (ex. 3dstudio),
and then load the model with a loader.

You can find a lot of info in the java3d tutorial

http://java.sun.com/products/java-media/3D/collateral/


Bye



Lorenzo


===========================================================================
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".

Reply via email to