Package physx.common

Class PxPlane

java.lang.Object
physx.NativeObject
physx.common.PxPlane

public class PxPlane extends NativeObject
Representation of a plane.

Plane equation used: n.dot(v) + d = 0

  • Field Details

    • SIZEOF

      public static final int SIZEOF
    • ALIGNOF

      public static final int ALIGNOF
      See Also:
  • Constructor Details

    • PxPlane

      protected PxPlane(long address)
    • PxPlane

      public PxPlane()
      Constructor
    • PxPlane

      public PxPlane(float nx, float ny, float nz, float distance)
      Constructor from a normal and a distance
    • PxPlane

      public PxPlane(PxVec3 normal, float distance)
      Constructor from a normal and a distance
    • PxPlane

      public PxPlane(PxVec3 p0, PxVec3 p1, PxVec3 p2)
      Constructor from three points
  • Method Details

    • wrapPointer

      public static PxPlane wrapPointer(long address)
    • arrayGet

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

      public void destroy()
    • getN

      public PxVec3 getN()
      The normal to the plane
    • setN

      public void setN(PxVec3 value)
      The normal to the plane
    • getD

      public float getD()
      The distance from the origin
    • setD

      public void setD(float value)
      The distance from the origin
    • distance

      public float distance(PxVec3 p)
      Parameters:
      p - WebIDL type: PxVec3 [Const, Ref]
      Returns:
      WebIDL type: float
    • contains

      public boolean contains(PxVec3 p)
      Parameters:
      p - WebIDL type: PxVec3 [Const, Ref]
      Returns:
      WebIDL type: boolean
    • project

      public PxVec3 project(PxVec3 p)
      projects p into the plane
    • pointInPlane

      public PxVec3 pointInPlane()
      find an arbitrary point in the plane
    • normalize

      public void normalize()
      equivalent plane with unit normal
    • transform

      public PxPlane transform(PxTransform pose)
      transform plane
    • inverseTransform

      public PxPlane inverseTransform(PxTransform pose)
      inverse-transform plane