Quantum 3 3.0.5

Classes | Public Member Functions | Properties | List of all members
Quantum.Physics3D.PhysicsEngine3D.Api Class Reference

3D Physics API More...

Classes

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

Public Member Functions

 Api (FrameBase frame, int threadCount)
 Initializes an Api object to provide the physics functions. More...
 
PhysicsQueryRef AddLinecastQuery (FPVector3 start, FPVector3 end, bool firstHitOnly=false, int layerMask=-1, QueryOptions options=QueryOptions.HitAll)
 Adds a broad-phase line cast query to the 3D physics scene. In order to be resolved, must be added from a system that runs prior to the Physics System. More...
 
PhysicsQueryRef AddOverlapShapeQuery (FPVector3 position, FPQuaternion rotation, Shape3D shape, int layerMask=-1, QueryOptions options=QueryOptions.HitAll)
 Adds a broad-phase shape overlap query to the 3D physics scene. In order to be resolved, must be added from a system that runs prior to the Physics System. More...
 
PhysicsQueryRef AddOverlapShapeQuery (Transform3D transform, Shape3D shape, int layerMask=-1, QueryOptions options=QueryOptions.HitAll)
 Adds a broad-phase shape overlap query to the 3D physics scene. In order to be resolved, must be added from a system that runs prior to the Physics System. More...
 
PhysicsQueryRef AddRaycastQuery (FPVector3 origin, FPVector3 direction, FP distance, bool firstHitOnly=false, int layerMask=-1, QueryOptions options=QueryOptions.HitAll)
 Adds a broad-phase ray cast query to the 3D physics scene. In order to be resolved, must be added from a system that runs prior to the Physics System. More...
 
PhysicsQueryRef AddShapeCastQuery (FPVector3 start, FPQuaternion rotation, Shape3D *shape, FPVector3 translation, bool firstHitOnly=false, int layerMask=-1, QueryOptions options=QueryOptions.HitAll)
 Adds a broad-phase shape cast query to the 3D physics scene. In order to be resolved, must be added from a system that runs prior to the Physics System. More...
 
PhysicsQueryRef AddShapeCastQuery (FPVector3 start, FPQuaternion rotation, Shape3D shape, FPVector3 translation, bool firstHitOnly=false, int layerMask=-1, QueryOptions options=QueryOptions.HitAll)
 
HitCollection3DAllocatePersistentHitCollection3D (int defaultCapacity=64)
 Allocates a persistent HitCollection3D on the heap with an initial capacity. To free an allocated persistent collection of 3D hits, use FreePersistentHitCollection3D. More...
 
bool CheckOverlap (HitCollection3D *hits, Shape3D *shape, Transform3D *transform, Hit3D *hit)
 Checks if the shape of the hit overlaps another shape and add the results in a HitCollection3D. More...
 
HitCollection3D CheckOverlap (Shape3D *shape, Transform3D *transform, Hit3D *hit)
 Checks if the shape of the hit overlaps another shape. More...
 
bool CheckOverlap (Shape3D.BoxShape boxShape, Transform3D *boxTransform, Shape3D.CapsuleShape capsuleShape, Transform3D *capsuleTransform, out CollisionResultInfo3D result)
 Checks if a box shape overlaps with a capsule shape. More...
 
bool CheckOverlap (Shape3D.BoxShape boxShape, Transform3D *boxTransform, Shape3D.SphereShape sphereShape, FPVector3 spherePosition, out CollisionResultInfo3D result)
 Checks if a box shape overlaps with a sphere shape. More...
 
bool CheckOverlap (Shape3D.BoxShape boxShape, Transform3D *boxTransform, TriangleCCW *tri, out CollisionResultInfo3D result)
 Checks if a box shape overlaps with a triangle. More...
 
bool CheckOverlap (Shape3D.BoxShape boxShapeA, Transform3D *transformA, Shape3D.BoxShape boxShapeB, Transform3D *transformB, out CollisionResultInfo3D result)
 Checks if a box shape overlaps with another box shape. More...
 
bool CheckOverlap (Shape3D.CapsuleShape capsuleShape, Transform3D *capsuleTransform, Shape3D.BoxShape boxShape, Transform3D *boxTransform, out CollisionResultInfo3D result)
 Checks if a capsule shape overlaps with a box shape. More...
 
bool CheckOverlap (Shape3D.CapsuleShape capsuleShape, Transform3D *capsuleTransform, Shape3D.SphereShape sphereShape, FPVector3 spherePosition, out CollisionResultInfo3D result)
 Checks if a capsule shape overlaps with a sphere shape. More...
 
bool CheckOverlap (Shape3D.CapsuleShape capsuleShape, Transform3D *capsuleTransform, TriangleCCW *tri, bool smoothSphereMeshCollision, out CollisionResultInfo3D result)
 Checks if a capsule shape overlaps with a triangle. More...
 
bool CheckOverlap (Shape3D.CapsuleShape capsuleShapeA, Transform3D *capsuleTransformA, Shape3D.CapsuleShape capsuleShapeB, Transform3D *capsuleTransformB, out CollisionResultInfo3D result)
 Checks if a capsule shape overlaps with another capsule shape. More...
 
bool CheckOverlap (Shape3D.SphereShape sphereShape, FPVector3 spherePosition, Shape3D.BoxShape boxShape, Transform3D *boxTransform, out CollisionResultInfo3D result)
 Checks if a sphere shape overlaps with a box shape. More...
 
bool CheckOverlap (Shape3D.SphereShape sphereShape, FPVector3 spherePosition, Shape3D.CapsuleShape capsuleShape, Transform3D *capsuleTransform, out CollisionResultInfo3D result)
 Checks if a sphere shape overlaps with a capsule shape. More...
 
bool CheckOverlap (Shape3D.SphereShape sphereShape, FPVector3 spherePosition, TriangleCCW *tri, bool smoothSphereMeshCollision, out CollisionResultInfo3D result)
 Checks if a sphere shape overlaps with a triangle. More...
 
bool CheckOverlap (Shape3D.SphereShape sphereShapeA, FPVector3 positionA, Shape3D.SphereShape sphereShapeB, FPVector3 positionB, out CollisionResultInfo3D result)
 Checks if a sphere shape overlaps with another sphere shape. More...
 
void FreePersistentHitCollection3D (HitCollection3D *collection)
 Free a persistent HitCollection3D previously allocated on the heap. To allocate a persistent collection of 3D hits, use AllocatePersistentHitCollection3D. More...
 
bool GetAllQueriesHits (out HitCollection3D *queriesHits, out int queriesCount)
 Gets all the results for all the broad-phase queries added to the 3D physics scene this frame. More...
 
CallbackFlags GetCallbacks (EntityRef entity)
 Get the flags that represent which 3D physics collision callbacks will be called for the entity . More...
 
HitCollection3D GetQueryHits (in PhysicsQueryRef queryRef)
 Gets the results of a broad-phase query added to the 3D physics scene. More...
 
HitCollection3D GetQueryHits (int index)
 Obsolete. Use 'GetQueryHits(in PhysicsQueryRef)' overload instead. More...
 
void Init ()
 Initializes the game scene and creates all the physics static entries using the settings from the map. More...
 
void Init (AssetRef< Map > mapRef)
 Initializes the game scene by cleaning all physics data and settings and create the new static physics entries for each static collider component in the mapRef . More...
 
bool IsStaticColliderEnabled (int staticColliderIndex)
 Returns the current state of a 3D static collider. More...
 
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)
 Queries the 3D physics scene with a line cast and returns the closest hit to the line start, if any. More...
 
void Linecast (HitCollection3D *collection, FPVector3 start, FPVector3 end, int layerMask=-1, QueryOptions options=QueryOptions.HitAll)
 Queries the 3D physics scene with a line cast and adds the closest hit to the line start, if any, to a persistent collection of hits. More...
 
HitCollection3D LinecastAll (FPVector3 start, FPVector3 end, int layerMask=-1, QueryOptions options=QueryOptions.HitAll)
 Queries the 3D physics scene with a line cast, returning all hits. More...
 
void LinecastAll (HitCollection3D *collection, FPVector3 start, FPVector3 end, int layerMask=-1, QueryOptions options=QueryOptions.HitAll)
 Queries the 3D physics scene with a line cast, returning all hits. More...
 
HitCollection3D OverlapShape (FPVector3 position, FPQuaternion rotation, Shape3D shape, int layerMask=-1, QueryOptions options=QueryOptions.HitAll)
 Queries the 3D physics scene with a shape overlap. More...
 
void OverlapShape (HitCollection3D *collection, FPVector3 position, FPQuaternion rotation, Shape3D shape, int layerMask=-1, QueryOptions options=QueryOptions.HitAll)
 Queries the 3D physics scene with a shape overlap. More...
 
void OverlapShape (HitCollection3D *collection, Transform3D transform, Shape3D shape, int layerMask=-1, QueryOptions options=QueryOptions.HitAll)
 Queries the 3D physics scene with a shape overlap. More...
 
HitCollection3D OverlapShape (Transform3D transform, Shape3D shape, int layerMask=-1, QueryOptions options=QueryOptions.HitAll)
 Queries the 3D physics scene with a shape overlap. More...
 
Hit3DRaycast (FPVector3 origin, FPVector3 direction, FP distance, int layerMask=-1, QueryOptions options=QueryOptions.HitAll)
 Queries the 3D physics scene with a ray cast and returns the closest hit to the ray origin, if any. More...
 
void Raycast (HitCollection3D *collection, FPVector3 origin, FPVector3 direction, FP distance, int layerMask=-1, QueryOptions options=QueryOptions.HitAll)
 Queries the 3D physics scene with a ray cast and adds the closest hit to the ray origin, if any, to a persistent collection of hits. More...
 
HitCollection3D RaycastAll (FPVector3 origin, FPVector3 direction, FP distance, int layerMask=-1, QueryOptions options=QueryOptions.HitAll)
 Queries the 3D physics scene with a ray cast, returning all hits. More...
 
void RaycastAll (HitCollection3D *collection, FPVector3 origin, FPVector3 direction, FP distance, int layerMask=-1, QueryOptions options=QueryOptions.HitAll)
 Queries the 3D physics scene with a ray cast, adding all hits to a persistent collection. More...
 
void ResetCallbacks (EntityRef entity)
 Resets the tracking history of collisions the entity might have. More...
 
void ResetMap ()
 Resets 3D physics scene map asset guid. More...
 
void ResetScene ()
 Resets the entries buffer and removes all the dynamic entries of the scene. Also, joints, queries and collision data are cleaned. The PhysicsCommon.MapPhysicsData is changed to default and the PhysicsSceneSettings is changed to initial state. More...
 
void SetCallbacks (EntityRef entity, CallbackFlags flags)
 Sets which 3D physics collision callbacks will be called for the entity . More...
 
void SetStaticColliderEnabled (int staticColliderIndex, bool enabled)
 Set a toggleable 3D static collider enabled state to enabled . Disabled static colliders are not considered for collisions or on query resolutions. More...
 
Hit3DShapeCast (FPVector3 start, FPQuaternion rotation, Shape3D *shape, FPVector3 translation, int layerMask=-1, QueryOptions options=QueryOptions.HitAll)
 Queries the 3D physics scene with a shape cast and returns the hit with the smallest Hit3D.CastDistanceNormalized, if any. More...
 
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)
 Queries the 3D physics scene with a shape cast and adds the hit with the shortest Hit3D.CastDistanceNormalized, if any, to a persistent collection of hits. More...
 
HitCollection3D ShapeCastAll (FPVector3 start, FPQuaternion rotation, Shape3D *shape, FPVector3 translation, int layerMask=-1, QueryOptions options=QueryOptions.HitAll)
 Queries the 3D physics scene with a shape cast, returning all hits. More...
 
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)
 Queries the 3D physics scene with a shape cast, adding all hits to a persistent collection. More...
 
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...
 
TaskHandle Update (ICollisionCallbacks3D callbacks, FP dt, TaskHandle taskHandle)
 Schedules all tasks that compose the 3D Physics Update loop. If the frame map changed, the static part of the physics engine is also reset. More...
 

Properties

Map Map [get]
 Retrieves the map asset currently used on the physics scene. More...
 
TriangleMesh SceneMesh [get]
 Returns the TriangleMesh data for static meshes. More...
 

Detailed Description

3D Physics API

Constructor & Destructor Documentation

◆ Api()

Quantum.Physics3D.PhysicsEngine3D.Api.Api ( FrameBase  frame,
int  threadCount 
)
inline

Initializes an Api object to provide the physics functions.

Parameters
frameThe reference of a frame.
threadCountThe number of threads.

Member Function Documentation

◆ GetCallbacks()

CallbackFlags Quantum.Physics3D.PhysicsEngine3D.Api.GetCallbacks ( EntityRef  entity)
inline

Get the flags that represent which 3D physics collision callbacks will be called for the entity .

The entity must have a PhysicsCollider3D component attached to be able to collide with other physics entries.

To modify the callbacks, use SetCallbacks.

Parameters
entityThe entity from which to get the callback flags.
Returns
The callback flags set to a given entity. Default if the entity did not have callback flags set.

◆ ResetCallbacks()

void Quantum.Physics3D.PhysicsEngine3D.Api.ResetCallbacks ( EntityRef  entity)
inline

Resets the tracking history of collisions the entity might have.

◆ Init() [1/2]

void Quantum.Physics3D.PhysicsEngine3D.Api.Init ( )
inline

Initializes the game scene and creates all the physics static entries using the settings from the map.

◆ Init() [2/2]

void Quantum.Physics3D.PhysicsEngine3D.Api.Init ( AssetRef< Map mapRef)
inline

Initializes the game scene by cleaning all physics data and settings and create the new static physics entries for each static collider component in the mapRef .

Parameters
mapRefThe Map asset for loading static collider data and other physics settings.

◆ ResetScene()

void Quantum.Physics3D.PhysicsEngine3D.Api.ResetScene ( )
inline

Resets the entries buffer and removes all the dynamic entries of the scene. Also, joints, queries and collision data are cleaned. The PhysicsCommon.MapPhysicsData is changed to default and the PhysicsSceneSettings is changed to initial state.

◆ Update()

TaskHandle Quantum.Physics3D.PhysicsEngine3D.Api.Update ( ICollisionCallbacks3D  callbacks,
FP  dt,
TaskHandle  taskHandle 
)
inline

Schedules all tasks that compose the 3D Physics Update loop. If the frame map changed, the static part of the physics engine is also reset.

Parameters
callbacksA listener of physics collision callbacks.
dtDelta-time of the physics update loop
taskHandleHandle of the last task scheduled in the graph.
Returns
The task handle of the last task scheduled by the physics engine.

◆ ResetMap()

void Quantum.Physics3D.PhysicsEngine3D.Api.ResetMap ( )
inline

Resets 3D physics scene map asset guid.

◆ GetQueryHits()

HitCollection3D Quantum.Physics3D.PhysicsEngine3D.Api.GetQueryHits ( int  index)
inline

Obsolete. Use 'GetQueryHits(in PhysicsQueryRef)' overload instead.

◆ TryGetQueryHits()

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

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

◆ CheckOverlap() [1/14]

bool Quantum.Physics3D.PhysicsEngine3D.Api.CheckOverlap ( HitCollection3D hits,
Shape3D shape,
Transform3D transform,
Hit3D hit 
)
inline

Checks if the shape of the hit overlaps another shape and add the results in a HitCollection3D.

Parameters
hitsA previously allocated persistent HitCollection3D, to which the query hits will be added. For allocating a persistent HitCollection, see AllocatePersistentHitCollection3D.
shapeThe 3D shape to be overlapped.
transformA 3D transform component pointer, with Position and Rotation info of the shape overlap.
hitA 3D hit as reference to an entity that has shape and transform to be overlapped.
Returns
Return if the shapes are in overlap.

◆ CheckOverlap() [2/14]

HitCollection3D Quantum.Physics3D.PhysicsEngine3D.Api.CheckOverlap ( Shape3D shape,
Transform3D transform,
Hit3D hit 
)
inline

Checks if the shape of the hit overlaps another shape.

Parameters
shapeThe 3D shape to be overlapped.
transformA 3D transform component pointer, with Position and Rotation info of the shape overlap.
hitA 3D hit as reference to an entity that has shape and transform to be overlapped
Returns
A temporary HitCollection3D with the query hits, automatically freed when the current frame simulation ends.

◆ CheckOverlap() [3/14]

bool Quantum.Physics3D.PhysicsEngine3D.Api.CheckOverlap ( Shape3D.SphereShape  sphereShapeA,
FPVector3  positionA,
Shape3D.SphereShape  sphereShapeB,
FPVector3  positionB,
out CollisionResultInfo3D  result 
)
inline

Checks if a sphere shape overlaps with another sphere shape.

Parameters
sphereShapeAThe 3D sphere shape to be overlapped.
positionAThe position in which the sphere shape is overlapped.
sphereShapeBThe 3D shape that will overlap.
positionBThe position at which the sphere shape will overlap.
resultA CollisionResultInfo3D struct that contains the penetration, normal and computed contact points.
Returns
Return if the shapes are in overlap.

◆ CheckOverlap() [4/14]

bool Quantum.Physics3D.PhysicsEngine3D.Api.CheckOverlap ( Shape3D.SphereShape  sphereShape,
FPVector3  spherePosition,
Shape3D.BoxShape  boxShape,
Transform3D boxTransform,
out CollisionResultInfo3D  result 
)
inline

Checks if a sphere shape overlaps with a box shape.

Parameters
sphereShapeThe 3D sphere shape to be overlapped.
spherePositionThe position in which the sphere shape is overlapped.
boxShapeThe 3D box shape that will overlap.
boxTransformA 3D transform component pointer, with Position and Rotation info of the box shape that will overlap.
resultA CollisionResultInfo3D struct that contains the penetration, normal and computed contact points.
Returns
Return if the shapes are in overlap.

◆ CheckOverlap() [5/14]

bool Quantum.Physics3D.PhysicsEngine3D.Api.CheckOverlap ( Shape3D.BoxShape  boxShape,
Transform3D boxTransform,
Shape3D.SphereShape  sphereShape,
FPVector3  spherePosition,
out CollisionResultInfo3D  result 
)
inline

Checks if a box shape overlaps with a sphere shape.

Parameters
boxShapeThe 3D box shape to be overlapped.
boxTransformA 3D transform component pointer, with Position and Rotation info of the overlapped box shape.
sphereShapeThe 3D sphere shape that will overlap.
spherePositionThe position at which the sphere shape will overlap.
resultA CollisionResultInfo3D struct that contains the penetration, normal and computed contact points.
Returns
Return if the shapes are in overlap.

◆ CheckOverlap() [6/14]

bool Quantum.Physics3D.PhysicsEngine3D.Api.CheckOverlap ( Shape3D.SphereShape  sphereShape,
FPVector3  spherePosition,
Shape3D.CapsuleShape  capsuleShape,
Transform3D capsuleTransform,
out CollisionResultInfo3D  result 
)
inline

Checks if a sphere shape overlaps with a capsule shape.

Parameters
sphereShapeThe 3D sphere shape to be overlapped.
spherePositionThe position in which the sphere shape is overlapped.
capsuleShapeThe 3D capsule shape that will overlap.
capsuleTransformA 3D transform component pointer, with Position and Rotation info of the capsule shape that will overlap.
resultA CollisionResultInfo3D struct that contains the penetration, normal and computed contact points.
Returns
Return if the shapes are in overlap.

◆ CheckOverlap() [7/14]

bool Quantum.Physics3D.PhysicsEngine3D.Api.CheckOverlap ( Shape3D.CapsuleShape  capsuleShape,
Transform3D capsuleTransform,
Shape3D.SphereShape  sphereShape,
FPVector3  spherePosition,
out CollisionResultInfo3D  result 
)
inline

Checks if a capsule shape overlaps with a sphere shape.

Parameters
capsuleShapeThe 3D capsule shape to be overlapped.
capsuleTransformA 3D transform component pointer, with Position and Rotation info of the overlapped capsule shape.
sphereShapeThe 3D sphere shape that will overlap.
spherePositionThe position at which the sphere shape will overlap.
resultA CollisionResultInfo3D struct that contains the penetration, normal and computed contact points.
Returns
Return if the shapes are in overlap.

◆ CheckOverlap() [8/14]

bool Quantum.Physics3D.PhysicsEngine3D.Api.CheckOverlap ( Shape3D.SphereShape  sphereShape,
FPVector3  spherePosition,
TriangleCCW *  tri,
bool  smoothSphereMeshCollision,
out CollisionResultInfo3D  result 
)
inline

Checks if a sphere shape overlaps with a triangle.

Parameters
sphereShapeThe 3D sphere shape to be overlapped.
spherePositionThe position in which the sphere shape is overlapped.
triThe triangle that will overlap.
smoothSphereMeshCollisionIf true, the normal of the collision will aways be the triangle face up normal.
resultA CollisionResultInfo3D struct that contains the penetration, normal and computed contact points.
Returns
Return if the shapes are in overlap.

◆ CheckOverlap() [9/14]

bool Quantum.Physics3D.PhysicsEngine3D.Api.CheckOverlap ( Shape3D.BoxShape  boxShapeA,
Transform3D transformA,
Shape3D.BoxShape  boxShapeB,
Transform3D transformB,
out CollisionResultInfo3D  result 
)
inline

Checks if a box shape overlaps with another box shape.

Parameters
boxShapeAThe 3D box shape to be overlapped.
transformAA 3D transform component pointer, with Position and Rotation info of the overlapped box shape.
boxShapeBThe 3D box shape that will overlap.
transformBA 3D transform component pointer, with Position and Rotation info of the box shape that will overlap.
resultA CollisionResultInfo3D struct that contains the penetration, normal and computed contact points.
Returns
Return if the shapes are in overlap.

◆ CheckOverlap() [10/14]

bool Quantum.Physics3D.PhysicsEngine3D.Api.CheckOverlap ( Shape3D.BoxShape  boxShape,
Transform3D boxTransform,
Shape3D.CapsuleShape  capsuleShape,
Transform3D capsuleTransform,
out CollisionResultInfo3D  result 
)
inline

Checks if a box shape overlaps with a capsule shape.

Parameters
boxShapeThe 3D box shape to be overlapped.
boxTransformA 3D transform component pointer, with Position and Rotation info of the overlapped box shape.
capsuleShapeThe 3D capsule shape that will overlap.
capsuleTransformA 3D transform component pointer, with Position and Rotation info of the capsule shape that will overlap.
resultA CollisionResultInfo3D struct that contains the penetration, normal and computed contact points.
Returns
Return if the shapes are in overlap.

◆ CheckOverlap() [11/14]

bool Quantum.Physics3D.PhysicsEngine3D.Api.CheckOverlap ( Shape3D.CapsuleShape  capsuleShape,
Transform3D capsuleTransform,
Shape3D.BoxShape  boxShape,
Transform3D boxTransform,
out CollisionResultInfo3D  result 
)
inline

Checks if a capsule shape overlaps with a box shape.

Parameters
capsuleShapeThe 3D capsule shape to be overlapped.
capsuleTransformA 3D transform component pointer, with Position and Rotation info of the overlapped capsule shape.
boxShapeThe 3D box shape that will overlap.
boxTransformA 3D transform component pointer, with Position and Rotation info of the box shape that will overlap.
resultA CollisionResultInfo3D struct that contains the penetration, normal and computed contact points.
Returns
Return if the shapes are in overlap.

◆ CheckOverlap() [12/14]

bool Quantum.Physics3D.PhysicsEngine3D.Api.CheckOverlap ( Shape3D.BoxShape  boxShape,
Transform3D boxTransform,
TriangleCCW *  tri,
out CollisionResultInfo3D  result 
)
inline

Checks if a box shape overlaps with a triangle.

Parameters
boxShapeThe 3D box shape to be overlapped.
boxTransformThe position in which the box shape is overlapped.
triThe triangle that will overlap.
resultA CollisionResultInfo3D struct that contains the penetration, normal and computed contact points.
Returns
Return if the shapes are in overlap.

◆ CheckOverlap() [13/14]

bool Quantum.Physics3D.PhysicsEngine3D.Api.CheckOverlap ( Shape3D.CapsuleShape  capsuleShapeA,
Transform3D capsuleTransformA,
Shape3D.CapsuleShape  capsuleShapeB,
Transform3D capsuleTransformB,
out CollisionResultInfo3D  result 
)
inline

Checks if a capsule shape overlaps with another capsule shape.

Parameters
capsuleShapeAThe 3D capsule shape to be overlapped.
capsuleTransformAA 3D transform component pointer, with Position and Rotation info of the overlapped capsule shape.
capsuleShapeBThe 3D capsule shape that will overlap.
capsuleTransformBA 3D transform component pointer, with Position and Rotation info of the capsule shape that will overlap.
resultA CollisionResultInfo3D struct that contains the penetration, normal and computed contact points.
Returns
Return if the shapes are in overlap.

◆ CheckOverlap() [14/14]

bool Quantum.Physics3D.PhysicsEngine3D.Api.CheckOverlap ( Shape3D.CapsuleShape  capsuleShape,
Transform3D capsuleTransform,
TriangleCCW *  tri,
bool  smoothSphereMeshCollision,
out CollisionResultInfo3D  result 
)
inline

Checks if a capsule shape overlaps with a triangle.

Parameters
capsuleShapeThe 3D capsule shape to be overlapped.
capsuleTransformThe position in which the capsule shape is overlapped.
triThe triangle that will overlap.
smoothSphereMeshCollisionIf true, the normal of the collision will aways be the triangle face up normal.
resultA CollisionResultInfo3D struct that contains the penetration, normal and computed contact points.
Returns
Return if the shapes are in overlap.

◆ SetStaticColliderEnabled()

void Quantum.Physics3D.PhysicsEngine3D.Api.SetStaticColliderEnabled ( int  staticColliderIndex,
bool  enabled 
)
inline

Set a toggleable 3D static collider enabled state to enabled . Disabled static colliders are not considered for collisions or on query resolutions.

The static collider state is only changed on Verified frames.

Parameters
staticColliderIndexThe index of the collider in the Map StaticColliders3D array.
enabledIf the static should be enabled (true) or disabled (false).
Exceptions
InvalidOperationExceptionIf the static collider is baked as Immutable.
ArgumentOutOfRangeExceptionIf the provided staticColliderIndex is not in the range of static colliders loaded in the current Physics static scene.

◆ IsStaticColliderEnabled()

bool Quantum.Physics3D.PhysicsEngine3D.Api.IsStaticColliderEnabled ( int  staticColliderIndex)
inline

Returns the current state of a 3D static collider.

Parameters
staticColliderIndexThe index of the collider in the Map StaticColliders3D array.
Returns
false if the static is not Immutable and is currently disabled, true otherwise.
Exceptions
ArgumentOutOfRangeExceptionIf the provided staticColliderIndex is not in the range of static colliders loaded in the current Physics static scene.

Property Documentation

◆ Map

Map Quantum.Physics3D.PhysicsEngine3D.Api.Map
get

Retrieves the map asset currently used on the physics scene.

The map currently used by the physics scene is only updated during verified simulations, so this map can be different from the frame Map during predictions, when the latter is changed.

◆ SceneMesh

TriangleMesh Quantum.Physics3D.PhysicsEngine3D.Api.SceneMesh
get

Returns the TriangleMesh data for static meshes.

///