VuoSceneRenderer interface.
Definition in file VuoSceneRenderer.h.
Go to the source code of this file.
Typedefs | |
typedef void * | VuoSceneRenderer |
An object for rendering a scenegraph. More... | |
Functions | |
VuoSceneRenderer | VuoSceneRenderer_make (float backingScaleFactor) |
Creates a reference-counted object for rendering a scenegraph. More... | |
void | VuoSceneRenderer_regenerateProjectionMatrix (VuoSceneRenderer sceneRenderer, unsigned int width, unsigned int height) |
Using the first camera found in the scene (or VuoSceneObject_makeDefaultCamera() if there is no camera in the scene), recalculates the projection matrix based on the specified viewport width and height . More... | |
void | VuoSceneRenderer_renderToImage (VuoSceneRenderer sceneRenderer, VuoImage *image, VuoImageColorDepth imageColorDepth, VuoMultisample multisample, VuoImage *depthImage, bool invertDepthImage) |
Renders the scene onto image and optionally depthImage . More... | |
VuoIoSurface | VuoSceneRenderer_renderToIOSurface (VuoSceneRenderer sceneRenderer, VuoImageColorDepth imageColorDepth, VuoMultisample multisample, bool includeDepthBuffer) |
Renders the scene onto an IOSurface. More... | |
void | VuoSceneRenderer_setRootSceneObject (VuoSceneRenderer sceneRenderer, VuoSceneObject rootSceneObject) |
Changes the scenegraph to be rendered. More... | |
VuoSceneObject | VuoSceneRenderer_getRootSceneObject (VuoSceneRenderer sceneRenderer, bool *isValid) |
Returns the scenegraph to be rendered. More... | |
void | VuoSceneRenderer_setCameraName (VuoSceneRenderer sceneRenderer, VuoText cameraName, VuoBoolean useLeftCamera) |
Changes the name of the camera to look for. More... | |
typedef void* VuoSceneRenderer |
An object for rendering a scenegraph.
Definition at line 23 of file VuoSceneRenderer.h.
VuoSceneObject VuoSceneRenderer_getRootSceneObject | ( | VuoSceneRenderer | sr, |
bool * | isValid | ||
) |
Returns the scenegraph to be rendered.
This function only returns valid data after VuoSceneRenderer_draw has been called.
This function may be called from any thread.
Definition at line 1575 of file VuoSceneRenderer.cc.
VuoSceneRenderer VuoSceneRenderer_make | ( | float | backingScaleFactor | ) |
Creates a reference-counted object for rendering a scenegraph.
This function may be called from any thread.
Definition at line 255 of file VuoSceneRenderer.cc.
void VuoSceneRenderer_regenerateProjectionMatrix | ( | VuoSceneRenderer | sr, |
unsigned int | width, | ||
unsigned int | height | ||
) |
Using the first camera found in the scene (or VuoSceneObject_makeDefaultCamera() if there is no camera in the scene), recalculates the projection matrix based on the specified viewport width
and height
.
This function may be called from any thread.
Definition at line 339 of file VuoSceneRenderer.cc.
void VuoSceneRenderer_renderToImage | ( | VuoSceneRenderer | sr, |
VuoImage * | image, | ||
VuoImageColorDepth | imageColorDepth, | ||
VuoMultisample | multisample, | ||
VuoImage * | depthImage, | ||
bool | invertDepthImage | ||
) |
Renders the scene onto image
and optionally depthImage
.
If depthImage
is NULL, the scenegraph is traversed in depth-first order for rendering. If non-NULL, objects are rendered according to their distance from the camera (opaque objects front-to-back, then transparent objects back-to-front).
Definition at line 1839 of file VuoSceneRenderer.cc.
VuoIoSurface VuoSceneRenderer_renderToIOSurface | ( | VuoSceneRenderer | sr, |
VuoImageColorDepth | imageColorDepth, | ||
VuoMultisample | multisample, | ||
bool | includeDepthBuffer | ||
) |
Renders the scene onto an IOSurface.
If includeDepthBuffer
is false, the scenegraph is traversed in depth-first order for rendering. If true, objects are rendered according to their distance from the camera (opaque objects front-to-back, then transparent objects back-to-front).
Definition at line 1868 of file VuoSceneRenderer.cc.
void VuoSceneRenderer_setCameraName | ( | VuoSceneRenderer | sr, |
VuoText | cameraName, | ||
VuoBoolean | useLeftCamera | ||
) |
Changes the name of the camera to look for.
The first camera whose name contains cameraName
will be rendered (next time VuoSceneRenderer_draw()
is called), or, if no camera matches, VuoSceneObject_makeDefaultCamera()
will be used.
If cameraName
is stereoscopic, useLeftCamera
selects between the left and right cameras in the stereo pair.
This function may be called from any thread.
Definition at line 1591 of file VuoSceneRenderer.cc.
void VuoSceneRenderer_setRootSceneObject | ( | VuoSceneRenderer | sr, |
VuoSceneObject | rootSceneObject | ||
) |
Changes the scenegraph to be rendered.
This function retains the scene, but it isn't uploaded to the GPU until you call VuoSceneRenderer_draw.
This function may be called from any thread.
Definition at line 1549 of file VuoSceneRenderer.cc.