|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jme3.bullet.collision.PhysicsCollisionObject
com.jme3.bullet.objects.PhysicsCharacter
public class PhysicsCharacter
Basic Bullet Character
Field Summary | |
---|---|
protected long |
characterId
|
protected float |
fallSpeed
|
protected float |
jumpSpeed
|
protected boolean |
locationDirty
|
protected float |
stepHeight
|
protected Quaternion |
tmp_inverseWorldRotation
|
protected int |
upAxis
|
protected Vector3f |
walkDirection
|
Constructor Summary | |
---|---|
PhysicsCharacter()
|
|
PhysicsCharacter(CollisionShape shape,
float stepHeight)
|
Method Summary | |
---|---|
protected void |
buildObject()
|
void |
destroy()
|
protected void |
finalize()
|
float |
getCcdMotionThreshold()
|
float |
getCcdSquareMotionThreshold()
|
float |
getCcdSweptSphereRadius()
|
long |
getControllerId()
used internally |
float |
getFallSpeed()
|
float |
getGravity()
|
float |
getJumpSpeed()
|
float |
getMaxSlope()
|
Vector3f |
getPhysicsLocation()
|
Vector3f |
getPhysicsLocation(Vector3f trans)
|
int |
getUpAxis()
|
Vector3f |
getWalkDirection()
|
void |
jump()
|
boolean |
onGround()
|
void |
read(JmeImporter e)
|
void |
setCcdMotionThreshold(float threshold)
|
void |
setCcdSweptSphereRadius(float radius)
|
void |
setCollisionShape(CollisionShape collisionShape)
Sets a CollisionShape to this physics object, note that the object should not be in the physics space when adding a new collision shape as it is rebuilt on the physics side. |
void |
setFallSpeed(float fallSpeed)
|
void |
setGravity(float value)
|
void |
setJumpSpeed(float jumpSpeed)
|
void |
setMaxSlope(float slopeRadians)
|
void |
setPhysicsLocation(Vector3f location)
Set the physics location (same as warp()) |
void |
setUpAxis(int axis)
|
void |
setWalkDirection(Vector3f vec)
Set the walk direction, works continuously. |
void |
warp(Vector3f location)
Sets the location of this physics character |
void |
write(JmeExporter e)
|
Methods inherited from class com.jme3.bullet.collision.PhysicsCollisionObject |
---|
addCollideWithGroup, attachCollisionShape, attachDebugShape, attachDebugShape, attachDebugShape, createDebugShape, debugShape, detachDebugShape, finalizeNative, getCollideWithGroups, getCollisionGroup, getCollisionShape, getDebugShape, getObjectId, getUserObject, initUserPointer, removeCollideWithGroup, setCollideWithGroups, setCollisionGroup, setUserObject, updateDebugShape |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected long characterId
protected float stepHeight
protected Vector3f walkDirection
protected float fallSpeed
protected float jumpSpeed
protected int upAxis
protected boolean locationDirty
protected final Quaternion tmp_inverseWorldRotation
Constructor Detail |
---|
public PhysicsCharacter()
public PhysicsCharacter(CollisionShape shape, float stepHeight)
shape
- The CollisionShape (no Mesh or CompoundCollisionShapes)stepHeight
- The quantization size for vertical movementMethod Detail |
---|
protected void buildObject()
public void warp(Vector3f location)
location
- public void setWalkDirection(Vector3f vec)
vec
- the walk direction to setpublic Vector3f getWalkDirection()
public void setUpAxis(int axis)
public int getUpAxis()
public void setFallSpeed(float fallSpeed)
public float getFallSpeed()
public void setJumpSpeed(float jumpSpeed)
public float getJumpSpeed()
public void setGravity(float value)
public float getGravity()
public void setMaxSlope(float slopeRadians)
public float getMaxSlope()
public boolean onGround()
public void jump()
public void setCollisionShape(CollisionShape collisionShape)
PhysicsCollisionObject
setCollisionShape
in class PhysicsCollisionObject
collisionShape
- the CollisionShape to setpublic void setPhysicsLocation(Vector3f location)
location
- the location of the actual physics objectpublic Vector3f getPhysicsLocation(Vector3f trans)
public Vector3f getPhysicsLocation()
public void setCcdSweptSphereRadius(float radius)
public void setCcdMotionThreshold(float threshold)
public float getCcdSweptSphereRadius()
public float getCcdMotionThreshold()
public float getCcdSquareMotionThreshold()
public long getControllerId()
public void destroy()
public void write(JmeExporter e) throws java.io.IOException
write
in interface Savable
write
in class PhysicsCollisionObject
java.io.IOException
public void read(JmeImporter e) throws java.io.IOException
read
in interface Savable
read
in class PhysicsCollisionObject
java.io.IOException
protected void finalize() throws java.lang.Throwable
finalize
in class PhysicsCollisionObject
java.lang.Throwable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |