Class MixedRealityRaycaster
Inherited Members
Namespace: Microsoft.MixedReality.Toolkit.Physics
Assembly: cs.temp.dll.dll
Syntax
public static class MixedRealityRaycaster
  Fields
DebugEnabled
Declaration
public static bool DebugEnabled
  Field Value
| Type | Description | 
|---|---|
| Boolean | 
Methods
RaycastBoxPhysicsStep(RayStep, Vector3, Vector3, Matrix4x4, Single, LayerMask[], Int32, Boolean, Boolean, out Vector3[], out Vector3[], out Boolean[])
Box raycasts each physics RayStep.
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.  | 
      
RaycastPlanePhysicsStep(RayStep, Plane, out Vector3)
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.  | 
      
RaycastSimplePhysicsStep(RayStep, LayerMask[], Boolean, out RaycastHit)
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.  | 
      
RaycastSimplePhysicsStep(RayStep, Single, LayerMask[], Boolean, out RaycastHit)
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.  | 
      
RaycastSpherePhysicsStep(RayStep, Single, LayerMask[], Boolean, out RaycastHit)
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.  | 
      
RaycastSpherePhysicsStep(RayStep, Single, Single, LayerMask[], Boolean, out RaycastHit)
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.  | 
      
TryGetPrioritizedPhysicsHit(RaycastHit[], LayerMask[], Boolean, out RaycastHit)
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.  | 
      
Remarks
Sorts all hit objects first by layerMask, then by distance.