Package physx.physics

Class PxGeomRaycastHit

Direct Known Subclasses:
PxRaycastHit

public class PxGeomRaycastHit extends PxLocationHit
Stores results of raycast queries.

::PxHitFlag flags can be passed to raycast function, as an optimization, to cause the SDK to only compute specified members of this structure.

Some members like barycentric coordinates are currently only computed for triangle meshes and height fields, but next versions might provide them in other cases. The client code should check #flags to make sure returned values are valid.

  • Field Details

    • SIZEOF

      public static final int SIZEOF
    • ALIGNOF

      public static final int ALIGNOF
      See Also:
  • Constructor Details

    • PxGeomRaycastHit

      protected PxGeomRaycastHit()
    • PxGeomRaycastHit

      protected PxGeomRaycastHit(long address)
  • Method Details

    • wrapPointer

      public static PxGeomRaycastHit wrapPointer(long address)
    • arrayGet

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

      public void destroy()
      Overrides:
      destroy in class PxLocationHit
    • getU

      public float getU()
      Returns:
      WebIDL type: float
    • setU

      public void setU(float value)
      Parameters:
      value - WebIDL type: float
    • getV

      public float getV()
      barycentric coordinates of hit point, for triangle mesh and height field (flag: #PxHitFlag::eUV)
    • setV

      public void setV(float value)
      barycentric coordinates of hit point, for triangle mesh and height field (flag: #PxHitFlag::eUV)
    • hadInitialOverlap

      public boolean hadInitialOverlap()
      Returns:
      WebIDL type: boolean