Package com.jme3.bullet.collision
Class PersistentManifolds
java.lang.Object
com.jme3.bullet.collision.PersistentManifolds
Utility class to access fields of Bullet's
btPersistentManifold
class.-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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.
-
Field Details
-
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 abtPersistentManifold
(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 abtPersistentManifold
(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 abtPersistentManifold
(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 abtPersistentManifold
(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 abtPersistentManifold
(not zero)- Returns:
- a new array of btManifoldPoint IDs (not null, may be empty)
- See Also:
-