Struct Broadphase
Syntax
public struct Broadphase : IDisposable
Constructors
Broadphase(Int32, Int32)
Declaration
public Broadphase(int staticBodyCount, int dynamicBodyCount)
Parameters
Type |
Name |
Description |
Int32 |
staticBodyCount |
|
Int32 |
dynamicBodyCount |
|
Properties
Domain
Declaration
public Aabb Domain { get; }
Property Value
DynamicBodyCount
Declaration
public int DynamicBodyCount { get; }
Property Value
DynamicTree
Declaration
public Broadphase.Tree DynamicTree { get; }
Property Value
StaticBodyCount
Declaration
public int StaticBodyCount { get; }
Property Value
StaticTree
Declaration
public Broadphase.Tree StaticTree { get; }
Property Value
Methods
Build(NativeSlice<PhysicsBody>, NativeSlice<PhysicsBody>, NativeSlice<PhysicsBody.MotionData>, NativeSlice<PhysicsBody.MotionVelocity>, Single, Single, float2, Boolean)
Build the broadphase based on the given world.
Declaration
public void Build(NativeSlice<PhysicsBody> staticBodies, NativeSlice<PhysicsBody> dynamicBodies, NativeSlice<PhysicsBody.MotionData> motionDatas, NativeSlice<PhysicsBody.MotionVelocity> motionVelocities, float collisionTolerance, float timeStep, float2 gravity, bool buildStaticTree = true)
Parameters
BuildDynamicTree(NativeSlice<PhysicsBody>, NativeSlice<PhysicsBody.MotionData>, NativeSlice<PhysicsBody.MotionVelocity>, float2, Single, Single)
Build the dynamic tree of the broadphase based on the given array of rigid bodies and motions.
Declaration
public void BuildDynamicTree(NativeSlice<PhysicsBody> dynamicBodies, NativeSlice<PhysicsBody.MotionData> motionDatas, NativeSlice<PhysicsBody.MotionVelocity> motionVelocities, float2 gravity, float timeStep, float aabbMargin)
Parameters
BuildStaticTree(NativeSlice<PhysicsBody>, Single)
Build the static tree of the broadphase based on the given array of rigid bodies.
Declaration
public void BuildStaticTree(NativeSlice<PhysicsBody> staticBodies, float aabbMargin)
Parameters
CalculateDistance<T>(ColliderDistanceInput, NativeSlice<PhysicsBody>, ref T)
Declaration
public bool CalculateDistance<T>(ColliderDistanceInput input, NativeSlice<PhysicsBody> rigidBodies, ref T collector)
where T : struct, ICollector<DistanceHit>
Parameters
Returns
Type Parameters
CalculateDistance<T>(PointDistanceInput, NativeSlice<PhysicsBody>, ref T)
Declaration
public bool CalculateDistance<T>(PointDistanceInput input, NativeSlice<PhysicsBody> rigidBodies, ref T collector)
where T : struct, ICollector<DistanceHit>
Parameters
Returns
Type Parameters
CastCollider<T>(ColliderCastInput, NativeSlice<PhysicsBody>, ref T)
Declaration
public bool CastCollider<T>(ColliderCastInput input, NativeSlice<PhysicsBody> rigidBodies, ref T collector)
where T : struct, ICollector<ColliderCastHit>
Parameters
Returns
Type Parameters
CastRay<T>(RaycastInput, NativeSlice<PhysicsBody>, ref T)
Declaration
public bool CastRay<T>(RaycastInput input, NativeSlice<PhysicsBody> rigidBodies, ref T collector)
where T : struct, ICollector<RaycastHit>
Parameters
Returns
Type Parameters
Clone()
Declaration
public Broadphase Clone()
Returns
Dispose()
Declaration
OverlapAabb(OverlapAabbInput, NativeSlice<PhysicsBody>, NativeList<Int32>)
Declaration
public bool OverlapAabb(OverlapAabbInput input, NativeSlice<PhysicsBody> rigidBodies, NativeList<int> physicsBodyIndices)
Parameters
Returns
OverlapCollider<T>(OverlapColliderInput, NativeSlice<PhysicsBody>, ref T)
Declaration
public bool OverlapCollider<T>(OverlapColliderInput input, NativeSlice<PhysicsBody> rigidBodies, ref T collector)
where T : struct, ICollector<OverlapColliderHit>
Parameters
Returns
Type Parameters
OverlapPoint<T>(OverlapPointInput, NativeSlice<PhysicsBody>, ref T)
Declaration
public bool OverlapPoint<T>(OverlapPointInput input, NativeSlice<PhysicsBody> rigidBodies, ref T collector)
where T : struct, ICollector<OverlapPointHit>
Parameters
Returns
Type Parameters
Reset(Int32, Int32)
Declaration
public void Reset(int staticBodyCount, int dynamicBodyCount)
Parameters
Type |
Name |
Description |
Int32 |
staticBodyCount |
|
Int32 |
dynamicBodyCount |
|