java.lang.Object
physx.NativeObject
physx.physics.PxQueryHit
physx.physics.PxLocationHit
- Direct Known Subclasses:
PxGeomRaycastHit,PxGeomSweepHit
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class physx.NativeObject
NativeObject.Allocator<T> -
Field Summary
FieldsFields inherited from class physx.NativeObject
address, isExternallyAllocated, SIZEOF_BYTE, SIZEOF_DOUBLE, SIZEOF_FLOAT, SIZEOF_INT, SIZEOF_LONG, SIZEOF_POINTER, SIZEOF_SHORT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PxLocationHitarrayGet(long baseAddress, int index) voiddestroy()floatDistance to hit.getFlags()Hit flags specifying which members contain valid values.World-space hit normal (flag: #PxHitFlag::eNORMAL)World-space hit position (flag: #PxHitFlag::ePOSITION)voidsetDistance(float value) Distance to hit.voidsetFlags(PxHitFlags value) Hit flags specifying which members contain valid values.voidWorld-space hit normal (flag: #PxHitFlag::eNORMAL)voidsetPosition(PxVec3 value) World-space hit position (flag: #PxHitFlag::ePOSITION)static PxLocationHitwrapPointer(long address) Methods inherited from class physx.physics.PxQueryHit
getFaceIndex, setFaceIndexMethods inherited from class physx.NativeObject
checkNotNull, equals, getAddress, hashCode
-
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
-
arrayGet
-
destroy
public void destroy()- Overrides:
destroyin classPxQueryHit
-
getFlags
Hit flags specifying which members contain valid values. -
setFlags
Hit flags specifying which members contain valid values. -
getPosition
World-space hit position (flag: #PxHitFlag::ePOSITION) -
setPosition
World-space hit position (flag: #PxHitFlag::ePOSITION) -
getNormal
World-space hit normal (flag: #PxHitFlag::eNORMAL) -
setNormal
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
-