Quantum 3 3.0.10

Public Member Functions | Properties | List of all members
Quantum.Physics3D.PhysicsEngine3D.Api.ThreadSafeApi Struct Reference

Struct to provide thread-safe access to the physics functions. More...

Public Member Functions

HitCollection3DAllocatePersistentHitCollection3D (int defaultCapacity=64)
 
bool CheckOverlap (HitCollection3D *hits, Shape3D *shapeA, Transform3D *transformA, Hit3D *hit)
 
HitCollection3D CheckOverlap (Shape3D *shapeA, Transform3D *transformA, Hit3D *hit)
 
bool CheckOverlap (Shape3D.BoxShape boxShape, Transform3D *boxTransform, Shape3D.CapsuleShape capsuleShape, Transform3D *capsuleTransform, out CollisionResultInfo3D result)
 
bool CheckOverlap (Shape3D.BoxShape boxShape, Transform3D *boxTransform, Shape3D.SphereShape sphereShape, FPVector3 spherePosition, out CollisionResultInfo3D result)
 
bool CheckOverlap (Shape3D.BoxShape boxShape, Transform3D *boxTransform, TriangleCCW *tri, out CollisionResultInfo3D result)
 
bool CheckOverlap (Shape3D.BoxShape boxShapeA, Transform3D *transformA, Shape3D.BoxShape boxShapeB, Transform3D *transformB, out CollisionResultInfo3D result)
 
bool CheckOverlap (Shape3D.CapsuleShape capsuleShape, Transform3D *capsuleTransform, Shape3D.BoxShape boxShape, Transform3D *boxTransform, out CollisionResultInfo3D result)
 
bool CheckOverlap (Shape3D.CapsuleShape capsuleShape, Transform3D *capsuleTransform, Shape3D.SphereShape sphereShape, FPVector3 spherePosition, out CollisionResultInfo3D result)
 
bool CheckOverlap (Shape3D.CapsuleShape capsuleShape, Transform3D *cpasuleTransform, TriangleCCW *tri, bool smoothSphereMeshCollision, out CollisionResultInfo3D result)
 
bool CheckOverlap (Shape3D.CapsuleShape capsuleShapeA, Transform3D *capsuleTransformA, Shape3D.CapsuleShape capsuleShapeB, Transform3D *capsuleTransformB, out CollisionResultInfo3D result)
 
bool CheckOverlap (Shape3D.SphereShape shapeA, FPVector3 positionA, Shape3D.SphereShape shapeB, FPVector3 positionB, out CollisionResultInfo3D result)
 
bool CheckOverlap (Shape3D.SphereShape sphereShape, FPVector3 spherePosition, Shape3D.BoxShape boxShape, Transform3D *boxTransform, out CollisionResultInfo3D result)
 
bool CheckOverlap (Shape3D.SphereShape sphereShape, FPVector3 spherePosition, Shape3D.CapsuleShape capsuleShape, Transform3D *capsuleTransform, out CollisionResultInfo3D result)
 
bool CheckOverlap (Shape3D.SphereShape sphereShape, FPVector3 spherePosition, TriangleCCW *tri, bool smoothSphereMeshCollision, out CollisionResultInfo3D result)
 
void FreePersistentHitCollection3D (HitCollection3D *collection)
 
bool GetAllQueriesHits (out HitCollection3D *queriesHits, out int queriesCount)
 
CallbackFlags GetCallbacks (EntityRef entity)
 
HitCollection3D GetQueryHits (in PhysicsQueryRef queryRef)
 Gets the results of a broad-phase query added to the 3D physics scene. More...
 
HitCollection3D GetQueryHits (int index)
 
bool IsValidQueryRef (in PhysicsQueryRef queryRef)
 Checks if a given broad-phase physics query reference is valid for result retrieval. Broad-phase queries must be injected before the Physics system Update, their Ref stored and the results retrieved after the Physics Update, on the same frame. More...
 
Hit3DLinecast (FPVector3 start, FPVector3 end, int layerMask=-1, QueryOptions options=QueryOptions.HitAll)
 
void Linecast (HitCollection3D *collection, FPVector3 start, FPVector3 end, int layerMask=-1, QueryOptions options=QueryOptions.HitAll)
 
HitCollection3D LinecastAll (FPVector3 start, FPVector3 end, int layerMask=-1, QueryOptions options=QueryOptions.HitAll)
 
void LinecastAll (HitCollection3D *collection, FPVector3 start, FPVector3 end, int layerMask=-1, QueryOptions options=QueryOptions.HitAll)
 
HitCollection3D OverlapShape (FPVector3 position, FPQuaternion rotation, Shape3D shape, int layerMask=-1, QueryOptions options=QueryOptions.HitAll)
 
void OverlapShape (HitCollection3D *collection, FPVector3 position, FPQuaternion rotation, Shape3D shape, int layerMask=-1, QueryOptions options=QueryOptions.HitAll)
 
void OverlapShape (HitCollection3D *collection, Transform3D transform, Shape3D shape, int layerMask=-1, QueryOptions options=QueryOptions.HitAll)
 
HitCollection3D OverlapShape (Transform3D transform, Shape3D shape, int layerMask=-1, QueryOptions options=QueryOptions.HitAll)
 
Hit3DRaycast (FPVector3 origin, FPVector3 direction, FP distance, int layerMask=-1, QueryOptions options=QueryOptions.HitAll)
 
void Raycast (HitCollection3D *collection, FPVector3 origin, FPVector3 direction, FP distance, int layerMask=-1, QueryOptions options=QueryOptions.HitAll)
 
HitCollection3D RaycastAll (FPVector3 origin, FPVector3 direction, FP distance, int layerMask=-1, QueryOptions options=QueryOptions.HitAll)
 
void RaycastAll (HitCollection3D *collection, FPVector3 origin, FPVector3 direction, FP distance, int layerMask=-1, QueryOptions options=QueryOptions.HitAll)
 
Hit3DShapeCast (FPVector3 start, FPQuaternion rotation, Shape3D *shape, FPVector3 translation, int layerMask=-1, QueryOptions options=QueryOptions.HitAll)
 
Hit3DShapeCast (FPVector3 start, FPQuaternion rotation, Shape3D shape, FPVector3 translation, int layerMask=-1, QueryOptions options=QueryOptions.HitAll)
 
void ShapeCast (HitCollection3D *collection, FPVector3 start, FPQuaternion rotation, Shape3D *shape, FPVector3 translation, int layerMask=-1, QueryOptions options=QueryOptions.HitAll)
 
HitCollection3D ShapeCastAll (FPVector3 start, FPQuaternion rotation, Shape3D *shape, FPVector3 translation, int layerMask=-1, QueryOptions options=QueryOptions.HitAll)
 
HitCollection3D ShapeCastAll (FPVector3 start, FPQuaternion rotation, Shape3D shape, FPVector3 translation, int layerMask=-1, QueryOptions options=QueryOptions.HitAll)
 
void ShapeCastAll (HitCollection3D *collection, FPVector3 start, FPQuaternion rotation, Shape3D *shape, FPVector3 translation, int layerMask=-1, QueryOptions options=QueryOptions.HitAll)
 
bool TryGetQueryHits (in PhysicsQueryRef queryRef, out HitCollection3D queryHits)
 Tries to get the results of a broad-phase query added to the 3D physics scene. More...
 
bool TryGetQueryHits (int index, out HitCollection3D queryHits)
 Obsolete. Use 'TryGetQueryHits(in PhysicsQueryRef, out HitCollection3D)' overload instead. More...
 

Properties

readonly Map Map [get]
 
readonly TriangleMeshSceneMesh [get]
 

Detailed Description

Struct to provide thread-safe access to the physics functions.

Member Function Documentation

◆ IsValidQueryRef()

bool Quantum.Physics3D.PhysicsEngine3D.Api.ThreadSafeApi.IsValidQueryRef ( in PhysicsQueryRef  queryRef)
inline

Checks if a given broad-phase physics query reference is valid for result retrieval. Broad-phase queries must be injected before the Physics system Update, their Ref stored and the results retrieved after the Physics Update, on the same frame.

Parameters
queryRefThe query ref to be checked.
Returns
true if the query ref is valid and query results can be retrieved from it this frame. false otherwise.

◆ GetQueryHits()

HitCollection3D Quantum.Physics3D.PhysicsEngine3D.Api.ThreadSafeApi.GetQueryHits ( in PhysicsQueryRef  queryRef)
inline

Gets the results of a broad-phase query added to the 3D physics scene.

Parameters
queryRefBroad-phase Query reference. Returned when adding a broad-phase query to the physics engine.
Returns
A HitCollection3D with the query hits.

◆ TryGetQueryHits() [1/2]

bool Quantum.Physics3D.PhysicsEngine3D.Api.ThreadSafeApi.TryGetQueryHits ( int  index,
out HitCollection3D  queryHits 
)
inline

Obsolete. Use 'TryGetQueryHits(in PhysicsQueryRef, out HitCollection3D)' overload instead.

◆ TryGetQueryHits() [2/2]

bool Quantum.Physics3D.PhysicsEngine3D.Api.ThreadSafeApi.TryGetQueryHits ( in PhysicsQueryRef  queryRef,
out HitCollection3D  queryHits 
)
inline

Tries to get the results of a broad-phase query added to the 3D physics scene.

Parameters
queryRefBroad-phase Query reference. Returned when adding a broad-phase query to the physics engine.
queryHitsThe HitCollection3D with the query hits. Default if the index is not valid.
Returns
true if the index is valid, false otherwise.