Struct Collider
Namespace: Unity.U2D.Entities.Physics
Syntax
public struct Collider : ICompositeCollider, ICollider, IQueryable
Properties
ColliderType
Declaration
public ColliderType ColliderType { get; }
Property Value
Type | Description |
---|---|
ColliderType |
CollisionType
Declaration
public CollisionType CollisionType { get; }
Property Value
Type | Description |
---|---|
CollisionType |
Filter
Declaration
public CollisionFilter Filter { get; set; }
Property Value
Type | Description |
---|---|
CollisionFilter |
MassProperties
Declaration
public MassProperties MassProperties { get; }
Property Value
Type | Description |
---|---|
MassProperties |
MemorySize
Declaration
public int MemorySize { get; }
Property Value
Type | Description |
---|---|
Int32 |
NumColliderKeyBits
Declaration
public uint NumColliderKeyBits { get; }
Property Value
Type | Description |
---|---|
UInt32 |
UserData
Declaration
public uint UserData { get; set; }
Property Value
Type | Description |
---|---|
UInt32 |
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
GetChild(ref ColliderKey, out ChildCollider)
Declaration
public bool GetChild(ref ColliderKey key, out ChildCollider child)
Parameters
Type | Name | Description |
---|---|---|
ColliderKey | key | |
ChildCollider | child |
Returns
Type | Description |
---|---|
Boolean |
GetLeaf(ColliderKey, out ChildCollider)
Declaration
public bool GetLeaf(ColliderKey key, out ChildCollider leaf)
Parameters
Type | Name | Description |
---|---|---|
ColliderKey | key | |
ChildCollider | leaf |
Returns
Type | Description |
---|---|
Boolean |
GetLeafCollider(Collider*, PhysicsTransform, ColliderKey, out ChildCollider)
Declaration
public static bool GetLeafCollider(Collider*root, PhysicsTransform rootTransform, ColliderKey key, out ChildCollider leaf)
Parameters
Type | Name | Description |
---|---|---|
Collider* | root | |
PhysicsTransform | rootTransform | |
ColliderKey | key | |
ChildCollider | leaf |
Returns
Type | Description |
---|---|
Boolean |
GetLeaves<T>(ref T)
Declaration
public void GetLeaves<T>(ref T collector)
where T : struct, ILeafColliderCollector
Parameters
Type | Name | Description |
---|---|---|
T | collector |
Type Parameters
Name | Description |
---|---|
T |
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 |