On Sat, 20 Feb 1999, Justin Couch wrote:

> Ronnachai Chinowutthichai wrote:
> > 
> > hmm, I refer to "object" as runtime version of the "class" instance.
> > Anyway more to the point, I would specialize Vehicule from
> > either Group or TransformGroup. 
> 
> I would have to disagree about extending it from TransformGroup purely
> on the optomisation front.
> 

sure, that's what I meant when I said that it will probably -look- simpler
if vehicle extends from TransformGroup.

> Using a transform group means that, at the minimum one extra matrix
> calculation is required - on a non-optomised scenegraph. Now, most would
> argue that, when putting the vehicle in the scene, its probably going to
> have  a transform group above it anyway. Well, it will, but it is a
> matter of height. For example, I might want to leave the car at the
> center (no transform) and locate objects relative to it and then move
> the whole lot in one hit. The resulting structure would roughly be:
> 
>             tx
>   +----------+------ .... +
>   tx        tx (vehicle)
> +-+-+     +--+--+
>  object obj obj obj


By extending vehicle from TransformGroup wouldn't it be something like
this?

              BG
   +----------+------ .... +
   tx        tx (vehicle)
  +-+-+     +--+--+
  object  obj obj obj  

I mean generally you would want to move individual vehicle not the whole
group of vehicle. But then it's really depends of what Rajan wants to do
with it. My reason for using TransformGroup is based on the assumption
that you would want each vehicle to move independently, hence you wouldn't
need to have a transform group above it all the time. Like this..

              BG
   +----------+------ .... +
   tx         tx 
  +-+-+       +   
  object      G (vehicle)
          +---+---+
          obj obj obj
                       
rOnn c.

=====================================================================
To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
Java 3D Home Page: http://java.sun.com/products/java-media/3D/

Reply via email to