Struct CollisionWorld
Syntax
public struct CollisionWorld : ICollidable, IDisposable
Constructors
CollisionWorld(Int32, Int32)
Declaration
public CollisionWorld(int numStaticBodies, int numDynamicBodies)
Parameters
Type |
Name |
Description |
Int32 |
numStaticBodies |
|
Int32 |
numDynamicBodies |
|
Properties
Bodies
Declaration
public NativeArray<RigidBody> Bodies { get; }
Property Value
CollisionTolerance
Declaration
public float CollisionTolerance { get; }
Property Value
DynamicBodies
Declaration
public NativeArray<RigidBody> DynamicBodies { get; }
Property Value
NumBodies
Declaration
public int NumBodies { get; }
Property Value
NumDynamicBodies
Declaration
public int NumDynamicBodies { get; }
Property Value
NumStaticBodies
Declaration
public int NumStaticBodies { get; }
Property Value
StaticBodies
Declaration
public NativeArray<RigidBody> StaticBodies { get; }
Property Value
Methods
BuildBroadphase(ref PhysicsWorld, Single, float3, Boolean)
Declaration
public void BuildBroadphase(ref PhysicsWorld world, float timeStep, float3 gravity, bool buildStaticTree = true)
Parameters
CalculateAabb()
Declaration
public Aabb CalculateAabb()
Returns
Implements
Declaration
public Aabb CalculateAabb(RigidTransform transform)
Parameters
Type |
Name |
Description |
Unity.Mathematics.RigidTransform |
transform |
|
Returns
Implements
Declaration
public bool CalculateDistance(ColliderDistanceInput input)
Parameters
Returns
Implements
Declaration
public bool CalculateDistance(ColliderDistanceInput input, ref NativeList<DistanceHit> allHits)
Parameters
Returns
Implements
Declaration
public bool CalculateDistance(ColliderDistanceInput input, out DistanceHit closestHit)
Parameters
Returns
Implements
Declaration
public bool CalculateDistance(PointDistanceInput input)
Parameters
Returns
Implements
Declaration
public bool CalculateDistance(PointDistanceInput input, ref NativeList<DistanceHit> allHits)
Parameters
Returns
Implements
Declaration
public bool CalculateDistance(PointDistanceInput input, out DistanceHit closestHit)
Parameters
Returns
Implements
Declaration
public bool CalculateDistance<T>(ColliderDistanceInput input, ref T collector)
where T : struct, ICollector<DistanceHit>
Parameters
Returns
Type Parameters
Implements
Declaration
public bool CalculateDistance<T>(PointDistanceInput input, ref T collector)
where T : struct, ICollector<DistanceHit>
Parameters
Returns
Type Parameters
Implements
Declaration
public bool CastCollider(ColliderCastInput input)
Parameters
Returns
Implements
Declaration
public bool CastCollider(ColliderCastInput input, ref NativeList<ColliderCastHit> allHits)
Parameters
Returns
Implements
Declaration
public bool CastCollider(ColliderCastInput input, out ColliderCastHit closestHit)
Parameters
Returns
Implements
Declaration
public bool CastCollider<T>(ColliderCastInput input, ref T collector)
where T : struct, ICollector<ColliderCastHit>
Parameters
Returns
Type Parameters
Implements
Declaration
public bool CastRay(RaycastInput input)
Parameters
Returns
Implements
Declaration
public bool CastRay(RaycastInput input, ref NativeList<RaycastHit> allHits)
Parameters
Returns
Implements
Declaration
public bool CastRay(RaycastInput input, out RaycastHit closestHit)
Parameters
Returns
Implements
Declaration
public bool CastRay<T>(RaycastInput input, ref T collector)
where T : struct, ICollector<RaycastHit>
Parameters
Returns
Type Parameters
Implements
Clone()
Declaration
public CollisionWorld Clone()
Returns
Dispose()
Declaration
FindOverlaps(ref NativeStream.Writer, ref NativeStream.Writer)
Declaration
public void FindOverlaps(ref NativeStream.Writer dynamicVsDynamicPairsWriter, ref NativeStream.Writer staticVsDynamicPairsWriter)
Parameters
Declaration
public bool OverlapAabb(OverlapAabbInput input, ref NativeList<int> allHits)
Parameters
Returns
Reset(Int32, Int32)
Declaration
public void Reset(int numStaticBodies, int numDynamicBodies)
Parameters
Type |
Name |
Description |
Int32 |
numStaticBodies |
|
Int32 |
numDynamicBodies |
|
ScheduleBuildBroadphaseJobs(ref PhysicsWorld, Single, float3, NativeArray<Int32>, JobHandle, Int32)
Declaration
public JobHandle ScheduleBuildBroadphaseJobs(ref PhysicsWorld world, float timeStep, float3 gravity, NativeArray<int> buildStaticTree, JobHandle inputDeps, int threadCountHint = 0)
Parameters
Returns
ScheduleFindOverlapsJobs(out NativeStream, out NativeStream, JobHandle, Int32)
Declaration
public SimulationJobHandles ScheduleFindOverlapsJobs(out NativeStream dynamicVsDynamicPairsStream, out NativeStream staticVsDynamicPairsStream, JobHandle inputDeps, int threadCountHint = 0)
Parameters
Returns
ScheduleUpdateDynamicTree(ref PhysicsWorld, Single, float3, JobHandle, Int32)
Declaration
public JobHandle ScheduleUpdateDynamicTree(ref PhysicsWorld world, float timeStep, float3 gravity, JobHandle inputDeps, int threadCountHint = 0)
Parameters
Returns
UpdateDynamicTree(ref PhysicsWorld, Single, float3)
Declaration
public void UpdateDynamicTree(ref PhysicsWorld world, float timeStep, float3 gravity)
Parameters