|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Objectcom.jme3.bullet.collision.PhysicsCollisionObject
com.jme3.bullet.objects.PhysicsRigidBody
public class PhysicsRigidBody
PhysicsRigidBody - Basic physics object
フィールドの概要 |
---|
コンストラクタの概要 | |
---|---|
PhysicsRigidBody()
|
|
PhysicsRigidBody(CollisionShape shape)
Creates a new PhysicsRigidBody with the supplied collision shape |
|
PhysicsRigidBody(CollisionShape shape,
float mass)
|
メソッドの概要 | |
---|---|
void |
activate()
reactivates this PhysicsRigidBody when it has been deactivated because it was not moving |
void |
addJoint(PhysicsJoint joint)
do not use manually, joints are added automatically |
void |
applyCentralForce(Vector3f force)
Apply a force to the PhysicsRigidBody, only applies force if the next physics update call updates the physics space. |
void |
applyForce(Vector3f force,
Vector3f location)
Apply a force to the PhysicsRigidBody, only applies force if the next physics update call updates the physics space. |
void |
applyImpulse(Vector3f impulse,
Vector3f rel_pos)
Apply an impulse to the PhysicsRigidBody in the next physics update. |
void |
applyTorque(Vector3f torque)
Apply a force to the PhysicsRigidBody, only applies force if the next physics update call updates the physics space. |
void |
applyTorqueImpulse(Vector3f vec)
Apply a torque impulse to the PhysicsRigidBody in the next physics update. |
void |
clearForces()
Clear all forces from the PhysicsRigidBody |
void |
destroy()
destroys this PhysicsRigidBody and removes it from memory |
float |
getAngularDamping()
|
float |
getAngularFactor()
|
float |
getAngularSleepingThreshold()
|
Vector3f |
getAngularVelocity()
Get the current angular velocity of this PhysicsRigidBody |
void |
getAngularVelocity(Vector3f vec)
Get the current angular velocity of this PhysicsRigidBody |
float |
getCcdMotionThreshold()
|
float |
getCcdSquareMotionThreshold()
|
float |
getCcdSweptSphereRadius()
|
float |
getFriction()
|
Vector3f |
getGravity()
|
Vector3f |
getGravity(Vector3f gravity)
|
Vector3f |
getInterpolatedPhysicsLocation(Vector3f location)
Gets the physics object location |
Matrix3f |
getInterpolatedPhysicsRotation(Matrix3f rotation)
Gets the physics object rotation |
java.util.List<PhysicsJoint> |
getJoints()
Returns a list of connected joints. |
float |
getLinearDamping()
|
float |
getLinearSleepingThreshold()
|
Vector3f |
getLinearVelocity()
Get the current linear velocity of this PhysicsRigidBody |
void |
getLinearVelocity(Vector3f vec)
Get the current linear velocity of this PhysicsRigidBody |
float |
getMass()
|
RigidBodyMotionState |
getMotionState()
|
com.bulletphysics.dynamics.RigidBody |
getObjectId()
used internally |
Vector3f |
getPhysicsLocation()
Gets the physics object location, instantiates a new Vector3f object |
Vector3f |
getPhysicsLocation(Vector3f location)
Gets the physics object location, no object instantiation |
Quaternion |
getPhysicsRotation()
Gets the physics object rotation as a quaternion, converts the bullet Matrix3f value, instantiates new object |
Quaternion |
getPhysicsRotation(Quaternion rotation)
Gets the physics object rotation as a quaternion, converts the bullet Matrix3f value |
Matrix3f |
getPhysicsRotationMatrix()
Gets the physics object rotation |
Matrix3f |
getPhysicsRotationMatrix(Matrix3f rotation)
Gets the physics object rotation as a matrix, no conversions and no object instantiation |
float |
getRestitution()
|
boolean |
isActive()
|
boolean |
isKinematic()
|
void |
read(JmeImporter e)
|
void |
removeJoint(PhysicsJoint joint)
|
void |
setAngularDamping(float angularDamping)
|
void |
setAngularFactor(float factor)
|
void |
setAngularSleepingThreshold(float angularSleepingThreshold)
|
void |
setAngularVelocity(Vector3f vec)
Sets the angular velocity of this PhysicsRigidBody |
void |
setCcdMotionThreshold(float threshold)
Sets the amount of motion that has to happen in one physics tick to trigger the continuous motion detection This avoids the problem of fast objects moving through other objects, set to zero to disable (default) |
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 |
setDamping(float linearDamping,
float angularDamping)
|
void |
setFriction(float friction)
Sets the friction of this physics object |
void |
setGravity(Vector3f gravity)
Set the local gravity of this PhysicsRigidBody Set this after adding the node to the PhysicsSpace, the PhysicsSpace assigns its current gravity to the physics node when its added. |
void |
setKinematic(boolean kinematic)
Sets the node to kinematic mode. in this mode the node is not affected by physics but affects other physics objects. |
void |
setLinearDamping(float linearDamping)
|
void |
setLinearSleepingThreshold(float linearSleepingThreshold)
|
void |
setLinearVelocity(Vector3f vec)
Sets the linear velocity of this PhysicsRigidBody |
void |
setMass(float mass)
Sets the mass of this PhysicsRigidBody, objects with mass=0 are static. |
void |
setPhysicsLocation(Vector3f location)
Sets the physics object location |
void |
setPhysicsRotation(Matrix3f rotation)
Sets the physics object rotation |
void |
setPhysicsRotation(Quaternion rotation)
Sets the physics object rotation |
void |
setRestitution(float restitution)
The "bouncyness" of the PhysicsRigidBody, best performance if restitution=0 |
void |
setSleepingThresholds(float linear,
float angular)
sets the sleeping thresholds, these define when the object gets deactivated to save ressources. |
void |
write(JmeExporter e)
|
クラス com.jme3.bullet.collision.PhysicsCollisionObject から継承されたメソッド |
---|
addCollideWithGroup, createDebugShape, debugShape, detachDebugShape, getCollideWithGroups, getCollisionGroup, getCollisionShape, getUserObject, removeCollideWithGroup, setCollideWithGroups, setCollisionGroup, setUserObject |
クラス java.lang.Object から継承されたメソッド |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
コンストラクタの詳細 |
---|
public PhysicsRigidBody()
public PhysicsRigidBody(CollisionShape shape)
child
- shape
- public PhysicsRigidBody(CollisionShape shape, float mass)
メソッドの詳細 |
---|
public RigidBodyMotionState getMotionState()
public void setPhysicsLocation(Vector3f location)
location
- the location of the actual physics objectpublic void setPhysicsRotation(Matrix3f rotation)
rotation
- the rotation of the actual physics objectpublic void setPhysicsRotation(Quaternion rotation)
rotation
- the rotation of the actual physics objectpublic Vector3f getPhysicsLocation()
location
- the location of the actual physics object is stored in this Vector3fpublic Matrix3f getPhysicsRotationMatrix()
rotation
- the rotation of the actual physics object is stored in this Matrix3fpublic Vector3f getPhysicsLocation(Vector3f location)
location
- the location of the actual physics object is stored in this Vector3fpublic Matrix3f getPhysicsRotationMatrix(Matrix3f rotation)
rotation
- the rotation of the actual physics object is stored in this Matrix3fpublic Quaternion getPhysicsRotation()
rotation
- the rotation of the actual physics object is stored in this Quaternionpublic Quaternion getPhysicsRotation(Quaternion rotation)
rotation
- the rotation of the actual physics object is stored in this Quaternionpublic Vector3f getInterpolatedPhysicsLocation(Vector3f location)
location
- the location of the actual physics object is stored in this Vector3fpublic Matrix3f getInterpolatedPhysicsRotation(Matrix3f rotation)
rotation
- the rotation of the actual physics object is stored in this Matrix3fpublic void setKinematic(boolean kinematic)
kinematic
- public boolean isKinematic()
public void setCcdSweptSphereRadius(float radius)
public void setCcdMotionThreshold(float threshold)
threshold
- public float getCcdSweptSphereRadius()
public float getCcdMotionThreshold()
public float getCcdSquareMotionThreshold()
public float getMass()
public void setMass(float mass)
mass
- public Vector3f getGravity()
public Vector3f getGravity(Vector3f gravity)
public void setGravity(Vector3f gravity)
gravity
- the gravity vector to setpublic float getFriction()
public void setFriction(float friction)
friction
- the friction of this physics objectpublic void setDamping(float linearDamping, float angularDamping)
public void setLinearDamping(float linearDamping)
public void setAngularDamping(float angularDamping)
public float getLinearDamping()
public float getAngularDamping()
public float getRestitution()
public void setRestitution(float restitution)
restitution
- public Vector3f getAngularVelocity()
public void getAngularVelocity(Vector3f vec)
vec
- the vector to store the velocity inpublic void setAngularVelocity(Vector3f vec)
vec
- the angular velocity of this PhysicsRigidBodypublic Vector3f getLinearVelocity()
public void getLinearVelocity(Vector3f vec)
vec
- the vector to store the velocity inpublic void setLinearVelocity(Vector3f vec)
vec
- the linear velocity of this PhysicsRigidBodypublic void applyForce(Vector3f force, Vector3f location)
force
- the forcelocation
- the location of the forcepublic void applyCentralForce(Vector3f force)
force
- the forcepublic void applyTorque(Vector3f torque)
torque
- the torquepublic void applyImpulse(Vector3f impulse, Vector3f rel_pos)
impulse
- applied impulserel_pos
- location relative to objectpublic void applyTorqueImpulse(Vector3f vec)
vec
- public void clearForces()
public void setCollisionShape(CollisionShape collisionShape)
PhysicsCollisionObject
の記述:
PhysicsCollisionObject
内の setCollisionShape
collisionShape
- the CollisionShape to setpublic void activate()
public boolean isActive()
public void setSleepingThresholds(float linear, float angular)
linear
- the linear sleeping thresholdangular
- the angular sleeping thresholdpublic void setLinearSleepingThreshold(float linearSleepingThreshold)
public void setAngularSleepingThreshold(float angularSleepingThreshold)
public float getLinearSleepingThreshold()
public float getAngularSleepingThreshold()
public float getAngularFactor()
public void setAngularFactor(float factor)
public void addJoint(PhysicsJoint joint)
public void removeJoint(PhysicsJoint joint)
public java.util.List<PhysicsJoint> getJoints()
public com.bulletphysics.dynamics.RigidBody getObjectId()
public void destroy()
public void write(JmeExporter e) throws java.io.IOException
Savable
内の write
PhysicsCollisionObject
内の write
java.io.IOException
public void read(JmeImporter e) throws java.io.IOException
Savable
内の read
PhysicsCollisionObject
内の read
java.io.IOException
|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |