Class PxRigidActorExt

java.lang.Object
physx.NativeObject
physx.extensions.PxRigidActorExt

public class PxRigidActorExt extends NativeObject
utility functions for use with PxRigidActor and subclasses
See Also:
  • Field Details

    • SIZEOF

      public static final int SIZEOF
    • ALIGNOF

      public static final int ALIGNOF
      See Also:
  • Constructor Details

    • PxRigidActorExt

      protected PxRigidActorExt()
    • PxRigidActorExt

      protected PxRigidActorExt(long address)
  • Method Details

    • wrapPointer

      public static PxRigidActorExt wrapPointer(long address)
    • arrayGet

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

      public void destroy()
    • createExclusiveShape

      public static PxShape createExclusiveShape(PxRigidActor actor, PxGeometry geometry, PxMaterial material)
      Creates a new shape with default properties and a single material adds it to the list of shapes of this actor.

      This is equivalent to the following

      PxShape* shape(...) = PxGetPhysics().createShape(...); // reference count is 1 actor->attachShape(shape); // increments reference count shape->release(); // releases user reference, leaving reference count at 1

      As a consequence, detachShape() will result in the release of the last reference, and the shape will be deleted.

      Note: The default shape flags to be set are: eVISUALIZATION, eSIMULATION_SHAPE, eSCENE_QUERY_SHAPE (see #PxShapeFlag). Triangle mesh, heightfield or plane geometry shapes configured as eSIMULATION_SHAPE are not supported for non-kinematic PxRigidDynamic instances.

      Note: Creating compounds with a very large number of shapes may adversely affect performance and stability.

      Sleeping: Does NOT wake the actor up automatically.

      Parameters:
      actor - the actor to which to attach the shape
      geometry - the geometry of the shape
      material - the material for the shape
      Returns:
      The newly created shape.
      See Also:
    • createExclusiveShape

      public static PxShape createExclusiveShape(PxRigidActor actor, PxGeometry geometry, PxMaterial material, PxShapeFlags flags)
      Creates a new shape with default properties and a single material adds it to the list of shapes of this actor.

      This is equivalent to the following

      PxShape* shape(...) = PxGetPhysics().createShape(...); // reference count is 1 actor->attachShape(shape); // increments reference count shape->release(); // releases user reference, leaving reference count at 1

      As a consequence, detachShape() will result in the release of the last reference, and the shape will be deleted.

      Note: The default shape flags to be set are: eVISUALIZATION, eSIMULATION_SHAPE, eSCENE_QUERY_SHAPE (see #PxShapeFlag). Triangle mesh, heightfield or plane geometry shapes configured as eSIMULATION_SHAPE are not supported for non-kinematic PxRigidDynamic instances.

      Note: Creating compounds with a very large number of shapes may adversely affect performance and stability.

      Sleeping: Does NOT wake the actor up automatically.

      Parameters:
      actor - the actor to which to attach the shape
      geometry - the geometry of the shape
      material - the material for the shape
      Returns:
      The newly created shape.
      See Also: