|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jme.scene.Spatial
com.jme.scene.Node
com.jmex.physics.PhysicsNode
com.jmex.physics.DynamicPhysicsNode
public abstract class DynamicPhysicsNode
This PhysicsNode represents a physical entity that can be subject to forces to move and/or rotate it.
PhysicsSpace.createDynamicNode() and
PhysicsSpace.createStaticNode()).
| 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 | |
|---|---|
static java.lang.String |
AFFECTED_BY_GRAVITY_PROPERTY
|
static java.lang.String |
ANGULAR_VELOCITY_PROPERTY
|
static java.lang.String |
CENTER_OF_MASS_PROPERTY
|
static java.lang.String |
JOINTS_PROPERTY
|
static java.lang.String |
LINEAR_VELOCITY_PROPERTY
|
static java.lang.String |
MASS_PROPERTY
|
| Fields inherited from class com.jmex.physics.PhysicsNode |
|---|
MATERIAL_PROPERTY |
| Fields inherited from class com.jme.scene.Node |
|---|
children |
| 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 |
DynamicPhysicsNode()
|
protected |
DynamicPhysicsNode(java.lang.String name)
|
| Method Summary | |
|---|---|
void |
addForce(com.jme.math.Vector3f force)
Add a force to be applied to this node (at the center of mass). |
abstract void |
addForce(com.jme.math.Vector3f force,
com.jme.math.Vector3f at)
Add a force to be applied to this node at a given relative location. |
abstract void |
addTorque(com.jme.math.Vector3f torque)
Add a torque to be applied to this node. |
void |
clearDynamics()
Resets all force, torque and velocities. |
abstract void |
clearForce()
Reset force on this node to 0. |
abstract void |
clearTorque()
Reset torque on this node to 0. |
abstract void |
computeMass()
Computes the mass for this node that would result from the attached geometries and their densities (materials). |
protected void |
drawDebugInfo(com.jme.renderer.Renderer renderer)
Draw information about the physical properties of the Node. |
abstract com.jme.math.Vector3f |
getAngularVelocity(com.jme.math.Vector3f store)
Query the angular velocity of this node. |
abstract com.jme.math.Vector3f |
getCenterOfMass(com.jme.math.Vector3f store)
Obtain the center of mass. |
java.lang.Class |
getClassTag()
|
abstract com.jme.math.Vector3f |
getForce(com.jme.math.Vector3f store)
Obtain the current force on this node. |
abstract com.jme.math.Vector3f |
getLinearVelocity(com.jme.math.Vector3f store)
Query the linear velocity of this node. |
abstract float |
getMass()
Query mass of this physical entity. |
abstract com.jme.math.Vector3f |
getTorque(com.jme.math.Vector3f store)
Obtain the current torque on this node. |
abstract boolean |
isAffectedByGravity()
|
boolean |
isStatic()
|
void |
read(com.jme.util.export.JMEImporter im)
|
abstract void |
rest()
This method may be called to tell the physics implementation that this node does not move by forces like gravity and other internal constantly applied forces currently. |
abstract void |
setAffectedByGravity(boolean value)
Switch gravity on/off for this single node. |
abstract void |
setAngularVelocity(com.jme.math.Vector3f velocity)
Sets the angular velocity of this node. |
abstract void |
setCenterOfMass(com.jme.math.Vector3f value)
Change the center of mass for this node. |
abstract void |
setLinearVelocity(com.jme.math.Vector3f velocity)
Sets the linear velocity of this node. |
abstract void |
setMass(float value)
Change mass of this object. |
abstract void |
unrest()
This method tells the physics implementation to check the node for movement after it has been rested (manually or automatically). |
void |
write(com.jme.util.export.JMEExporter ex)
|
| Methods inherited from class com.jmex.physics.PhysicsNode |
|---|
createBox, createCapsule, createCylinder, createMesh, createRay, createSphere, delete, generatePhysicsGeometry, generatePhysicsGeometry, generatePhysicsGeometry, generatePhysicsGeometry, getCollisionEventHandler, getCollisionGroup, getMaterial, getPhysicsNode, getSpace, isActive, isResting, setActive, setCollisionGroup, setMaterial, setParent |
| Methods inherited from class com.jme.scene.Node |
|---|
applyRenderState, attachChild, attachChildAt, childChange, detachAllChildren, detachChild, detachChildAt, detachChildNamed, draw, findCollisions, findPick, getChild, getChild, getChildIndex, getChildren, getQuantity, getTriangleCount, getVertexCount, hasChild, hasCollision, lockBounds, lockMeshes, lockShadows, lockTransforms, setModelBound, sortLights, swapChildren, unlockBounds, unlockMeshes, unlockShadows, unlockTransforms, updateModelBound, updateWorldBound, updateWorldData, updateWorldVectors |
| Methods inherited from class com.jme.scene.Spatial |
|---|
addController, 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, lockBranch, lockMeshes, 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, toString, unlock, unlock, unlockBranch, unlockMeshes, updateGeometricState, updateRenderState, updateRenderState, updateWorldRotation, updateWorldScale, updateWorldTranslation, updateWorldVectors, worldToLocal |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String MASS_PROPERTY
public static final java.lang.String CENTER_OF_MASS_PROPERTY
public static final java.lang.String LINEAR_VELOCITY_PROPERTY
public static final java.lang.String ANGULAR_VELOCITY_PROPERTY
public static final java.lang.String AFFECTED_BY_GRAVITY_PROPERTY
public static final java.lang.String JOINTS_PROPERTY
| Constructor Detail |
|---|
protected DynamicPhysicsNode(java.lang.String name)
protected DynamicPhysicsNode()
| Method Detail |
|---|
public final boolean isStatic()
isStatic in class PhysicsNodepublic abstract float getMass()
public abstract void setMass(float value)
value - new masspublic abstract com.jme.math.Vector3f getCenterOfMass(com.jme.math.Vector3f store)
store - where to put the position (null to create a new vector)
public abstract void setCenterOfMass(com.jme.math.Vector3f value)
PhysicsNode.generatePhysicsGeometry()).
value - new center as vector in object coordinate spacepublic abstract void clearForce()
public abstract com.jme.math.Vector3f getForce(com.jme.math.Vector3f store)
store - where to put the force (null to create a new vector)
public abstract void addForce(com.jme.math.Vector3f force,
com.jme.math.Vector3f at)
force - force to be added (world coordinate space)at - position of the object where the force should be applied (relative to the center of mass)PhysicsUpdateCallbackpublic void addForce(com.jme.math.Vector3f force)
force - force to be addedaddForce(com.jme.math.Vector3f, com.jme.math.Vector3f)public abstract void clearTorque()
public abstract com.jme.math.Vector3f getTorque(com.jme.math.Vector3f store)
store - where to put the torque (null to create a new vector)
public abstract void addTorque(com.jme.math.Vector3f torque)
torque - torque to be addedpublic abstract void setLinearVelocity(com.jme.math.Vector3f velocity)
velocity - new velocity in world coordinate spacepublic abstract com.jme.math.Vector3f getLinearVelocity(com.jme.math.Vector3f store)
store - where to store the velocity (null to create a new vector)
public abstract void setAngularVelocity(com.jme.math.Vector3f velocity)
velocity - new velocity in world coordinate spacepublic abstract com.jme.math.Vector3f getAngularVelocity(com.jme.math.Vector3f store)
store - where to store the velocity (null to create a new vector)
public abstract boolean isAffectedByGravity()
setAffectedByGravity(boolean)public abstract void setAffectedByGravity(boolean value)
value - new valuepublic void clearDynamics()
protected void drawDebugInfo(com.jme.renderer.Renderer renderer)
PhysicsNode
drawDebugInfo in class PhysicsNoderenderer - where to draw topublic abstract void computeMass()
public java.lang.Class getClassTag()
getClassTag in interface com.jme.util.export.SavablegetClassTag in class PhysicsNode
public void read(com.jme.util.export.JMEImporter im)
throws java.io.IOException
read in interface com.jme.util.export.Savableread in class PhysicsNodejava.io.IOException
public void write(com.jme.util.export.JMEExporter ex)
throws java.io.IOException
write in interface com.jme.util.export.Savablewrite in class PhysicsNodejava.io.IOExceptionpublic abstract void rest()
unrest()public abstract void unrest()
rest()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||