Class MixedRealityRaycaster
Inheritance
MixedRealityRaycaster
Assembly: cs.temp.dll.dll
public static class MixedRealityRaycaster
Fields
Declaration
public static bool DebugEnabled
Field Value
Declaration
public const int MaxRaycastHitCount = 32
Field Value
Declaration
public const int MaxSphereCastHitCount = 32
Field Value
Methods
Declaration
public static bool RaycastBoxPhysicsStep(RayStep step, Vector3 extents, Vector3 targetPosition, Matrix4x4 matrix, float maxDistance, LayerMask[] prioritizedLayerMasks, int raysPerEdge, bool isOrthographic, bool focusIndividualCompoundCollider, out Vector3[] points, out Vector3[] normals, out bool[] hits)
Parameters
Type |
Name |
Description |
RayStep |
step |
|
Vector3 |
extents |
|
Vector3 |
targetPosition |
|
Matrix4x4 |
matrix |
|
Single |
maxDistance |
|
LayerMask[] |
prioritizedLayerMasks |
|
Int32 |
raysPerEdge |
|
Boolean |
isOrthographic |
|
Boolean |
focusIndividualCompoundCollider |
|
Vector3[] |
points |
|
Vector3[] |
normals |
|
Boolean[] |
hits |
|
Returns
Type |
Description |
Boolean |
Whether or not the raycast hit something.
|
Intersection test of ray step with given plane.
Declaration
public static bool RaycastPlanePhysicsStep(RayStep step, Plane plane, out Vector3 hitPoint)
Parameters
Type |
Name |
Description |
RayStep |
step |
|
Plane |
plane |
|
Vector3 |
hitPoint |
|
Returns
Type |
Description |
Boolean |
Whether the ray step intersects the ray step.
|
Simple raycasts each physics RayStep.
Declaration
public static bool RaycastSimplePhysicsStep(RayStep step, LayerMask[] prioritizedLayerMasks, bool focusIndividualCompoundCollider, out RaycastHit physicsHit)
Parameters
Type |
Name |
Description |
RayStep |
step |
|
LayerMask[] |
prioritizedLayerMasks |
|
Boolean |
focusIndividualCompoundCollider |
|
RaycastHit |
physicsHit |
|
Returns
Type |
Description |
Boolean |
Whether or not the raycast hit something.
|
Simple raycasts each physics RayStep within a specified maximum distance.
Declaration
public static bool RaycastSimplePhysicsStep(RayStep step, float maxDistance, LayerMask[] prioritizedLayerMasks, bool focusIndividualCompoundCollider, out RaycastHit physicsHit)
Parameters
Type |
Name |
Description |
RayStep |
step |
|
Single |
maxDistance |
|
LayerMask[] |
prioritizedLayerMasks |
|
Boolean |
focusIndividualCompoundCollider |
|
RaycastHit |
physicsHit |
|
Returns
Type |
Description |
Boolean |
Whether or not the raycast hit something.
|
Sphere raycasts each physics RayStep.
Declaration
public static bool RaycastSpherePhysicsStep(RayStep step, float radius, LayerMask[] prioritizedLayerMasks, bool focusIndividualCompoundCollider, out RaycastHit physicsHit)
Parameters
Type |
Name |
Description |
RayStep |
step |
|
Single |
radius |
|
LayerMask[] |
prioritizedLayerMasks |
|
Boolean |
focusIndividualCompoundCollider |
|
RaycastHit |
physicsHit |
|
Returns
Type |
Description |
Boolean |
Whether or not the raycast hit something.
|
Sphere raycasts each physics RayStep within a specified maximum distance.
Declaration
public static bool RaycastSpherePhysicsStep(RayStep step, float radius, float maxDistance, LayerMask[] prioritizedLayerMasks, bool focusIndividualCompoundCollider, out RaycastHit physicsHit)
Parameters
Type |
Name |
Description |
RayStep |
step |
|
Single |
radius |
|
Single |
maxDistance |
|
LayerMask[] |
prioritizedLayerMasks |
|
Boolean |
focusIndividualCompoundCollider |
|
RaycastHit |
physicsHit |
|
Returns
Type |
Description |
Boolean |
Whether or not the raycast hit something.
|
Tries to get the prioritized physics raycast hit based on the prioritized layer masks.
Declaration
public static bool TryGetPrioritizedPhysicsHit(RaycastHit[] hits, LayerMask[] priorityLayers, bool focusIndividualCompoundCollider, out RaycastHit raycastHit)
Parameters
Type |
Name |
Description |
RaycastHit[] |
hits |
|
LayerMask[] |
priorityLayers |
|
Boolean |
focusIndividualCompoundCollider |
|
RaycastHit |
raycastHit |
|
Returns
Type |
Description |
Boolean |
The minimum distance hit within the first layer that has hits.
|