public class BombControl extends RigidBodyControl implements PhysicsCollisionListener, PhysicsTickListener
added, enabled, kinematicSpatial, space, spatialconstructionInfo, joints, kinematic, localInertia, mass, motionState, rBody, tempMatrix, tempTrans, tempVec, tempVec2COLLISION_GROUP_01, COLLISION_GROUP_02, COLLISION_GROUP_03, COLLISION_GROUP_04, COLLISION_GROUP_05, COLLISION_GROUP_06, COLLISION_GROUP_07, COLLISION_GROUP_08, COLLISION_GROUP_09, COLLISION_GROUP_10, COLLISION_GROUP_11, COLLISION_GROUP_12, COLLISION_GROUP_13, COLLISION_GROUP_14, COLLISION_GROUP_15, COLLISION_GROUP_16, COLLISION_GROUP_NONE, collisionGroup, collisionGroupsMask, collisionShape| Constructor and Description |
|---|
BombControl(AssetManager manager,
CollisionShape shape,
float mass) |
BombControl(CollisionShape shape,
float mass) |
| Modifier and Type | Method and Description |
|---|---|
void |
collision(PhysicsCollisionEvent event)
Invoked when a collision happened in the PhysicsSpace.
|
protected void |
createGhostObject() |
float |
getExplosionRadius() |
float |
getForceFactor() |
void |
physicsTick(PhysicsSpace space,
float f)
Callback from Bullet, invoked just after the physics has been stepped,
use to check for forces etc.
|
void |
prePhysicsTick(PhysicsSpace space,
float f)
Callback from Bullet, invoked just before the physics is stepped.
|
void |
read(JmeImporter im)
De-serialize this control, for example when loading from a J3O file.
|
void |
setExplosionRadius(float explosionRadius) |
void |
setForceFactor(float forceFactor) |
void |
setPhysicsSpace(PhysicsSpace space)
If enabled, add this control's body to the specified physics space.
|
void |
update(float tpf)
Update this control.
|
void |
write(JmeExporter ex)
Serialize this control, for example when saving to a J3O file.
|
cloneFields, cloneForSpatial, createCollisionShape, getPhysicsSpace, getSpatial, isApplyPhysicsLocal, isEnabled, isKinematicSpatial, jmeClone, render, setApplyPhysicsLocal, setEnabled, setKinematicSpatial, setSpatialactivate, addJoint, applyCentralForce, applyForce, applyImpulse, applyTorque, applyTorqueImpulse, clearForces, destroy, getAngularDamping, getAngularFactor, getAngularSleepingThreshold, getAngularVelocity, getAngularVelocity, getCcdMotionThreshold, getCcdSquareMotionThreshold, getCcdSweptSphereRadius, getFriction, getGravity, getGravity, getInterpolatedPhysicsLocation, getInterpolatedPhysicsRotation, getJoints, getLinearDamping, getLinearSleepingThreshold, getLinearVelocity, getLinearVelocity, getMass, getMotionState, getObjectId, getPhysicsLocation, getPhysicsLocation, getPhysicsRotation, getPhysicsRotation, getPhysicsRotationMatrix, getPhysicsRotationMatrix, getRestitution, isActive, isContactResponse, isKinematic, postRebuild, preRebuild, rebuildRigidBody, removeJoint, setAngularDamping, setAngularFactor, setAngularSleepingThreshold, setAngularVelocity, setCcdMotionThreshold, setCcdSweptSphereRadius, setCollisionShape, setContactResponse, setDamping, setFriction, setGravity, setKinematic, setLinearDamping, setLinearSleepingThreshold, setLinearVelocity, setMass, setPhysicsLocation, setPhysicsRotation, setPhysicsRotation, setRestitution, setSleepingThresholdsaddCollideWithGroup, getCollideWithGroups, getCollisionGroup, getCollisionShape, getUserObject, removeCollideWithGroup, setCollideWithGroups, setCollisionGroup, setUserObjectpublic BombControl(CollisionShape shape, float mass)
public BombControl(AssetManager manager, CollisionShape shape, float mass)
public void setPhysicsSpace(PhysicsSpace space)
RigidBodyControlsetPhysicsSpace in interface PhysicsControlsetPhysicsSpace in class RigidBodyControlspace - where to add, or null to simply removeprotected void createGhostObject()
public void collision(PhysicsCollisionEvent event)
PhysicsCollisionListenerDo not retain the event object, as it will be reused after the collision() method returns. Copy any data you need during the collide() method.
collision in interface PhysicsCollisionListenerevent - the event that occurred (not null, reusable)public void prePhysicsTick(PhysicsSpace space, float f)
PhysicsTickListenerprePhysicsTick in interface PhysicsTickListenerspace - the space that is about to be stepped (not null)f - the time per physics step (in seconds, ≥0)public void physicsTick(PhysicsSpace space, float f)
PhysicsTickListenerphysicsTick in interface PhysicsTickListenerspace - the space that was just stepped (not null)f - the time per physics step (in seconds, ≥0)public void update(float tpf)
RigidBodyControlupdate in interface Controlupdate in class RigidBodyControltpf - the time interval between frames (in seconds, ≥0)public float getExplosionRadius()
public void setExplosionRadius(float explosionRadius)
explosionRadius - the explosionRadius to setpublic float getForceFactor()
public void setForceFactor(float forceFactor)
public void read(JmeImporter im) throws java.io.IOException
RigidBodyControlread in interface Savableread in class RigidBodyControlim - importer (not null)java.io.IOException - from importerpublic void write(JmeExporter ex) throws java.io.IOException
RigidBodyControlwrite in interface Savablewrite in class RigidBodyControlex - exporter (not null)java.io.IOException - from exporter