All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Loading...
Searching...
No Matches
VuHitTestConfig Struct Reference

Public Attributes

VuVector2F point
 Point in the normalized coordinate space of the camera frame to use as the origin of the ray.
 
VuCameraFrameframe
 Camera frame retrieved from the Vuforia State that the hit-test should be performed on.
 
VuHitTestHint hint
 A hint about the orientation of the plane in the scene. Default value is VU_HIT_TEST_HINT_NONE.
 
float deviceHeight
 Height of the device center above ground plane in meters. Default value is 1.4 meters.
 

Detailed Description

Configuration for performing a hit-test.

Hit-test functionality performs a hit test between a ray and a plane in the world as understood by the Vuforia Engine. The ray is cast from the given point on the device's screen (typically from a user tapping the screen). An approximate device height 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 behavior of the hit test depends on the active Fusion provider (see vuPlatformControllerGetFusionProviderType()).

  • When using VU_FUSION_PROVIDER_TYPE_SENSOR_FUSION, 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 device pose observer for positional device tracking is initializing, as indicated by its status info (see VuDevicePoseObservationStatusInfo).
  • When using VU_FUSION_PROVIDER_TYPE_PLATFORM_SENSOR_FUSION, deviceHeight is ignored and Vuforia will only return results when the hit test ray intersects actual detected planes in the user's environment.
Note
A hit test is bound to a specific camera frame retrieved from the Vuforia State.

Member Data Documentation

◆ point

VuVector2F point

Point in the normalized coordinate space of the camera frame to use as the origin of the ray.

Note
Top left = (0,0), bottom right = (1,1))

◆ hint

A hint about the orientation of the plane in the scene. Default value is VU_HIT_TEST_HINT_NONE.

Note
This hint may be ignored internally by Vuforia if the specified hit test orientation is not yet supported.

◆ deviceHeight

float deviceHeight

Height of the device center above ground plane in meters. Default value is 1.4 meters.

Note
This value may be ignored internally by Vuforia if it already has a good estimate of the relative height of the planar surface. Vuforia will also attempt to refine this height estimate over time as the device moves, so the value here does not need to be exact.