Class PhysicsCollisionEvent

java.lang.Object
java.util.EventObject
com.jme3.bullet.collision.PhysicsCollisionEvent
All Implemented Interfaces:
Serializable

public class PhysicsCollisionEvent extends EventObject
A CollisionEvent stores all information about a collision in the PhysicsWorld. Do not store this Object, as it will be reused after the collision() method has been called. Get/reference all data you need in the collide method.
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • clean

      public void clean()
      used by event factory, called when event is destroyed
    • refactor

      public void refactor(int type, PhysicsCollisionObject source, PhysicsCollisionObject nodeB, com.bulletphysics.collision.narrowphase.ManifoldPoint cp)
      used by event factory, called when event reused
      Parameters:
      type - the desired type
      source - the desired first object (alias created)
      nodeB - the desired 2nd object (alias created)
      cp - the desired manifold (alias created)
    • getType

      public int getType()
    • getNodeA

      public Spatial getNodeA()
      Returns:
      A Spatial if the UserObject of the PhysicsCollisionObject is a Spatial
    • getNodeB

      public Spatial getNodeB()
      Returns:
      A Spatial if the UserObject of the PhysicsCollisionObject is a Spatial
    • getObjectA

      public PhysicsCollisionObject getObjectA()
    • getObjectB

      public PhysicsCollisionObject getObjectB()
    • getAppliedImpulse

      public float getAppliedImpulse()
    • getAppliedImpulseLateral1

      public float getAppliedImpulseLateral1()
    • getAppliedImpulseLateral2

      public float getAppliedImpulseLateral2()
    • getCombinedFriction

      public float getCombinedFriction()
    • getCombinedRestitution

      public float getCombinedRestitution()
    • getDistance1

      public float getDistance1()
    • getIndex0

      public int getIndex0()
    • getIndex1

      public int getIndex1()
    • getLateralFrictionDir1

      public Vector3f getLateralFrictionDir1()
    • getLateralFrictionDir2

      public Vector3f getLateralFrictionDir2()
    • isLateralFrictionInitialized

      public boolean isLateralFrictionInitialized()
    • getLifeTime

      public int getLifeTime()
    • getLocalPointA

      public Vector3f getLocalPointA()
    • getLocalPointB

      public Vector3f getLocalPointB()
    • getNormalWorldOnB

      public Vector3f getNormalWorldOnB()
    • getPartId0

      public int getPartId0()
    • getPartId1

      public int getPartId1()
    • getPositionWorldOnA

      public Vector3f getPositionWorldOnA()
    • getPositionWorldOnB

      public Vector3f getPositionWorldOnB()
    • getUserPersistentData

      public Object getUserPersistentData()