Struct PolygonCollider
Syntax
public struct PolygonCollider : IConvexCollider, ICollider, ICollidable
Properties
CollisionType
Declaration
public CollisionType CollisionType { get; }
Property Value
Filter
Declaration
public CollisionFilter Filter { get; set; }
Property Value
IsQuad
Declaration
public bool IsQuad { get; }
Property Value
IsTriangle
Declaration
public bool IsTriangle { get; }
Property Value
MassProperties
Declaration
public MassProperties MassProperties { get; }
Property Value
Material
Declaration
public Material Material { get; set; }
Property Value
MemorySize
Declaration
public int MemorySize { get; }
Property Value
Planes
Declaration
public BlobArray.Accessor<Plane> Planes { get; }
Property Value
Type
Declaration
public ColliderType Type { get; }
Property Value
Vertices
Declaration
public BlobArray.Accessor<float3> Vertices { get; }
Property Value
Methods
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
CreateQuad(float3, float3, float3, float3)
Declaration
public static BlobAssetReference<Collider> CreateQuad(float3 vertex0, float3 vertex1, float3 vertex2, float3 vertex3)
Parameters
Type |
Name |
Description |
Unity.Mathematics.float3 |
vertex0 |
|
Unity.Mathematics.float3 |
vertex1 |
|
Unity.Mathematics.float3 |
vertex2 |
|
Unity.Mathematics.float3 |
vertex3 |
|
Returns
CreateQuad(float3, float3, float3, float3, CollisionFilter)
Declaration
public static BlobAssetReference<Collider> CreateQuad(float3 vertex0, float3 vertex1, float3 vertex2, float3 vertex3, CollisionFilter filter)
Parameters
Type |
Name |
Description |
Unity.Mathematics.float3 |
vertex0 |
|
Unity.Mathematics.float3 |
vertex1 |
|
Unity.Mathematics.float3 |
vertex2 |
|
Unity.Mathematics.float3 |
vertex3 |
|
CollisionFilter |
filter |
|
Returns
CreateQuad(float3, float3, float3, float3, CollisionFilter, Material)
Declaration
public static BlobAssetReference<Collider> CreateQuad(float3 vertex0, float3 vertex1, float3 vertex2, float3 vertex3, CollisionFilter filter, Material material)
Parameters
Type |
Name |
Description |
Unity.Mathematics.float3 |
vertex0 |
|
Unity.Mathematics.float3 |
vertex1 |
|
Unity.Mathematics.float3 |
vertex2 |
|
Unity.Mathematics.float3 |
vertex3 |
|
CollisionFilter |
filter |
|
Material |
material |
|
Returns
CreateTriangle(float3, float3, float3)
Declaration
public static BlobAssetReference<Collider> CreateTriangle(float3 vertex0, float3 vertex1, float3 vertex2)
Parameters
Type |
Name |
Description |
Unity.Mathematics.float3 |
vertex0 |
|
Unity.Mathematics.float3 |
vertex1 |
|
Unity.Mathematics.float3 |
vertex2 |
|
Returns
CreateTriangle(float3, float3, float3, CollisionFilter)
Declaration
public static BlobAssetReference<Collider> CreateTriangle(float3 vertex0, float3 vertex1, float3 vertex2, CollisionFilter filter)
Parameters
Type |
Name |
Description |
Unity.Mathematics.float3 |
vertex0 |
|
Unity.Mathematics.float3 |
vertex1 |
|
Unity.Mathematics.float3 |
vertex2 |
|
CollisionFilter |
filter |
|
Returns
CreateTriangle(float3, float3, float3, CollisionFilter, Material)
Declaration
public static BlobAssetReference<Collider> CreateTriangle(float3 vertex0, float3 vertex1, float3 vertex2, CollisionFilter filter, Material material)
Parameters
Type |
Name |
Description |
Unity.Mathematics.float3 |
vertex0 |
|
Unity.Mathematics.float3 |
vertex1 |
|
Unity.Mathematics.float3 |
vertex2 |
|
CollisionFilter |
filter |
|
Material |
material |
|
Returns