org.xith3d.physics.collision
Class CollideableGroupBase

java.lang.Object
  extended by org.xith3d.physics.collision.CollideableBase
      extended by org.xith3d.physics.collision.CollideableGroupBase
All Implemented Interfaces:
org.jagatoo.datatypes.Enableable, org.jagatoo.datatypes.NamableObject, org.jagatoo.datatypes.NamedObject, Collideable, CollideableGroup, Placeable

public abstract class CollideableGroupBase
extends CollideableBase
implements CollideableGroup

Common parent (abstract class) for all CollideableGroup Objects.


Constructor Summary
CollideableGroupBase(CollisionEngine engine, CollideableGroupType type)
           
 
Method Summary
 void addCollideable(Collideable c)
          Adds a Collideable to the Group.
 Group getBaseGFX()
          
 Collideable getChild(int i)
          
 int getChildrenCount()
          
 Group getDebugGFX()
          
 CollideableGroupType getGroupType()
          
 java.lang.String getInfo()
          
 java.lang.String getType()
          
 void removeAllCollideables()
          Removes all collideables.
 void removeCollideable(Collideable c)
          Removes a Collideable from the Group.
 
Methods inherited from class org.xith3d.physics.collision.CollideableBase
applyWorldPosition, applyWorldRotation, getBody, getEngine, getName, getParent, getPosition, getPosition, getRotation, getRotation, getRotationMatrix, getRotationMatrix, getUserObject, getWorldPos, getWorldPos, getWorldRot, getWorldRot, getWorldRotMat, getWorldRotMat, recomputeChildrenWorldCoords, recomputeWorldCoords, recomputeWorldPos, recomputeWorldRotMat, setBody, setName, setParent, setPosition, setPosition, setPosition, setPositionX, setPositionY, setPositionZ, setRotation, setRotation, setRotation, setRotationMatrix, setRotationMatrix, setRotationX, setRotationY, setRotationZ, setUserObject, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.xith3d.physics.collision.Collideable
getBody, getEngine, getParent, getPosition, getPosition, getRotation, getRotation, getRotationMatrix, getRotationMatrix, getUserObject, getWorldPos, getWorldPos, getWorldRot, getWorldRot, getWorldRotMat, getWorldRotMat, isEnabled, recomputeChildrenWorldCoords, recomputeWorldCoords, setBody, setEnabled, setPosition, setPosition, setPositionX, setPositionY, setPositionZ, setRotation, setRotation, setRotationMatrix, setRotationX, setRotationY, setRotationZ, setUserObject
 
Methods inherited from interface org.jagatoo.datatypes.NamableObject
setName
 
Methods inherited from interface org.jagatoo.datatypes.NamedObject
getName
 

Constructor Detail

CollideableGroupBase

public CollideableGroupBase(CollisionEngine engine,
                            CollideableGroupType type)
Method Detail

getBaseGFX

public Group getBaseGFX()

Specified by:
getBaseGFX in interface Collideable
Returns:
a "base" GFX (can be used as a start, then the users adjusts himself e.g. the Material or even apply a deformation to the Shape) The only *rule* for this object is that it should extend org.xith3d.scenegraph.Node so that it can be added to the scenegraph. So it can be e.g. a Shape3D, a Group
See Also:
Collideable.getDebugGFX()

getDebugGFX

public Group getDebugGFX()

Specified by:
getDebugGFX in interface Collideable
Returns:
a "debug" GFX (probably wireframe, and maybe bounds displayed, and so on) The only *rule* for this object is that it should extend org.xith3d.scenegraph.Node so that it can be added to the scenegraph. So it can be e.g. a Shape3D, a Group
See Also:
Collideable.getBaseGFX()

getInfo

public final java.lang.String getInfo()

Specified by:
getInfo in interface Collideable
Returns:
a small description of how is this geom, its exact shape, a brief human-readable description of what can be adjusted

getGroupType

public final CollideableGroupType getGroupType()

Specified by:
getGroupType in interface CollideableGroup
Returns:
the CollideableGroupType of this CollideableGroup.

getType

public final java.lang.String getType()

Specified by:
getType in interface Collideable
Returns:
the name of the Geom, that is, the one which is used to refer to it in CollisionEngine. All camel-case, please ! (e.g. : "Sphere")

addCollideable

public void addCollideable(Collideable c)
Adds a Collideable to the Group.

Specified by:
addCollideable in interface CollideableGroup
Parameters:
c - the Collideable to add

removeCollideable

public void removeCollideable(Collideable c)
Removes a Collideable from the Group.

Specified by:
removeCollideable in interface CollideableGroup
Parameters:
c - the Collideable to remove

removeAllCollideables

public final void removeAllCollideables()
Removes all collideables.

Specified by:
removeAllCollideables in interface CollideableGroup

getChild

public final Collideable getChild(int i)

Specified by:
getChild in interface CollideableGroup
Returns:
the i-th Collideable from the Group.

getChildrenCount

public final int getChildrenCount()

Specified by:
getChildrenCount in interface CollideableGroup
Returns:
the count of all Collideables in the Group.