simbad.sim
Class StaticObject

java.lang.Object
  extended by simbad.sim.BaseObject
      extended by simbad.sim.StaticObject
Direct Known Subclasses:
BlockWorldObject

public class StaticObject
extends BaseObject

Base Object for all block world objects (box,wall,arch ...). All object which doesnt move.


Field Summary
protected  javax.media.j3d.Appearance appearance
          Appearance of the object.
protected  javax.media.j3d.Transform3D localToVworld
          The local to global transform.
protected  javax.media.j3d.Bounds transformedBounds
          Transformed bounds is the bound object in global coordinates.
 
Fields inherited from class simbad.sim.BaseObject
black, branchGroup, canBeTraversed, compilable, detachedFromSceneGraph, group, localBounds, material, rotation, rotationGroup, translation, translationGroup, white, world
 
Constructor Summary
StaticObject()
           
 
Method Summary
(package private)  void create3D()
          Create object's geometry.
protected  void createLocalToVworld()
          Create the definitive local to global transform .
protected  void createTransformedBounds()
          Create and pre Compute the transformed bound of the objects.
protected  javax.media.j3d.Bounds getTransformedBounds()
          Gets the bound of the object taking account of its current position.
protected  boolean intersect(javax.media.j3d.BoundingSphere bs)
          Returns true if the object intersect with the given bounding sphere.
 
Methods inherited from class simbad.sim.BaseObject
addChild, addChild, attach, compile, create3D, detach, getBounds, getCanBeTraversed, getGroup, getNode, getRotationTransform, getRotationTransformGroup, getTranslation, getTranslationTransform, getTranslationTransform, resetTransforms, rotateY, setBounds, setCanBeTraversed, setColor, setWorld, translateTo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

transformedBounds

protected javax.media.j3d.Bounds transformedBounds
Transformed bounds is the bound object in global coordinates.


localToVworld

protected javax.media.j3d.Transform3D localToVworld
The local to global transform.


appearance

protected javax.media.j3d.Appearance appearance
Appearance of the object.

Constructor Detail

StaticObject

public StaticObject()
Method Detail

create3D

void create3D()
Create object's geometry.


createTransformedBounds

protected void createTransformedBounds()
Create and pre Compute the transformed bound of the objects. Needs localtoVWorld.


getTransformedBounds

protected javax.media.j3d.Bounds getTransformedBounds()
Gets the bound of the object taking account of its current position.


createLocalToVworld

protected void createLocalToVworld()
Create the definitive local to global transform .


intersect

protected boolean intersect(javax.media.j3d.BoundingSphere bs)
Returns true if the object intersect with the given bounding sphere. This can be overriden.

Parameters:
bs - the boundingsphere to intersect with.