Struct CollisionWorld
Namespace: Unity.U2D.Entities.Physics
Syntax
public struct CollisionWorld : IQueryable, IDisposable
Constructors
CollisionWorld(Int32, Int32)
Declaration
public CollisionWorld(int staticBodyCount, int dynamicBodyCount)
Parameters
Type | Name | Description |
---|---|---|
Int32 | staticBodyCount | |
Int32 | dynamicBodyCount |
Fields
Broadphase
Declaration
public Broadphase Broadphase
Field Value
Type | Description |
---|---|
Broadphase |
Properties
AllBodies
Declaration
public NativeSlice<PhysicsBody> AllBodies { get; }
Property Value
Type | Description |
---|---|
NativeSlice<PhysicsBody> |
BodyCount
Declaration
public int BodyCount { get; }
Property Value
Type | Description |
---|---|
Int32 |
DynamicBodies
Declaration
public NativeSlice<PhysicsBody> DynamicBodies { get; }
Property Value
Type | Description |
---|---|
NativeSlice<PhysicsBody> |
DynamicBodyCount
Declaration
public int DynamicBodyCount { get; }
Property Value
Type | Description |
---|---|
Int32 |
StaticBodies
Declaration
public NativeSlice<PhysicsBody> StaticBodies { get; }
Property Value
Type | Description |
---|---|
NativeSlice<PhysicsBody> |
StaticBodyCount
Declaration
public int StaticBodyCount { get; }
Property Value
Type | Description |
---|---|
Int32 |
Methods
CalculateAabb()
Declaration
public Aabb CalculateAabb()
Returns
Type | Description |
---|---|
Aabb |
Implements
CalculateAabb(PhysicsTransform)
Declaration
public Aabb CalculateAabb(PhysicsTransform transform)
Parameters
Type | Name | Description |
---|---|---|
PhysicsTransform | transform |
Returns
Type | Description |
---|---|
Aabb |
Implements
CalculateDistance(ColliderDistanceInput)
Declaration
public bool CalculateDistance(ColliderDistanceInput input)
Parameters
Type | Name | Description |
---|---|---|
ColliderDistanceInput | input |
Returns
Type | Description |
---|---|
Boolean |
Implements
CalculateDistance(ColliderDistanceInput, ref NativeList<DistanceHit>)
Declaration
public bool CalculateDistance(ColliderDistanceInput input, ref NativeList<DistanceHit> allHits)
Parameters
Type | Name | Description |
---|---|---|
ColliderDistanceInput | input | |
NativeList<DistanceHit> | allHits |
Returns
Type | Description |
---|---|
Boolean |
Implements
CalculateDistance(ColliderDistanceInput, out DistanceHit)
Declaration
public bool CalculateDistance(ColliderDistanceInput input, out DistanceHit closestHit)
Parameters
Type | Name | Description |
---|---|---|
ColliderDistanceInput | input | |
DistanceHit | closestHit |
Returns
Type | Description |
---|---|
Boolean |
Implements
CalculateDistance(PointDistanceInput)
Declaration
public bool CalculateDistance(PointDistanceInput input)
Parameters
Type | Name | Description |
---|---|---|
PointDistanceInput | input |
Returns
Type | Description |
---|---|
Boolean |
Implements
CalculateDistance(PointDistanceInput, ref NativeList<DistanceHit>)
Declaration
public bool CalculateDistance(PointDistanceInput input, ref NativeList<DistanceHit> allHits)
Parameters
Type | Name | Description |
---|---|---|
PointDistanceInput | input | |
NativeList<DistanceHit> | allHits |
Returns
Type | Description |
---|---|
Boolean |
Implements
CalculateDistance(PointDistanceInput, out DistanceHit)
Declaration
public bool CalculateDistance(PointDistanceInput input, out DistanceHit closestHit)
Parameters
Type | Name | Description |
---|---|---|
PointDistanceInput | input | |
DistanceHit | closestHit |
Returns
Type | Description |
---|---|
Boolean |
Implements
CalculateDistance<T>(ColliderDistanceInput, ref T)
Declaration
public bool CalculateDistance<T>(ColliderDistanceInput input, ref T collector)
where T : struct, ICollector<DistanceHit>
Parameters
Type | Name | Description |
---|---|---|
ColliderDistanceInput | input | |
T | collector |
Returns
Type | Description |
---|---|
Boolean |
Type Parameters
Name | Description |
---|---|
T |
Implements
CalculateDistance<T>(PointDistanceInput, ref T)
Declaration
public bool CalculateDistance<T>(PointDistanceInput input, ref T collector)
where T : struct, ICollector<DistanceHit>
Parameters
Type | Name | Description |
---|---|---|
PointDistanceInput | input | |
T | collector |
Returns
Type | Description |
---|---|
Boolean |
Type Parameters
Name | Description |
---|---|
T |
Implements
CastCollider(ColliderCastInput)
Declaration
public bool CastCollider(ColliderCastInput input)
Parameters
Type | Name | Description |
---|---|---|
ColliderCastInput | input |
Returns
Type | Description |
---|---|
Boolean |
Implements
CastCollider(ColliderCastInput, ref NativeList<ColliderCastHit>)
Declaration
public bool CastCollider(ColliderCastInput input, ref NativeList<ColliderCastHit> allHits)
Parameters
Type | Name | Description |
---|---|---|
ColliderCastInput | input | |
NativeList<ColliderCastHit> | allHits |
Returns
Type | Description |
---|---|
Boolean |
Implements
CastCollider(ColliderCastInput, out ColliderCastHit)
Declaration
public bool CastCollider(ColliderCastInput input, out ColliderCastHit closestHit)
Parameters
Type | Name | Description |
---|---|---|
ColliderCastInput | input | |
ColliderCastHit | closestHit |
Returns
Type | Description |
---|---|
Boolean |
Implements
CastCollider<T>(ColliderCastInput, ref T)
Declaration
public bool CastCollider<T>(ColliderCastInput input, ref T collector)
where T : struct, ICollector<ColliderCastHit>
Parameters
Type | Name | Description |
---|---|---|
ColliderCastInput | input | |
T | collector |
Returns
Type | Description |
---|---|
Boolean |
Type Parameters
Name | Description |
---|---|
T |
Implements
CastRay(RaycastInput)
Declaration
public bool CastRay(RaycastInput input)
Parameters
Type | Name | Description |
---|---|---|
RaycastInput | input |
Returns
Type | Description |
---|---|
Boolean |
Implements
CastRay(RaycastInput, ref NativeList<RaycastHit>)
Declaration
public bool CastRay(RaycastInput input, ref NativeList<RaycastHit> allHits)
Parameters
Type | Name | Description |
---|---|---|
RaycastInput | input | |
NativeList<RaycastHit> | allHits |
Returns
Type | Description |
---|---|
Boolean |
Implements
CastRay(RaycastInput, out RaycastHit)
Declaration
public bool CastRay(RaycastInput input, out RaycastHit closestHit)
Parameters
Type | Name | Description |
---|---|---|
RaycastInput | input | |
RaycastHit | closestHit |
Returns
Type | Description |
---|---|
Boolean |
Implements
CastRay<T>(RaycastInput, ref T)
Declaration
public bool CastRay<T>(RaycastInput input, ref T collector)
where T : struct, ICollector<RaycastHit>
Parameters
Type | Name | Description |
---|---|---|
RaycastInput | input | |
T | collector |
Returns
Type | Description |
---|---|
Boolean |
Type Parameters
Name | Description |
---|---|
T |
Implements
Clone()
Declaration
public CollisionWorld Clone()
Returns
Type | Description |
---|---|
CollisionWorld |
Dispose()
Declaration
public void Dispose()
OverlapAabb(OverlapAabbInput, NativeList<Int32>)
Declaration
public bool OverlapAabb(OverlapAabbInput input, NativeList<int> physicsBodyIndices)
Parameters
Type | Name | Description |
---|---|---|
OverlapAabbInput | input | |
NativeList<Int32> | physicsBodyIndices |
Returns
Type | Description |
---|---|
Boolean |
OverlapCollider(OverlapColliderInput)
Declaration
public bool OverlapCollider(OverlapColliderInput input)
Parameters
Type | Name | Description |
---|---|---|
OverlapColliderInput | input |
Returns
Type | Description |
---|---|
Boolean |
Implements
OverlapCollider(OverlapColliderInput, ref NativeList<OverlapColliderHit>)
Declaration
public bool OverlapCollider(OverlapColliderInput input, ref NativeList<OverlapColliderHit> allHits)
Parameters
Type | Name | Description |
---|---|---|
OverlapColliderInput | input | |
NativeList<OverlapColliderHit> | allHits |
Returns
Type | Description |
---|---|
Boolean |
Implements
OverlapCollider(OverlapColliderInput, out OverlapColliderHit)
Declaration
public bool OverlapCollider(OverlapColliderInput input, out OverlapColliderHit hit)
Parameters
Type | Name | Description |
---|---|---|
OverlapColliderInput | input | |
OverlapColliderHit | hit |
Returns
Type | Description |
---|---|
Boolean |
Implements
OverlapCollider<T>(OverlapColliderInput, ref T)
Declaration
public bool OverlapCollider<T>(OverlapColliderInput input, ref T collector)
where T : struct, ICollector<OverlapColliderHit>
Parameters
Type | Name | Description |
---|---|---|
OverlapColliderInput | input | |
T | collector |
Returns
Type | Description |
---|---|
Boolean |
Type Parameters
Name | Description |
---|---|
T |
Implements
OverlapPoint(OverlapPointInput)
Declaration
public bool OverlapPoint(OverlapPointInput input)
Parameters
Type | Name | Description |
---|---|---|
OverlapPointInput | input |
Returns
Type | Description |
---|---|
Boolean |
Implements
OverlapPoint(OverlapPointInput, ref NativeList<OverlapPointHit>)
Declaration
public bool OverlapPoint(OverlapPointInput input, ref NativeList<OverlapPointHit> allHits)
Parameters
Type | Name | Description |
---|---|---|
OverlapPointInput | input | |
NativeList<OverlapPointHit> | allHits |
Returns
Type | Description |
---|---|
Boolean |
Implements
OverlapPoint(OverlapPointInput, out OverlapPointHit)
Declaration
public bool OverlapPoint(OverlapPointInput input, out OverlapPointHit hit)
Parameters
Type | Name | Description |
---|---|---|
OverlapPointInput | input | |
OverlapPointHit | hit |
Returns
Type | Description |
---|---|
Boolean |
Implements
OverlapPoint<T>(OverlapPointInput, ref T)
Declaration
public bool OverlapPoint<T>(OverlapPointInput input, ref T collector)
where T : struct, ICollector<OverlapPointHit>
Parameters
Type | Name | Description |
---|---|---|
OverlapPointInput | input | |
T | collector |
Returns
Type | Description |
---|---|
Boolean |
Type Parameters
Name | Description |
---|---|
T |