Class SimulatedHitTestProvider
Implements
IFunctionalityProvider
IFunctionalitySubscriber<IProvidesPlaneFinding>
IFunctionalitySubscriber<IProvidesPointCloud>
IFunctionalitySubscriber
Inherited Members
Namespace: Unity.MARS.Providers.Synthetic
Assembly: Unity.MARS.dll
Syntax
[ProviderSelectionOptions(-1073741824, null, false)]
[MovedFrom("Unity.MARS.Providers")]
public class SimulatedHitTestProvider : IProvidesMRHitTesting, IFunctionalityProvider, IUsesPlaneFinding, IFunctionalitySubscriber<IProvidesPlaneFinding>, IUsesPointCloud, IFunctionalitySubscriber<IProvidesPointCloud>, IFunctionalitySubscriber
Methods
ScreenHitTest(Vector2, out MRHitTestResult, MRHitTestResultTypes)
Perform a screen-based hit test against MR feature points.
Declaration
public bool ScreenHitTest(Vector2 screenPosition, out MRHitTestResult result, MRHitTestResultTypes types = MRHitTestResultTypes.Any)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | screenPosition | The screen position from which test will originate |
MRHitTestResult | result | The result of the hit test |
MRHitTestResultTypes | types | The types of results to test against |
Returns
Type | Description |
---|---|
bool | Whether the test succeeded |
StartHitTesting()
Start performing hit tests. Hit test support is enabled on initialization, so this is only necessary after calling StopDetecting.
Declaration
public void StartHitTesting()
StopHitTesting()
Stop performing hit tests. This will happen automatically on destroying the session. It is only necessary to call this method to pause plane detection while maintaining camera tracking
Declaration
public void StopHitTesting()
WorldHitTest(Ray, out MRHitTestResult, MRHitTestResultTypes)
Perform a world-based hit test against MR feature points.
Declaration
public bool WorldHitTest(Ray ray, out MRHitTestResult result, MRHitTestResultTypes types = MRHitTestResultTypes.Any)
Parameters
Type | Name | Description |
---|---|---|
Ray | ray | The ray to test |
MRHitTestResult | result | The result of the hit test |
MRHitTestResultTypes | types | The types of results to test against |
Returns
Type | Description |
---|---|
bool | Whether the test succeeded |
Implements
Unity.XRTools.ModuleLoader.IFunctionalityProvider
Unity.XRTools.ModuleLoader.IFunctionalitySubscriber<TProvider>
Unity.XRTools.ModuleLoader.IFunctionalitySubscriber<TProvider>
Unity.XRTools.ModuleLoader.IFunctionalitySubscriber