Classes | |
struct | VuRenderViewConfig |
configure the current view More... | |
struct | VuVideoBackgroundViewInfo |
Video background view information. More... | |
struct | VuRenderVideoBackgroundData |
Video background texture input. More... | |
Functions | |
VuResult | vuEngineGetRenderController (const VuEngine *engine, VuController **controller) |
Retrieve Render Controller to get access to rendering-specific functionality in Engine. | |
VuResult | vuRenderControllerSetRenderViewConfig (VuController *controller, const VuRenderViewConfig *renderViewConfig) |
Set the current render view configuration. | |
VuResult | vuRenderControllerGetRenderViewConfig (const VuController *controller, VuRenderViewConfig *renderViewConfig) |
Get the current render view configuration. | |
VuResult | vuRenderControllerGetVideoBackgroundViewport (const VuController *controller, VuVector4I *vbViewport) |
Get the video background viewport. | |
VuResult | vuRenderControllerSetVideoBackgroundViewport (VuController *controller, const VuVector4I *vbViewport) |
Configure a custom video background viewport (its location/size on screen) | |
VuResult | vuRenderControllerSetVideoBackgroundViewportMode (VuController *controller, VuVideoBackgroundViewportMode vbMode) |
Configure the video background viewport mode. | |
VuResult | vuRenderControllerGetVideoBackgroundViewInfo (const VuController *controller, VuVideoBackgroundViewInfo *viewInfo) |
Get video background view information for rendering view background. | |
VuResult | vuRenderControllerUpdateVideoBackgroundTexture (VuController *controller, const VuState *state, const VuRenderVideoBackgroundData *renderVBData) |
Update the texture data to use for rendering the video background. | |
VuResult | vuRenderControllerSetProjectionMatrixNearFar (VuController *controller, float nearPlane, float farPlane) |
Set the values for the near and far plane used by Engine for calculating the projection matrix. | |
VuResult | vuRenderControllerGetProjectionMatrixNearFar (const VuController *controller, float *nearPlane, float *farPlane) |
Get the values of the near and far planes currently used by Engine for calculating the projection matrix. | |
This controller allows you to control the rendering functionalities of the Vuforia SDK include video background configuration.
VuResult vuRenderControllerSetRenderViewConfig | ( | VuController * | controller, |
const VuRenderViewConfig * | renderViewConfig ) |
Set the current render view configuration.
VuResult vuRenderControllerGetRenderViewConfig | ( | const VuController * | controller, |
VuRenderViewConfig * | renderViewConfig ) |
Get the current render view configuration.
VuResult vuRenderControllerGetVideoBackgroundViewport | ( | const VuController * | controller, |
VuVector4I * | vbViewport ) |
Get the video background viewport.
If a custom viewport has been set via vuRenderControllerSetVideoBackgroundViewport this viewport will be returned. The custom viewport will also be returned when Engine is not running.
If a custom viewport has NOT been set via vuRenderControllerSetVideoBackgroundViewport, Vuforia will calculate a viewport based on the render view config and the current VuVideoBackgroundViewportMode.
Vuforia Engine will calculate the viewport only after Vuforia Engine has been started and a render view config is available. The calculated viewport can also only be requested while Engine is running.
The calculated video-background viewport is adjusted to fit the native video, based on the currently set VuVideoBackgroundViewportMode. In particular, the calculated viewport will match the aspect ratio of the native video stream. It might thereby exceed the bounds of the render view provided via vuRenderControllerSetRenderViewConfig. It is not intended directly for rendering, for this purpose you should use the viewport reported via the render state in VuRenderState::viewport that has been rescaled to fit the render view. You can then use the calculated viewport here to calculate the rescaling factor that has been applied to the render state viewport, for example to calculate the camera image space coordinates from coordinates in the render view space.
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.
VuResult vuRenderControllerSetVideoBackgroundViewport | ( | VuController * | controller, |
const VuVector4I * | vbViewport ) |
Configure a custom video background viewport (its location/size on screen)
VuResult vuRenderControllerSetVideoBackgroundViewportMode | ( | VuController * | controller, |
VuVideoBackgroundViewportMode | vbMode ) |
Configure the video background viewport mode.
VuResult vuRenderControllerGetVideoBackgroundViewInfo | ( | const VuController * | controller, |
VuVideoBackgroundViewInfo * | viewInfo ) |
Get video background view information for rendering view background.
VuResult vuRenderControllerSetProjectionMatrixNearFar | ( | VuController * | controller, |
float | nearPlane, | ||
float | farPlane ) |
Set the values for the near and far plane used by Engine for calculating the projection matrix.
VuResult vuRenderControllerGetProjectionMatrixNearFar | ( | const VuController * | controller, |
float * | nearPlane, | ||
float * | farPlane ) |
Get the values of the near and far planes currently used by Engine for calculating the projection matrix.