Class DefaultRaycastProvider
The default implementation of IMixedRealityRaycastProvider.
Implements
Inherited Members
Namespace: Microsoft.MixedReality.Toolkit.Input
Assembly: cs.temp.dll.dll
Syntax
public class DefaultRaycastProvider : BaseCoreSystem, IMixedRealityServiceState, IMixedRealityEventSystem, IMixedRealityRaycastProvider, IMixedRealityService, IDisposable
Constructors
DefaultRaycastProvider(IMixedRealityServiceRegistrar, MixedRealityInputSystemProfile)
Constructor.
Declaration
[Obsolete("This constructor is obsolete (registrar parameter is no longer required) and will be removed in a future version of the Microsoft Mixed Reality Toolkit.")]
public DefaultRaycastProvider(IMixedRealityServiceRegistrar registrar, MixedRealityInputSystemProfile profile)
Parameters
Type | Name | Description |
---|---|---|
IMixedRealityServiceRegistrar | registrar | The IMixedRealityServiceRegistrar instance that loaded the service. |
MixedRealityInputSystemProfile | profile | The configuration profile for the service. |
DefaultRaycastProvider(MixedRealityInputSystemProfile)
Constructor.
Declaration
public DefaultRaycastProvider(MixedRealityInputSystemProfile profile)
Parameters
Type | Name | Description |
---|---|---|
MixedRealityInputSystemProfile | profile | The configuration profile for the service. |
Properties
Name
Optional Priority attribute if multiple services of the same type are required, enables targeting a service for action.
Declaration
public override string Name { get; protected set; }
Property Value
Type | Description |
---|---|
String |
Overrides
Methods
GraphicsRaycast(EventSystem, PointerEventData, LayerMask[])
Performs a graphics raycast against the specified layerMasks.
Declaration
public RaycastResult GraphicsRaycast(EventSystem eventSystem, PointerEventData pointerEventData, LayerMask[] layerMasks)
Parameters
Type | Name | Description |
---|---|---|
EventSystem | eventSystem | |
PointerEventData | pointerEventData | |
LayerMask[] | layerMasks |
Returns
Type | Description |
---|---|
RaycastResult | The RaycastResult of the raycast. |
Raycast(RayStep, LayerMask[], Boolean, out MixedRealityRaycastHit)
Performs a raycast using the specified RayStep.
Declaration
public bool Raycast(RayStep step, LayerMask[] prioritizedLayerMasks, bool focusIndividualCompoundCollider, out MixedRealityRaycastHit hitInfo)
Parameters
Type | Name | Description |
---|---|---|
RayStep | step | |
LayerMask[] | prioritizedLayerMasks | |
Boolean | focusIndividualCompoundCollider | |
MixedRealityRaycastHit | hitInfo |
Returns
Type | Description |
---|---|
Boolean | Whether or not the raycast hit something. |
SphereCast(RayStep, Single, LayerMask[], Boolean, out MixedRealityRaycastHit)
Performs a sphere cast with the specified RayStep and radius.
Declaration
public bool SphereCast(RayStep step, float radius, LayerMask[] prioritizedLayerMasks, bool focusIndividualCompoundCollider, out MixedRealityRaycastHit hitInfo)
Parameters
Type | Name | Description |
---|---|---|
RayStep | step | |
Single | radius | |
LayerMask[] | prioritizedLayerMasks | |
Boolean | focusIndividualCompoundCollider | |
MixedRealityRaycastHit | hitInfo |
Returns
Type | Description |
---|---|
Boolean | Whether or not the SphereCast hit something. |