A type of Tracker that collects information about the user's environment at runtime.
You can use the information collected to make hit tests into the user's environment.
The functionality and operation of SmartTerrain is affected by the active Fusion provider (see Vuforia::getActiveFusionProvider()).
For cross-platform consistency, you should assume that
Public Types | |
enum | HITTEST_HINT { HITTEST_HINT_NONE, HITTEST_HINT_HORIZONTAL_PLANE, HITTEST_HINT_VERTICAL_PLANE } |
Public Member Functions | |
virtual List< const HitTestResult > | hitTest (Vec2F point, HITTEST_HINT hint, State state, float deviceHeight)=0 |
Performs hit test. More... | |
Public Member Functions inherited from Tracker | |
virtual Type | getType () const =0 |
Get the Type of this instance (may be a subclass of Tracker). More... | |
virtual bool | isOfType (Type type) const =0 |
Get whether this Tracker instance's type equals or has been derived from the given type. More... | |
virtual bool | start ()=0 |
Start the Tracker. More... | |
virtual void | stop ()=0 |
Stop the Tracker. More... | |
virtual | ~Tracker () |
Static Public Member Functions | |
static Type | getClassType () |
Get the Type for class 'SmartTerrain'. More... | |
Static Public Member Functions inherited from Tracker | |
static Type | getClassType () |
Get the Type for class 'Tracker'. More... | |
enum HITTEST_HINT |
|
static |
Get the Type for class 'SmartTerrain'.
|
pure virtual |
Performs hit test.
This function will perform a hit test between a ray and a plane in the world as understood by the SmartTerrain. The ray is cast from the given point on the device's screen (typically from a user tapping the screen). An approximate deviceHeight above an assumed infinite ground plane may be used to provide an estimated ground plane intersection when the available data on the environment is limited. A single hit test may generate multiple results if the ray intersects more than one detected plane.
Specific behaviour of the hit test depends on the active Fusion provider (see Vuforia::getActiveFusionProvider())).
deviceHeight
specifies the device's approximate height above an assumed infinite ground plane on which the hit test result may lie; however it will be ignored if an existing (finite, localized) plane from a previous hit test is found along or near to the ray path. Additionally, Vuforia will not return hit test results when the PositionalDeviceTracker is initializing, as indicated by its Trackable status.deviceHeight
is ignored and Vuforia will only return results when the hit test ray intersects actual detected planes in the user's environment.state | The state to use for doing the hit test. |
point | Point in the normalized coordinate space of the camera image retrieved from the State (top left (0,0), bottom right (1,1)) to use as the origin of the ray. |
deviceHeight | Height of the device center above ground plane in meters. May be ignored. |
hint | A hint about the orientation of the plane in the scene. May be ignored. |