-
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 PxGeometryQueryarrayGet(long baseAddress, int index) static voidcomputeGeomBounds(PxBounds3 bounds, PxGeometry geom, PxTransform pose) computes the bounds for a geometry objectstatic voidcomputeGeomBounds(PxBounds3 bounds, PxGeometry geom, PxTransform pose, float inflation) computes the bounds for a geometry objectvoiddestroy()static booleanisValid(PxGeometry geom) Checks if provided geometry is valid.static booleanoverlap(PxGeometry geom0, PxTransform pose0, PxGeometry geom1, PxTransform pose1) Overlap test for two geometry objects.static floatpointDistance(PxVec3 point, PxGeometry geom, PxTransform pose) Computes distance between a point and a geometry object.static floatpointDistance(PxVec3 point, PxGeometry geom, PxTransform pose, PxVec3 closestPoint) Computes distance between a point and a geometry object.static intraycast(PxVec3 origin, PxVec3 unitDir, PxGeometry geom, PxTransform pose, float maxDist, PxHitFlags hitFlags, int maxHits, PxRaycastHit rayHits) Raycast test against a geometry object.static booleansweep(PxVec3 unitDir, float maxDist, PxGeometry geom0, PxTransform pose0, PxGeometry geom1, PxTransform pose1, PxSweepHit sweepHit) Sweep a specified geometry object in space and test for collision with a given object.static booleansweep(PxVec3 unitDir, float maxDist, PxGeometry geom0, PxTransform pose0, PxGeometry geom1, PxTransform pose1, PxSweepHit sweepHit, PxHitFlags hitFlags) Sweep a specified geometry object in space and test for collision with a given object.static booleansweep(PxVec3 unitDir, float maxDist, PxGeometry geom0, PxTransform pose0, PxGeometry geom1, PxTransform pose1, PxSweepHit sweepHit, PxHitFlags hitFlags, float inflation) Sweep a specified geometry object in space and test for collision with a given object.static PxGeometryQuerywrapPointer(long address) Methods 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
-
PxGeometryQuery
protected PxGeometryQuery() -
PxGeometryQuery
protected PxGeometryQuery(long address)
-
-
Method Details
-
wrapPointer
-
arrayGet
-
destroy
public void destroy() -
sweep
public static boolean sweep(PxVec3 unitDir, float maxDist, PxGeometry geom0, PxTransform pose0, PxGeometry geom1, PxTransform pose1, PxSweepHit sweepHit) Sweep a specified geometry object in space and test for collision with a given object.The following combinations are supported.
\li PxSphereGeometry vs. {PxSphereGeometry, PxPlaneGeometry, PxCapsuleGeometry, PxBoxGeometry, PxConvexMeshGeometry, PxTriangleMeshGeometry, PxHeightFieldGeometry} \li PxCapsuleGeometry vs. {PxSphereGeometry, PxPlaneGeometry, PxCapsuleGeometry, PxBoxGeometry, PxConvexMeshGeometry, PxTriangleMeshGeometry, PxHeightFieldGeometry} \li PxBoxGeometry vs. {PxSphereGeometry, PxPlaneGeometry, PxCapsuleGeometry, PxBoxGeometry, PxConvexMeshGeometry, PxTriangleMeshGeometry, PxHeightFieldGeometry} \li PxConvexMeshGeometry vs. {PxSphereGeometry, PxPlaneGeometry, PxCapsuleGeometry, PxBoxGeometry, PxConvexMeshGeometry, PxTriangleMeshGeometry, PxHeightFieldGeometry}
- Parameters:
unitDir- Normalized direction along which object geom0 should be sweptmaxDist- Maximum sweep distance, has to be in the [0, inf) rangegeom0- The geometry object to sweep. Supported geometries are #PxSphereGeometry, #PxCapsuleGeometry, #PxBoxGeometry and #PxConvexMeshGeometrypose0- Pose of the geometry object to sweepgeom1- The geometry object to test the sweep againstpose1- Pose of the geometry object to sweep againstsweepHit- The sweep hit information. Only valid if this method returns true.- Returns:
- True if the swept geometry object geom0 hits the object geom1
- See Also:
-
sweep
public static boolean sweep(PxVec3 unitDir, float maxDist, PxGeometry geom0, PxTransform pose0, PxGeometry geom1, PxTransform pose1, PxSweepHit sweepHit, PxHitFlags hitFlags) Sweep a specified geometry object in space and test for collision with a given object.The following combinations are supported.
\li PxSphereGeometry vs. {PxSphereGeometry, PxPlaneGeometry, PxCapsuleGeometry, PxBoxGeometry, PxConvexMeshGeometry, PxTriangleMeshGeometry, PxHeightFieldGeometry} \li PxCapsuleGeometry vs. {PxSphereGeometry, PxPlaneGeometry, PxCapsuleGeometry, PxBoxGeometry, PxConvexMeshGeometry, PxTriangleMeshGeometry, PxHeightFieldGeometry} \li PxBoxGeometry vs. {PxSphereGeometry, PxPlaneGeometry, PxCapsuleGeometry, PxBoxGeometry, PxConvexMeshGeometry, PxTriangleMeshGeometry, PxHeightFieldGeometry} \li PxConvexMeshGeometry vs. {PxSphereGeometry, PxPlaneGeometry, PxCapsuleGeometry, PxBoxGeometry, PxConvexMeshGeometry, PxTriangleMeshGeometry, PxHeightFieldGeometry}
- Parameters:
unitDir- Normalized direction along which object geom0 should be sweptmaxDist- Maximum sweep distance, has to be in the [0, inf) rangegeom0- The geometry object to sweep. Supported geometries are #PxSphereGeometry, #PxCapsuleGeometry, #PxBoxGeometry and #PxConvexMeshGeometrypose0- Pose of the geometry object to sweepgeom1- The geometry object to test the sweep againstpose1- Pose of the geometry object to sweep againstsweepHit- The sweep hit information. Only valid if this method returns true.hitFlags- Specify which properties per hit should be computed and written to result hit array. Combination of #PxHitFlag flags- Returns:
- True if the swept geometry object geom0 hits the object geom1
- See Also:
-
sweep
public static boolean sweep(PxVec3 unitDir, float maxDist, PxGeometry geom0, PxTransform pose0, PxGeometry geom1, PxTransform pose1, PxSweepHit sweepHit, PxHitFlags hitFlags, float inflation) Sweep a specified geometry object in space and test for collision with a given object.The following combinations are supported.
\li PxSphereGeometry vs. {PxSphereGeometry, PxPlaneGeometry, PxCapsuleGeometry, PxBoxGeometry, PxConvexMeshGeometry, PxTriangleMeshGeometry, PxHeightFieldGeometry} \li PxCapsuleGeometry vs. {PxSphereGeometry, PxPlaneGeometry, PxCapsuleGeometry, PxBoxGeometry, PxConvexMeshGeometry, PxTriangleMeshGeometry, PxHeightFieldGeometry} \li PxBoxGeometry vs. {PxSphereGeometry, PxPlaneGeometry, PxCapsuleGeometry, PxBoxGeometry, PxConvexMeshGeometry, PxTriangleMeshGeometry, PxHeightFieldGeometry} \li PxConvexMeshGeometry vs. {PxSphereGeometry, PxPlaneGeometry, PxCapsuleGeometry, PxBoxGeometry, PxConvexMeshGeometry, PxTriangleMeshGeometry, PxHeightFieldGeometry}
- Parameters:
unitDir- Normalized direction along which object geom0 should be sweptmaxDist- Maximum sweep distance, has to be in the [0, inf) rangegeom0- The geometry object to sweep. Supported geometries are #PxSphereGeometry, #PxCapsuleGeometry, #PxBoxGeometry and #PxConvexMeshGeometrypose0- Pose of the geometry object to sweepgeom1- The geometry object to test the sweep againstpose1- Pose of the geometry object to sweep againstsweepHit- The sweep hit information. Only valid if this method returns true.hitFlags- Specify which properties per hit should be computed and written to result hit array. Combination of #PxHitFlag flagsinflation- Surface of the swept shape is additively extruded in the normal direction, rounding corners and edges.- Returns:
- True if the swept geometry object geom0 hits the object geom1
- See Also:
-
overlap
public static boolean overlap(PxGeometry geom0, PxTransform pose0, PxGeometry geom1, PxTransform pose1) Overlap test for two geometry objects.All combinations are supported except: \li PxPlaneGeometry vs. {PxPlaneGeometry, PxTriangleMeshGeometry, PxHeightFieldGeometry} \li PxTriangleMeshGeometry vs. PxHeightFieldGeometry \li PxHeightFieldGeometry vs. PxHeightFieldGeometry \li Anything involving PxParticleSystemGeometry, PxTetrahedronMeshGeometry, or PxConvexCoreGeometry
- Parameters:
geom0- The first geometry objectpose0- Pose of the first geometry objectgeom1- The second geometry objectpose1- Pose of the second geometry object- Returns:
- True if the two geometry objects overlap
- See Also:
-
raycast
public static int raycast(PxVec3 origin, PxVec3 unitDir, PxGeometry geom, PxTransform pose, float maxDist, PxHitFlags hitFlags, int maxHits, PxRaycastHit rayHits) Raycast test against a geometry object.All geometry types are supported except PxParticleSystemGeometry and PxTetrahedronMeshGeometry.
- Parameters:
origin- The origin of the ray to test the geometry object againstunitDir- Normalized direction of the ray to test the geometry object againstgeom- The geometry object to test the ray againstpose- Pose of the geometry objectmaxDist- Maximum ray length, has to be in the [0, inf) rangehitFlags- Specification of the kind of information to retrieve on hit. Combination of #PxHitFlag flagsmaxHits- max number of returned hits = size of 'rayHits' bufferrayHits- Raycast hits information- Returns:
- Number of hits between the ray and the geometry object
- See Also:
-
pointDistance
Computes distance between a point and a geometry object.Currently supported geometry objects: box, sphere, capsule, convex, mesh.
Note: For meshes, only the BVH34 midphase data-structure is supported.
- Parameters:
point- The point Pgeom- The geometry objectpose- Pose of the geometry object- Returns:
- Square distance between the point and the geom object, or 0.0 if the point is inside the object, or -1.0 if an error occured (geometry type is not supported, or invalid pose)
- See Also:
-
pointDistance
public static float pointDistance(PxVec3 point, PxGeometry geom, PxTransform pose, PxVec3 closestPoint) Computes distance between a point and a geometry object.Currently supported geometry objects: box, sphere, capsule, convex, mesh.
Note: For meshes, only the BVH34 midphase data-structure is supported.
- Parameters:
point- The point Pgeom- The geometry objectpose- Pose of the geometry objectclosestPoint- Optionally returned closest point to P on the geom object. Only valid when returned distance is strictly positive.- Returns:
- Square distance between the point and the geom object, or 0.0 if the point is inside the object, or -1.0 if an error occured (geometry type is not supported, or invalid pose)
- See Also:
-
computeGeomBounds
computes the bounds for a geometry object- Parameters:
bounds- Returned computed boundsgeom- The geometry objectpose- Pose of the geometry object- See Also:
-
computeGeomBounds
public static void computeGeomBounds(PxBounds3 bounds, PxGeometry geom, PxTransform pose, float inflation) computes the bounds for a geometry object- Parameters:
bounds- Returned computed boundsgeom- The geometry objectpose- Pose of the geometry objectinflation- Scale factor for computed bounds. The geom's extents are multiplied by this value.- See Also:
-
isValid
Checks if provided geometry is valid.- Parameters:
geom- The geometry object.- Returns:
- True if geometry is valid.
- See Also:
-