org.xith3d.physics.collision.collideable
Class RayCollideable

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

public abstract class RayCollideable
extends CollideableBase

A ray collideable.


Constructor Summary
RayCollideable(CollisionEngine eng, float originX, float originY, float originZ, float directionX, float directionY, float directionZ)
          Creates a new Box collideable.
RayCollideable(CollisionEngine eng, org.openmali.vecmath2.Tuple3f origin, org.openmali.vecmath2.Tuple3f direction)
          Creates a new Box collideable.
 
Method Summary
 Line getBaseGFX()
          
 Line getDebugGFX()
          
static Appearance getDefaultAppearance()
           
 org.openmali.vecmath2.Vector3f getDirection()
           
 org.openmali.vecmath2.Point3f getEnd()
           
 java.lang.String getInfo()
          
 float getLength()
           
 org.openmali.vecmath2.Point3f getOrigin()
           
 java.lang.String getType()
          
static void setDefaultAppearance(Appearance app)
           
static void setDefaultAppearance(org.openmali.vecmath2.Colorf color)
           
 void setDirection(float x, float y, float z)
          Changes the direction of this RayCollideable.
 void setDirection(org.openmali.vecmath2.Tuple3f direction)
          Changes the direction of this RayCollideable.
 void setLength(float length)
          Sets the ray's length.
 void setOrigin(float x, float y, float z)
          Changes the origin of this RayCollideable.
 void setOrigin(org.openmali.vecmath2.Tuple3f origin)
          Changes the origin of this RayCollideable.
 
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
isEnabled, setEnabled
 

Constructor Detail

RayCollideable

public RayCollideable(CollisionEngine eng,
                      float originX,
                      float originY,
                      float originZ,
                      float directionX,
                      float directionY,
                      float directionZ)
Creates a new Box collideable.

Parameters:
eng - the collision engine we belong to
originX -
originY -
originZ -
directionX -
directionY -
directionZ -

RayCollideable

public RayCollideable(CollisionEngine eng,
                      org.openmali.vecmath2.Tuple3f origin,
                      org.openmali.vecmath2.Tuple3f direction)
Creates a new Box collideable.

Parameters:
eng - the collision engine we belong to
origin -
direction -
Method Detail

setDefaultAppearance

public static void setDefaultAppearance(Appearance app)

setDefaultAppearance

public static void setDefaultAppearance(org.openmali.vecmath2.Colorf color)

getDefaultAppearance

public static Appearance getDefaultAppearance()

getInfo

public final java.lang.String getInfo()

Returns:
a small description of how is this geom, its exact shape, a brief human-readable description of what can be adjusted

getType

public final java.lang.String getType()

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")

getBaseGFX

public Line getBaseGFX()

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 Line getDebugGFX()

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()

setOrigin

public void setOrigin(float x,
                      float y,
                      float z)
Changes the origin of this RayCollideable.

Parameters:
x -
y -
z -

setOrigin

public final void setOrigin(org.openmali.vecmath2.Tuple3f origin)
Changes the origin of this RayCollideable.

Parameters:
origin -

getOrigin

public final org.openmali.vecmath2.Point3f getOrigin()
Returns:
the origin of this ray.

setDirection

public void setDirection(float x,
                         float y,
                         float z)
Changes the direction of this RayCollideable.

Parameters:
x -
y -
z -

setDirection

public final void setDirection(org.openmali.vecmath2.Tuple3f direction)
Changes the direction of this RayCollideable.

Parameters:
direction -

getDirection

public final org.openmali.vecmath2.Vector3f getDirection()
Returns:
the direction of this ray.

getEnd

public final org.openmali.vecmath2.Point3f getEnd()
Returns:
the end of this ray.

setLength

public void setLength(float length)
Sets the ray's length.

Parameters:
length -

getLength

public final float getLength()