Class PersistentManifolds

java.lang.Object
com.jme3.bullet.collision.PersistentManifolds

public final class PersistentManifolds extends Object
Utility class to access fields of Bullet's btPersistentManifold class.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Logger
    message logger for this class
  • Method Summary

    Modifier and Type
    Method
    Description
    static int
    countPoints(long persistentManifoldId)
    Return the number of points in the specified manifold (native field: m_cachedPoints).
    static long
    getBodyAId(long persistentManifoldId)
    Return the native ID of the first collision object (native field: m_body0).
    static long
    getBodyBId(long persistentManifoldId)
    Return the native ID of the 2nd collision object (native field: m_body1).
    static long
    getPointId(long persistentManifoldId, int pointIndex)
    Return the indexed btManifoldPoint in the specified manifold.
    static long[]
    listPointIds(long persistentManifoldId)
    Enumerate the native IDs of all points in the specified manifold.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • logger

      public static final Logger logger
      message logger for this class
  • Method Details

    • countPoints

      public static int countPoints(long persistentManifoldId)
      Return the number of points in the specified manifold (native field: m_cachedPoints).
      Parameters:
      persistentManifoldId - the native ID of a btPersistentManifold (not zero)
      Returns:
      the number of btManifoldPoints in the btPersistentManifold (≥0, ≤4)
    • getBodyAId

      public static long getBodyAId(long persistentManifoldId)
      Return the native ID of the first collision object (native field: m_body0).
      Parameters:
      persistentManifoldId - the native ID of a btPersistentManifold (not zero)
      Returns:
      the native ID of the btCollisionObject (not zero)
      See Also:
    • getBodyBId

      public static long getBodyBId(long persistentManifoldId)
      Return the native ID of the 2nd collision object (native field: m_body1).
      Parameters:
      persistentManifoldId - the native ID of a btPersistentManifold (not zero)
      Returns:
      the native ID of the btCollisionObject (not zero)
      See Also:
    • getPointId

      public static long getPointId(long persistentManifoldId, int pointIndex)
      Return the indexed btManifoldPoint in the specified manifold.
      Parameters:
      persistentManifoldId - the native ID of a btPersistentManifold (not zero)
      pointIndex - the index of the point (≥0, <4)
      Returns:
      the native ID of the btManifoldPoint (not zero)
    • listPointIds

      public static long[] listPointIds(long persistentManifoldId)
      Enumerate the native IDs of all points in the specified manifold.
      Parameters:
      persistentManifoldId - the native ID of a btPersistentManifold (not zero)
      Returns:
      a new array of btManifoldPoint IDs (not null, may be empty)
      See Also: