Public Attributes | |
VuVector4I | viewport |
Video background viewport suitable for rendering. | |
VuMatrix44F | vbProjectionMatrix |
Video background projection matrix immediately suitable for rendering in OpenGL. | |
VuMesh * | vbMesh |
Video background mesh. | |
VuMatrix44F | viewMatrix |
View matrix (inverse of device pose) immediately suitable for rendering in OpenGL. | |
VuMatrix44F | projectionMatrix |
Projection matrix (using near/far plane values set in render controller) | |
Vuforia Render State.
VuVector4I viewport |
Video background viewport suitable for rendering.
The viewport specifies the location and size inside the render view (as specified via vuRenderControllerSetRenderViewConfig) where the video background should be rendered.
The viewport is defined in the same way as the parameters for glViewport in OpenGL, with the first two fields specifying the lower left corner point of the viewport rectangle in pixels and the second and third fields specyfing the width and height of the viewport.
The viewport is thereby constrained not to exceed the bounds of the render view. This is the viewport that should be used directly for rendering.
For a viewport that is not constrained by the bounds of the render view, see vuRenderControllerGetVideoBackgroundViewport, vuRenderControllerGetVideoBackgroundViewInfo and VuVideoBackgroundViewInfo::viewport.
If a viewport mode has been set via vuRenderControllerSetVideoBackgroundViewportMode the viewport will be calculated based on the viewport mode, the render view config (see vuRenderControllerSetRenderViewConfig), the view orientation (see vuPlatformControllerSetViewOrientation) and the camera image resolution.
If a custom viewport has been set via vuRenderControllerSetVideoBackgroundViewport the viewport will be calculated based on the custom viewport and the render view config only.
If no render view config is available (either explicitly via vuRenderControllerSetRenderViewConfig or a default one) this will be set to the zero-vector.
VuMatrix44F vbProjectionMatrix |
Video background projection matrix immediately suitable for rendering in OpenGL.
If a viewport mode has been set via vuRenderControllerSetVideoBackgroundViewportMode the video background projection matrix will be calculated based on the viewport mode, the render view config (see vuRenderControllerSetRenderViewConfig), the view orientation (see vuPlatformControllerSetViewOrientation) and the camera image resolution.
If a custom viewport has been set via vuRenderControllerSetVideoBackgroundViewport the viewport will be calculated based on the custom viewport, the render view config (see vuRenderControllerSetRenderViewConfig), the view orientation (see vuPlatformControllerSetViewOrientation) and the camera image resolution.
If no render view config is available (either explicitly via vuRenderControllerSetRenderViewConfig or a default one) this will be set to the zero-matrix.
VuMesh* vbMesh |
Video background mesh.
Will be NULL if the state is acquired before the first camera frame is retrieved by Vuforia or if running on a see-through eyewear device
The video background mesh is bound to the lifetime of the VuState it was retrieved from. Do not use this pointer or the data it points to beyond the lifetime of the respective VuState.
If no render view config is available (either explicitly via vuRenderControllerSetRenderViewConfig or a default one) this will be set to NULL.
VuMatrix44F viewMatrix |
View matrix (inverse of device pose) immediately suitable for rendering in OpenGL.
This is set to the identity matrix if there is no active device pose observer.
For details about the convention used, see the documentation of VuMatrix44F.
VuMatrix44F projectionMatrix |
Projection matrix (using near/far plane values set in render controller)
Vuforia Engine creates a projection matrix from the latest intrinsic camera calibration information available on the current device, which you can retrieve from the Vuforia State via vuStateGetCameraIntrinsics. The projection matrix uses an OpenGL-style column-major matrix with the following right-handed coordinate system convention for the view space:
Rendering solutions using a backend with the same matrix convention as OpenGL can use the matrix as is, while those with a different convention (e.g. DirectX) require conversion before use.
Vuforia Engine's projection matrix convention is described as follows. Let's assume that the pose matrix retrieved from an observation via vuObservationGetPoseInfo in VuPoseInfo::pose is set to identity, and the near/far clipping planes have been set up accordingly (e.g. from 0.01f to 100.0f) via vuRenderControllerSetProjectionMatrixNearFar.
Since the Vuforia Engine API provides access to the intrinsic camera calibration, you can always build your own projection matrix if your application uses a rendering solution that requires a different convention. In this case, the observations' pose matrix must be also converted accordingly.
If a viewport mode has been set via vuRenderControllerSetVideoBackgroundViewportMode the projection matrix will be calculated based on the viewport mode, the render view config (see vuRenderControllerSetRenderViewConfig), the view orientation (see vuPlatformControllerSetViewOrientation), the camera intrinsics, the near and far clipping planes and the camera image resolution.
If a custom viewport has been set via vuRenderControllerSetVideoBackgroundViewport the projection matrix will be calculated based on the custom viewport, the render view config, the view orientation, the camera intrinsics and the near/far clipping planes.
If no render view config is available (either explicitly via vuRenderControllerSetRenderViewConfig or a default one) the projection matrix will be calculated based on the camera intrinsics, near/far clipping planes and the view orientation.