Class Gitter

java.lang.Object
  |
  +--MineCore
        |
        +--Gitter

public class Gitter
extends MineCore

Handles grouping of objects to form a gitter of objects


Constructor Summary
Gitter()
          Default constructor.
 
Method Summary
 javax.media.j3d.BranchGroup 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
 void reset(javax.media.j3d.BranchGroup root)
           
 boolean set(javax.media.j3d.Group newGitter)
          Set the gitter
 void setGitter(int numElements, java.util.Hashtable texs)
           
 boolean setState(javax.media.j3d.BranchGroup root, javax.vecmath.Vector3f coordinate, int operator)
          sets the state on a gitter Node
 
Methods inherited from class MineCore
callLogicOnMouseEvent, createSceneGraph, getGitterSize, getNumOfMines, getSceneGraphRoot, init, loadBackground, loadBackgroundMusic, loadSounds, loadTextures, loadTextures, reset, resetChangeSize, run, setGitterSize, setMessageOff, setMessageOn, setMessageText, setNumOfMines, setTime
 
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.

Method Detail

setGitter

public void setGitter(int numElements,
                      java.util.Hashtable texs)
Parameters:
numElements - sets the the number of gitter elements, total elements in gitter is (numElements)^3.

reset

public void reset(javax.media.j3d.BranchGroup root)

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.BranchGroup 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