Table of Contents

Class RaycastSegmentWorker

Namespace
Gravitas.Queries
Assembly
Gravitas.dll

Stores segment data used by one context-owned raycast service while checking collider overlaps.

public sealed class RaycastSegmentWorker
Inheritance
RaycastSegmentWorker
Inherited Members

Constructors

RaycastSegmentWorker()

public RaycastSegmentWorker()

Methods

CheckAABBoxOverlaps(Vector3d, Vector3d, ref SwiftList<Vector3d>)

Checks whether an axis-aligned bounding box overlaps this worker's prepared ray segment.

public bool CheckAABBoxOverlaps(Vector3d min, Vector3d max, ref SwiftList<Vector3d> outputIntersectionPoints)

Parameters

min Vector3d
max Vector3d
outputIntersectionPoints SwiftList<Vector3d>

Returns

bool

CheckAABBoxOverlaps(LSCuboidCollider, ref SwiftList<Vector3d>)

Checks whether a cuboid's axis-aligned bounds overlap the prepared segment.

public bool CheckAABBoxOverlaps(LSCuboidCollider aabox, ref SwiftList<Vector3d> outputIntersectionPoints)

Parameters

aabox LSCuboidCollider
outputIntersectionPoints SwiftList<Vector3d>

Returns

bool

CheckCapsuleOverlaps(LSCapsuleCollider, ref SwiftList<Vector3d>)

Checks whether a capsule collider overlaps the prepared segment.

public bool CheckCapsuleOverlaps(LSCapsuleCollider capsuleCollider, ref SwiftList<Vector3d> outputIntersectionPoints)

Parameters

capsuleCollider LSCapsuleCollider
outputIntersectionPoints SwiftList<Vector3d>

Returns

bool

CheckConeOverlaps(LSConeCollider, ref SwiftList<Vector3d>)

Checks whether a cone collider overlaps the prepared segment.

public bool CheckConeOverlaps(LSConeCollider coneCollider, ref SwiftList<Vector3d> outputIntersectionPoints)

Parameters

coneCollider LSConeCollider
outputIntersectionPoints SwiftList<Vector3d>

Returns

bool

CheckCylinderOverlaps(LSCylinderCollider, ref SwiftList<Vector3d>)

Checks whether a cylinder collider overlaps the prepared segment.

public bool CheckCylinderOverlaps(LSCylinderCollider cylinderCollider, ref SwiftList<Vector3d> outputIntersectionPoints)

Parameters

cylinderCollider LSCylinderCollider
outputIntersectionPoints SwiftList<Vector3d>

Returns

bool

CheckMeshOverlaps(LSMeshCollider, ref SwiftList<Vector3d>)

Checks whether a mesh collider overlaps the prepared segment.

public bool CheckMeshOverlaps(LSMeshCollider meshCollider, ref SwiftList<Vector3d> outputIntersectionPoints)

Parameters

meshCollider LSMeshCollider
outputIntersectionPoints SwiftList<Vector3d>

Returns

bool

CheckOBBoxOverlaps(LSCuboidCollider, ref SwiftList<Vector3d>)

Checks whether an oriented bounding box overlaps this worker's prepared ray segment.

public bool CheckOBBoxOverlaps(LSCuboidCollider oobox, ref SwiftList<Vector3d> outputIntersectionPoints)

Parameters

oobox LSCuboidCollider
outputIntersectionPoints SwiftList<Vector3d>

Returns

bool

CheckSphereOverlaps(FixedBoundSphere, ref SwiftList<Vector3d>)

Checks whether a sphere overlaps this worker's prepared ray segment.

public bool CheckSphereOverlaps(FixedBoundSphere sphere, ref SwiftList<Vector3d> outputIntersectionPoints)

Parameters

sphere FixedBoundSphere

The sphere bound.

outputIntersectionPoints SwiftList<Vector3d>

Receives segment points reconstructed from exact physical intersection distances.

Returns

bool

true when the prepared segment overlaps the sphere.

CheckSphereOverlaps(LSSphereCollider, ref SwiftList<Vector3d>)

Checks whether a sphere collider overlaps the prepared segment.

public bool CheckSphereOverlaps(LSSphereCollider sphereCollider, ref SwiftList<Vector3d> outputIntersectionPoints)

Parameters

sphereCollider LSSphereCollider
outputIntersectionPoints SwiftList<Vector3d>

Returns

bool

PrepareSegmentCheck(Vector3d, Vector3d, bool)

Prepares this worker for overlap checks against the line segment between two points.

public void PrepareSegmentCheck(Vector3d p1, Vector3d p2, bool calculateIntersectionPoints = true)

Parameters

p1 Vector3d
p2 Vector3d
calculateIntersectionPoints bool