Class LSMeshCollider
Represents a runtime 3D collider backed by deterministic triangle-mesh geometry.
public sealed class LSMeshCollider : LSCollider, IRecordable
- Inheritance
-
LSMeshCollider
- Implements
-
IRecordable
- Inherited Members
Constructors
LSMeshCollider(Vector3d[], int[])
Creates a convex mesh collider from authored vertices and triangle indices.
public LSMeshCollider(Vector3d[] vertices, int[] triangles)
Parameters
verticesVector3d[]trianglesint[]
LSMeshCollider(Vector3d[], int[], MeshColliderMode)
Creates a mesh collider with an explicit collision mode.
public LSMeshCollider(Vector3d[] vertices, int[] triangles, MeshColliderMode mode)
Parameters
verticesVector3d[]trianglesint[]modeMeshColliderMode
LSMeshCollider(Vector3d[], int[], MeshColliderMode, MeshInertiaPolicy)
Creates a mesh collider with explicit collision and inertia policies.
public LSMeshCollider(Vector3d[] vertices, int[] triangles, MeshColliderMode mode, MeshInertiaPolicy inertiaPolicy)
Parameters
verticesVector3d[]trianglesint[]modeMeshColliderModeinertiaPolicyMeshInertiaPolicy
LSMeshCollider(ColliderShapeDefinition)
Creates a runtime convex mesh from an authored shape definition.
public LSMeshCollider(ColliderShapeDefinition definition)
Parameters
definitionColliderShapeDefinition
Properties
Area
Gets the committed shape-specific measure used as the frontal-area fallback.
public override Fixed64 Area { get; }
Property Value
- Fixed64
InertiaPolicy
Determines how inertia is derived when this mesh collider is attached to a body with angular dynamics.
public MeshInertiaPolicy InertiaPolicy { get; }
Property Value
IsClosedSurface
Gets whether the mesh's exact-position-welded triangle topology is one connected, consistently wound, closed two-manifold surface.
public bool IsClosedSurface { get; }
Property Value
Mesh
Gets the deterministic runtime mesh geometry.
public PhysicsMesh Mesh { get; }
Property Value
Mode
Gets the mesh collision mode.
public MeshColliderMode Mode { get; }
Property Value
Priority
Gets the deterministic narrow-phase ordering priority.
public override int Priority { get; }
Property Value
ScaledRadius
Gets the bounding circle radius. For boxes, this is half of the diagonal length of the cube
public override Fixed64 ScaledRadius { get; }
Property Value
- Fixed64
The radius.
Shape
Gets the runtime 3D shape family.
public override ColliderType Shape { get; }
Property Value
Methods
ClosestPointOnSurface(Vector3d)
Gets the point on this collider's surface nearest to a world-space point.
public override Vector3d ClosestPointOnSurface(Vector3d queryPoint)
Parameters
queryPointVector3d
Returns
- Vector3d
ColliderOverlapsRay(RaycastSegmentWorker, ref SwiftList<Vector3d>)
Checks if this object overlaps the line formed by p1 and p2
public override bool ColliderOverlapsRay(RaycastSegmentWorker worker, ref SwiftList<Vector3d> outputIntersectionPoints)
Parameters
workerRaycastSegmentWorkerThe prepared ray-axis worker for the owning query service.
outputIntersectionPointsSwiftList<Vector3d>
Returns
GetFrontalArea(Vector3d)
Gets the frontal-area estimate for a world-space direction; the base implementation returns Area.
public override Fixed64 GetFrontalArea(Vector3d direction)
Parameters
directionVector3d
Returns
- Fixed64
GetNearbyTriangles(Vector3d, SwiftList<int>)
Writes triangle indices near a world-space point into a caller-owned buffer.
public void GetNearbyTriangles(Vector3d queryPoint, SwiftList<int> result)
Parameters
queryPointVector3dresultSwiftList<int>
GetNormalAtPoint(Vector3d)
The direction pointing outward from the surface of the collider at the point
public override Vector3d GetNormalAtPoint(Vector3d point)
Parameters
pointVector3d
Returns
- Vector3d
GetTrianglesInBounds(FixedBoundVolume, SwiftList<int>)
Writes triangle indices overlapping world-space bounds into a caller-owned buffer.
public void GetTrianglesInBounds(FixedBoundVolume queryBounds, SwiftList<int> result)
Parameters
queryBoundsFixedBoundVolumeresultSwiftList<int>