Quantum 3 3.0.11

Public Member Functions | Properties | List of all members
Quantum.Physics2D.PhysicsEngine2D.Api.ThreadSafeApi Struct Reference

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

Public Member Functions

HitCollectionAllocatePersistentHitCollection (int defaultCapacity=64)
 
bool CheckOverlap (HitCollection *hits, Shape2D *shapeA, Transform2D *transformA, Hit *hit)
 
HitCollection CheckOverlap (Shape2D *shapeA, Transform2D *transformA, Hit *hit)
 
bool CheckOverlap (Shape2D.BoxShape boxShape, Shape2D.CapsuleShape capsuleShape, Transform2D *boxTransform, Transform2D *capsuleTransform, out CollisionResultInfo2D result)
 Obsolete. Use the CheckOverlap(Shape2D.BoxShape, Transform2D*, Shape2D.CapsuleShape, Transform2D*, out CollisionResultInfo2D) overload instead. More...
 
bool CheckOverlap (Shape2D.BoxShape boxShape, Transform2D *boxTransform, Shape2D.CapsuleShape capsuleShape, Transform2D *capsuleTransform, out CollisionResultInfo2D result)
 
bool CheckOverlap (Shape2D.BoxShape boxShape, Transform2D *boxTransform, Shape2D.CircleShape circleShape, FPVector2 circlePosition, out CollisionResultInfo2D result)
 
bool CheckOverlap (Shape2D.BoxShape boxShape, Transform2D *boxTransform, Shape2D.EdgeShape edgeShape, Transform2D *edgeTransform, out CollisionResultInfo2D result)
 
bool CheckOverlap (Shape2D.BoxShape boxShape, Transform2D *boxTransform, Shape2D.PolygonShape polygonShape, Transform2D *polygonTransform, out CollisionResultInfo2D result)
 
bool CheckOverlap (Shape2D.BoxShape boxShapeA, Transform2D *transformA, Shape2D.BoxShape boxShapeB, Transform2D *transformB, out CollisionResultInfo2D result)
 
bool CheckOverlap (Shape2D.CapsuleShape capsuleShape, Shape2D.BoxShape boxShape, Transform2D *capsuleTransform, Transform2D *boxTransform, out CollisionResultInfo2D result)
 Obsolete. Use the CheckOverlap(Shape2D.CapsuleShape, Transform2D*, Shape2D.BoxShape, Transform2D*, out CollisionResultInfo2D) overload instead. More...
 
bool CheckOverlap (Shape2D.CapsuleShape capsuleShape, Shape2D.CircleShape circleShape, Transform2D *capsuleTransform, FPVector2 circlePosition, out CollisionResultInfo2D result)
 Obsolete. Use the CheckOverlap(Shape2D.CapsuleShape, Transform2D*, Shape2D.CircleShape, FPVector2, out CollisionResultInfo2D) overload instead. More...
 
bool CheckOverlap (Shape2D.CapsuleShape capsuleShape, Transform2D *capsuleTransform, Shape2D.BoxShape boxShape, Transform2D *boxTransform, out CollisionResultInfo2D result)
 
bool CheckOverlap (Shape2D.CapsuleShape capsuleShape, Transform2D *capsuleTransform, Shape2D.CircleShape circleShape, FPVector2 circlePosition, out CollisionResultInfo2D result)
 
bool CheckOverlap (Shape2D.CapsuleShape capsuleShape, Transform2D *capsuleTransform, Shape2D.EdgeShape edgeShape, Transform2D *edgeTransform, out CollisionResultInfo2D result)
 
bool CheckOverlap (Shape2D.CapsuleShape capsuleShape, Transform2D *capsuleTransform, Shape2D.PolygonShape polygonShape, Transform2D *polygonTransform, out CollisionResultInfo2D result)
 
bool CheckOverlap (Shape2D.CapsuleShape capsuleShapeA, Shape2D.CapsuleShape capsuleShapeB, Transform2D *capsuleTransformA, Transform2D *capsuleTransformB, out CollisionResultInfo2D result)
 Obsolete. Use the CheckOverlap(Shape2D.CapsuleShape, Transform2D*, Shape2D.CapsuleShape, Transform2D*, out CollisionResultInfo2D) overload instead. More...
 
bool CheckOverlap (Shape2D.CapsuleShape capsuleShapeA, Transform2D *capsuleTransformA, Shape2D.CapsuleShape capsuleShapeB, Transform2D *capsuleTransformB, out CollisionResultInfo2D result)
 
bool CheckOverlap (Shape2D.CircleShape circleShape, FPVector2 circlePosition, Shape2D.BoxShape boxShape, Transform2D *boxTransform, out CollisionResultInfo2D result)
 
bool CheckOverlap (Shape2D.CircleShape circleShape, FPVector2 circlePosition, Shape2D.CapsuleShape capsuleShape, Transform2D *capsuleTransform, out CollisionResultInfo2D result)
 
bool CheckOverlap (Shape2D.CircleShape circleShape, FPVector2 circlePosition, Shape2D.EdgeShape edgeShape, Transform2D *edgeTransform, out CollisionResultInfo2D result)
 
bool CheckOverlap (Shape2D.CircleShape circleShape, FPVector2 circlePosition, Shape2D.PolygonShape polygonShape, Transform2D *polygonTransform, out CollisionResultInfo2D result)
 
bool CheckOverlap (Shape2D.CircleShape shapeA, FPVector2 positionA, Shape2D.CircleShape shapeB, FPVector2 positionB, out CollisionResultInfo2D result)
 
bool CheckOverlap (Shape2D.EdgeShape edgeShape, Transform2D *edgeTransform, Shape2D.BoxShape boxShape, Transform2D *boxTransform, out CollisionResultInfo2D result)
 
bool CheckOverlap (Shape2D.EdgeShape edgeShape, Transform2D *edgeTransform, Shape2D.CapsuleShape capsuleShape, Transform2D *capsuleTransform, out CollisionResultInfo2D result)
 
bool CheckOverlap (Shape2D.EdgeShape edgeShape, Transform2D *edgeTransform, Shape2D.CircleShape circleShape, FPVector2 circlePosition, out CollisionResultInfo2D result)
 
bool CheckOverlap (Shape2D.EdgeShape edgeShape, Transform2D *edgeTransform, Shape2D.PolygonShape polygonShape, Transform2D *polygonTransform, out CollisionResultInfo2D result)
 
bool CheckOverlap (Shape2D.EdgeShape edgeShapeA, Transform2D *edgeTransformA, Shape2D.EdgeShape edgeShapeB, Transform2D *edgeTransformB, out CollisionResultInfo2D result)
 
bool CheckOverlap (Shape2D.PolygonShape polygonAssetA, Transform2D *transformA, Shape2D.PolygonShape polygonAssetB, Transform2D *transformB, out CollisionResultInfo2D result)
 
void FreePersistentHitCollection (HitCollection *collection)
 
bool GetAllQueriesHits (out HitCollection *queriesHits, out int queriesCount)
 
CallbackFlags GetCallbacks (EntityRef entity)
 
HitCollection GetQueryHits (in PhysicsQueryRef queryRef)
 Gets the results of a broad-phase query added to the 2D physics scene. More...
 
HitCollection 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...
 
HitLinecast (FPVector2 start, FPVector2 end, int layerMask=-1, QueryOptions options=QueryOptions.HitAll, FP verticalPosition=default, FP verticalHeight=default)
 
void Linecast (HitCollection *collection, FPVector2 start, FPVector2 end, int layerMask=-1, QueryOptions options=QueryOptions.HitAll, FP verticalPosition=default, FP verticalHeight=default)
 
HitCollection LinecastAll (FPVector2 start, FPVector2 end, int layerMask=-1, QueryOptions options=QueryOptions.HitAll, FP verticalPosition=default, FP verticalHeight=default)
 
void LinecastAll (HitCollection *collection, FPVector2 start, FPVector2 end, int layerMask=-1, QueryOptions options=QueryOptions.HitAll, FP verticalPosition=default, FP verticalHeight=default)
 
HitCollection OverlapShape (FPVector2 position, FP rotation, Shape2D shape, int layerMask=-1, QueryOptions options=QueryOptions.HitAll, FP verticalPosition=default, FP verticalHeight=default)
 
void OverlapShape (HitCollection *collection, FPVector2 position, FP rotation, Shape2D shape, int layerMask=-1, QueryOptions options=QueryOptions.HitAll, FP verticalPosition=default, FP verticalHeight=default)
 
void OverlapShape (HitCollection *collection, Transform2D transform, Shape2D shape, int layerMask=-1, QueryOptions options=QueryOptions.HitAll)
 
void OverlapShape (HitCollection *collection, Transform2D transform, Transform2DVertical transformVertical, Shape2D shape, int layerMask=-1, QueryOptions options=QueryOptions.HitAll)
 
HitCollection OverlapShape (Transform2D transform, Shape2D shape, int layerMask=-1, QueryOptions options=QueryOptions.HitAll)
 
HitCollection OverlapShape (Transform2D transform, Transform2DVertical transformVertical, Shape2D shape, int layerMask=-1, QueryOptions options=QueryOptions.HitAll)
 
HitRaycast (FPVector2 origin, FPVector2 direction, FP distance, int layerMask=-1, QueryOptions options=QueryOptions.HitAll, FP verticalPosition=default, FP verticalHeight=default)
 
void Raycast (HitCollection *collection, FPVector2 origin, FPVector2 direction, FP distance, int layerMask=-1, QueryOptions options=QueryOptions.HitAll, FP verticalPosition=default, FP verticalHeight=default)
 
HitCollection RaycastAll (FPVector2 origin, FPVector2 direction, FP distance, int layerMask=-1, QueryOptions options=QueryOptions.HitAll, FP verticalPosition=default, FP verticalHeight=default)
 
void RaycastAll (HitCollection *collection, FPVector2 origin, FPVector2 direction, FP distance, int layerMask=-1, QueryOptions options=QueryOptions.HitAll, FP verticalPosition=default, FP verticalHeight=default)
 
HitShapeCast (FPVector2 start, FP rotation, Shape2D *shape, FPVector2 translation, int layerMask=-1, QueryOptions options=QueryOptions.HitAll, FP verticalPosition=default, FP verticalHeight=default)
 
HitShapeCast (FPVector2 start, FP rotation, Shape2D shape, FPVector2 translation, int layerMask=-1, QueryOptions options=QueryOptions.HitAll, FP verticalPosition=default, FP verticalHeight=default)
 
void ShapeCast (HitCollection *collection, FPVector2 start, FP rotation, Shape2D *shape, FPVector2 translation, int layerMask=-1, QueryOptions options=QueryOptions.HitAll, FP verticalPosition=default, FP verticalHeight=default)
 
HitCollection ShapeCastAll (FPVector2 start, FP rotation, Shape2D *shape, FPVector2 translation, int layerMask=-1, QueryOptions options=QueryOptions.HitAll, FP verticalPosition=default, FP verticalHeight=default)
 
HitCollection ShapeCastAll (FPVector2 start, FP rotation, Shape2D shape, FPVector2 translation, int layerMask=-1, QueryOptions options=QueryOptions.HitAll, FP verticalPosition=default, FP verticalHeight=default)
 
void ShapeCastAll (HitCollection *collection, FPVector2 start, FP rotation, Shape2D *shape, FPVector2 translation, int layerMask=-1, QueryOptions options=QueryOptions.HitAll, FP verticalPosition=default, FP verticalHeight=default)
 
bool TryGetQueryHits (in PhysicsQueryRef queryRef, out HitCollection queryHits)
 Tries to get the results of a broad-phase query added to the 2D physics scene. More...
 
bool TryGetQueryHits (int index, out HitCollection queryHits)
 Obsolete. Use 'TryGetQueryHits(in PhysicsQueryRef, out HitCollection)' overload instead. More...
 

Properties

readonly Map Map [get]
 

Detailed Description

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

Member Function Documentation

◆ IsValidQueryRef()

bool Quantum.Physics2D.PhysicsEngine2D.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()

HitCollection Quantum.Physics2D.PhysicsEngine2D.Api.ThreadSafeApi.GetQueryHits ( in PhysicsQueryRef  queryRef)
inline

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

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

◆ TryGetQueryHits() [1/2]

bool Quantum.Physics2D.PhysicsEngine2D.Api.ThreadSafeApi.TryGetQueryHits ( int  index,
out HitCollection  queryHits 
)
inline

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

◆ TryGetQueryHits() [2/2]

bool Quantum.Physics2D.PhysicsEngine2D.Api.ThreadSafeApi.TryGetQueryHits ( in PhysicsQueryRef  queryRef,
out HitCollection  queryHits 
)
inline

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

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

◆ CheckOverlap() [1/4]

bool Quantum.Physics2D.PhysicsEngine2D.Api.ThreadSafeApi.CheckOverlap ( Shape2D.CapsuleShape  capsuleShape,
Shape2D.BoxShape  boxShape,
Transform2D capsuleTransform,
Transform2D boxTransform,
out CollisionResultInfo2D  result 
)
inline

◆ CheckOverlap() [2/4]

bool Quantum.Physics2D.PhysicsEngine2D.Api.ThreadSafeApi.CheckOverlap ( Shape2D.BoxShape  boxShape,
Shape2D.CapsuleShape  capsuleShape,
Transform2D boxTransform,
Transform2D capsuleTransform,
out CollisionResultInfo2D  result 
)
inline

◆ CheckOverlap() [3/4]

bool Quantum.Physics2D.PhysicsEngine2D.Api.ThreadSafeApi.CheckOverlap ( Shape2D.CapsuleShape  capsuleShapeA,
Shape2D.CapsuleShape  capsuleShapeB,
Transform2D capsuleTransformA,
Transform2D capsuleTransformB,
out CollisionResultInfo2D  result 
)
inline

◆ CheckOverlap() [4/4]

bool Quantum.Physics2D.PhysicsEngine2D.Api.ThreadSafeApi.CheckOverlap ( Shape2D.CapsuleShape  capsuleShape,
Shape2D.CircleShape  circleShape,
Transform2D capsuleTransform,
FPVector2  circlePosition,
out CollisionResultInfo2D  result 
)
inline