Class PxObstacleContext

java.lang.Object
physx.NativeObject
physx.character.PxObstacleContext

public class PxObstacleContext extends NativeObject
Context class for obstacles.

An obstacle context class contains and manages a set of user-defined obstacles.

See Also:
  • 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

      public static PxObstacleContext wrapPointer(long address)
    • arrayGet

      public static PxObstacleContext arrayGet(long baseAddress, int index)
    • destroy

      public void destroy()
    • release

      public void release()
      Releases the context.
    • getControllerManager

      public PxControllerManager getControllerManager()
      Retrieves the controller manager associated with this context.
      Returns:
      The associated controller manager
    • addObstacle

      public int addObstacle(PxObstacle obstacle)
      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

      public boolean updateObstacle(int handle, PxObstacle obstacle)
      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

      public PxObstacle getObstacle(int i)
      Retrieves desired obstacle.
      Returns:
      Desired obstacle
    • getObstacleByHandle

      public PxObstacle getObstacleByHandle(int handle)
      Retrieves desired obstacle by given handle.
      Returns:
      Desired obstacle