java.lang.Object
physx.NativeObject
physx.character.PxObstacleContext
Context class for obstacles.
An obstacle context class contains and manages a set of user-defined obstacles.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class physx.NativeObject
NativeObject.Allocator<T> -
Field Summary
FieldsFields inherited from class physx.NativeObject
address, isExternallyAllocated, SIZEOF_BYTE, SIZEOF_DOUBLE, SIZEOF_FLOAT, SIZEOF_INT, SIZEOF_LONG, SIZEOF_POINTER, SIZEOF_SHORT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintaddObstacle(PxObstacle obstacle) Adds an obstacle to the context.static PxObstacleContextarrayGet(long baseAddress, int index) voiddestroy()Retrieves the controller manager associated with this context.intRetrieves number of obstacles in the context.getObstacle(int i) Retrieves desired obstacle.getObstacleByHandle(int handle) Retrieves desired obstacle by given handle.voidrelease()Releases the context.booleanremoveObstacle(int handle) Removes an obstacle from the context.booleanupdateObstacle(int handle, PxObstacle obstacle) Updates data for an existing obstacle.static PxObstacleContextwrapPointer(long address) Methods inherited from class physx.NativeObject
checkNotNull, equals, getAddress, hashCode
-
Field Details
-
SIZEOF
public static final int SIZEOF -
ALIGNOF
public static final int ALIGNOF- See Also:
-
-
Constructor Details
-
PxObstacleContext
protected PxObstacleContext() -
PxObstacleContext
protected PxObstacleContext(long address)
-
-
Method Details
-
wrapPointer
-
arrayGet
-
destroy
public void destroy() -
release
public void release()Releases the context. -
getControllerManager
Retrieves the controller manager associated with this context.- Returns:
- The associated controller manager
-
addObstacle
Adds an obstacle to the context.- Returns:
- Handle for newly-added obstacle
-
removeObstacle
public boolean removeObstacle(int handle) Removes an obstacle from the context.- Returns:
- True if success
-
updateObstacle
Updates data for an existing obstacle.- Returns:
- True if success
-
getNbObstacles
public int getNbObstacles()Retrieves number of obstacles in the context.- Returns:
- Number of obstacles in the context
-
getObstacle
Retrieves desired obstacle.- Returns:
- Desired obstacle
-
getObstacleByHandle
Retrieves desired obstacle by given handle.- Returns:
- Desired obstacle
-