Class Gitter

java.lang.Object
  |
  +--Gitter

public class Gitter
extends java.lang.Object

Handles grouping of objects to form a gitter of objects


Constructor Summary
Gitter()
          Default constructor.
Gitter(int numElements)
          constructor.
Gitter(int numElements, int sizeElements)
          constructor.
 
Method Summary
 javax.media.j3d.Group get()
          Gets the gitter.
 javax.vecmath.Vector3f getOrigo()
          returns origo
 javax.media.j3d.Node getState(javax.media.j3d.BranchGroup root, javax.vecmath.Vector3f coordinate, int operator)
          gets the state on a gitter node
 double getUnityLength()
          returns abs of unity vector
 boolean set(javax.media.j3d.Group newGitter)
          Set the gitter
 boolean setState(javax.media.j3d.BranchGroup root, javax.vecmath.Vector3f coordinate, int operator)
          sets the state on a gitter Node
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Gitter

public Gitter()
Default constructor.


Gitter

public Gitter(int numElements)
constructor.

Parameters:
numElements - sets the number of gitter elements, total elements in gitter is (numElements)^3.

Gitter

public Gitter(int numElements,
              int sizeElements)
constructor.

Parameters:
numElements - sets the the number of gitter elements, total elements in gitter is (numElements)^3.
sizeElements - sets the size of gitter elements, default 0.4.
Method Detail

setState

public boolean setState(javax.media.j3d.BranchGroup root,
                        javax.vecmath.Vector3f coordinate,
                        int operator)
sets the state on a gitter Node

Parameters:
coordinate - identifies which element to work on.
operator - defines what task to be done This is how the scene looks like (BRG) root-> (TRG) transform -> generate Gitter (GROUP)--> |-> (TRG) children

getState

public javax.media.j3d.Node getState(javax.media.j3d.BranchGroup root,
                                     javax.vecmath.Vector3f coordinate,
                                     int operator)
gets the state on a gitter node

Parameters:
root - root of DAG tree
coordinate - which gitter node, specified in coordinate.
operator - what state is conserned if 0 it should return all states.

get

public javax.media.j3d.Group get()
Gets the gitter.


set

public boolean set(javax.media.j3d.Group newGitter)
Set the gitter


getOrigo

public javax.vecmath.Vector3f getOrigo()
returns origo


getUnityLength

public double getUnityLength()
returns abs of unity vector