Maybe i'll have to clarify one point.
I want to create my own Primitive "Classes" and not "Objects".
I want to create a new class let's say called "Vehicule" which is a
specific group of shapes, whose size and positions are parametrized.
What's the best to do?
Should vehicule extend Group?
Should it Extend Transform group?
or Should It extend Shape3d?
(Note that Vehicule is a complex shape and thus can't be just one simple
Quad Array or Triangular array)
I hope this illustration makes my question clearer.
Cheers,
-----Original Message-----
From: Ronnachai Chinowutthichai [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 19, 1999 6:53 AM
To: Rayan Jreije
Cc: Java 3D Interest Group (E-mail)
Subject: Re: [java3d] Creating my Own Primitives
I'm not very good at explaining this but I'll give it a shot.
Firstly, Primitive class is a com.sun extension, it is not part of Java3D
core api. You can create your own primitives by creating your own Shape3D
object and group them together. (ie. a cylinder is made up of top, bottom
and the side). To create a Shape3D object you will have to use one of the
GoemetryArray classes to specify all vertices and other info. So really,
you can create any type of primitives you want.
About the TransformGroup and Group, I'm not sure why but it's probably a
cleaner implementation for such utility class.
hope that helps,
rOnn c.
On Thu, 18 Feb 1999, Rayan Jreije wrote:
> Hi All-
> I am trying to create my own primitives to be used in java 3D.
> I looked at the primitives provided in the utils package,
> And they don't have enough functionality. I feel they are just there for
> compliance reasons and ease of use for people who are used to VRML.
> They are not extendable because they were coded in a way
> just to fit the needs of the five possible primitives needed (Box,
Cylinder,
> sphere...)
>
> Can anybody tell me why primitive extends Group and not Transform group?
> If anyway it will be used in a scenegraph with a Transform Group, why not
> letting it extend transform Group immediately? is it because of storage
> optimisation reasons or there are other concerns here?
>
> Does the primitive package now ship with java 3D or it is justa n addition
> that is not an essential part of Java3D?
> Thanks for replying..
> Cheers,
>
>
> Rayan Jreije (Ms Eng)
> Consolidated Contractors Int'l Company
> Kiffisias 62B, Amaroussion 15110
> Athens, Greece
> Tel +30-16 182 132
> Fax +30-16 182 199
> Cell +30-932-415158
>
>
> =====================================================================
> To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
> Java 3D Home Page: http://java.sun.com/products/java-media/3D/
>
=====================================================================
To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
Java 3D Home Page: http://java.sun.com/products/java-media/3D/