Package physx.physics

Class PxLocationHit

Direct Known Subclasses:
PxGeomRaycastHit, PxGeomSweepHit

public class PxLocationHit extends PxQueryHit
Scene query hit information for raycasts and sweeps returning hit position and normal information.

::PxHitFlag flags can be passed to scene query functions, as an optimization, to cause the SDK to only generate specific members of this structure.

  • Field Details

    • SIZEOF

      public static final int SIZEOF
    • ALIGNOF

      public static final int ALIGNOF
      See Also:
  • Constructor Details

    • PxLocationHit

      protected PxLocationHit()
    • PxLocationHit

      protected PxLocationHit(long address)
  • Method Details

    • wrapPointer

      public static PxLocationHit wrapPointer(long address)
    • arrayGet

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

      public void destroy()
      Overrides:
      destroy in class PxQueryHit
    • getFlags

      public PxHitFlags getFlags()
      Hit flags specifying which members contain valid values.
    • setFlags

      public void setFlags(PxHitFlags value)
      Hit flags specifying which members contain valid values.
    • getPosition

      public PxVec3 getPosition()
      World-space hit position (flag: #PxHitFlag::ePOSITION)
    • setPosition

      public void setPosition(PxVec3 value)
      World-space hit position (flag: #PxHitFlag::ePOSITION)
    • getNormal

      public PxVec3 getNormal()
      World-space hit normal (flag: #PxHitFlag::eNORMAL)
    • setNormal

      public void setNormal(PxVec3 value)
      World-space hit normal (flag: #PxHitFlag::eNORMAL)
    • getDistance

      public float getDistance()
      Distance to hit. Note: If the eMTD flag is used, distance will be a negative value if shapes are overlapping indicating the penetration depth. Note: Otherwise, this value will be >= 0
    • setDistance

      public void setDistance(float value)
      Distance to hit. Note: If the eMTD flag is used, distance will be a negative value if shapes are overlapping indicating the penetration depth. Note: Otherwise, this value will be >= 0