com.jmex.physics.geometry
Class PhysicsRay

java.lang.Object
  extended by com.jme.scene.Spatial
      extended by com.jmex.physics.PhysicsCollisionGeometry
          extended by com.jmex.physics.geometry.PhysicsRay
All Implemented Interfaces:
com.jme.util.export.Savable, PhysicsSpatial, java.io.Serializable

public abstract class PhysicsRay
extends PhysicsCollisionGeometry

Ray has a direction of (1,1,1) and starts at (0,0,0) - change direction via local scale and start via local translation.

Author:
Irrisor
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.jme.scene.Spatial
com.jme.scene.Spatial.CullHint, com.jme.scene.Spatial.LightCombineMode, com.jme.scene.Spatial.NormalsMode, com.jme.scene.Spatial.TextureCombineMode
 
Field Summary
 
Fields inherited from class com.jmex.physics.PhysicsCollisionGeometry
MATERIAL_PROPERTY, PHYSICS_NODE_PROPERTY
 
Fields inherited from class com.jme.scene.Spatial
cullHint, frustrumIntersects, geometricalControllers, isCollidable, lightCombineMode, localRotation, localScale, localTranslation, LOCKED_BOUNDS, LOCKED_BRANCH, LOCKED_MESH_DATA, LOCKED_NONE, LOCKED_SHADOWS, LOCKED_TRANSFORMS, lockedMode, name, normalsMode, parent, queueDistance, renderQueueMode, renderStateList, textureCombineMode, worldBound, worldRotation, worldScale, worldTranslation, zOrder
 
Constructor Summary
protected PhysicsRay(PhysicsNode node)
           
 
Method Summary
protected  void drawDebugShape(PhysicsNode physicsNode, com.jme.renderer.Renderer r)
          Draw a visual representation of this physical collision bound.
 java.lang.Class getClassTag()
           
 float getVolume()
          Query the volume of this geometry.
 
Methods inherited from class com.jmex.physics.PhysicsCollisionGeometry
draw, findCollisions, findPick, getCollisionEventHandler, getMaterial, getPhysicsNode, getTriangleCount, getVertexCount, hasCollision, read, readPhysicsNodeFromInputCapsule, setMaterial, setModelBound, setNode, setParent, updateModelBound, updateWorldBound, write
 
Methods inherited from class com.jme.scene.Spatial
addController, applyRenderState, calculateCollisions, calculatePick, clearControllers, clearRenderState, clearRenderState, getController, getControllerCount, getControllers, getCullHint, getLastFrustumIntersection, getLightCombineMode, getLocalCullHint, getLocalLightCombineMode, getLocalNormalsMode, getLocalRenderQueueMode, getLocalRotation, getLocalScale, getLocalTextureCombineMode, getLocalToWorldMatrix, getLocalTranslation, getLocks, getName, getNormalsMode, getParent, getRenderQueueMode, getRenderState, getRenderState, getTextureCombineMode, getUserData, getWorldBound, getWorldRotation, getWorldScale, getWorldTranslation, getZOrder, hasAncestor, isCollidable, localToWorld, lock, lock, lockBounds, lockBranch, lockMeshes, lockMeshes, lockShadows, lockTransforms, lookAt, onDraw, propagateBoundToRoot, propagateStatesFromRoot, removeController, removeController, removeFromParent, removeUserData, rotateUpTo, setCullHint, setIsCollidable, setLastFrustumIntersection, setLightCombineMode, setLocalRotation, setLocalRotation, setLocalScale, setLocalScale, setLocalTranslation, setLocalTranslation, setLocks, setLocks, setName, setNormalsMode, setRenderQueueMode, setRenderState, setTextureCombineMode, setUserData, setZOrder, setZOrder, sortLights, toString, unlock, unlock, unlockBounds, unlockBranch, unlockMeshes, unlockMeshes, unlockShadows, unlockTransforms, updateGeometricState, updateRenderState, updateRenderState, updateWorldData, updateWorldRotation, updateWorldScale, updateWorldTranslation, updateWorldVectors, updateWorldVectors, worldToLocal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PhysicsRay

protected PhysicsRay(PhysicsNode node)
Method Detail

drawDebugShape

protected void drawDebugShape(PhysicsNode physicsNode,
                              com.jme.renderer.Renderer r)
Description copied from class: PhysicsCollisionGeometry
Draw a visual representation of this physical collision bound.

Specified by:
drawDebugShape in class PhysicsCollisionGeometry
Parameters:
physicsNode - node this geometry belongs to
r - where to draw to

getVolume

public float getVolume()
Description copied from class: PhysicsCollisionGeometry
Query the volume of this geometry. Commonly used for mass calculation.

Specified by:
getVolume in class PhysicsCollisionGeometry
Returns:
the current value of this geometry

getClassTag

public java.lang.Class getClassTag()
Specified by:
getClassTag in interface com.jme.util.export.Savable
Overrides:
getClassTag in class com.jme.scene.Spatial