#include <Scene.h>
Inheritance diagram for nvsg::Scene:
Public Member Functions | |
NVSG_API void | setBackColor (const nvmath::Vec3f &color) |
Set the background color. | |
NVSG_API const nvmath::Vec3f & | getBackColor (void) const |
Get the background color. | |
NVSG_API void | addCamera (const Camera *pCamera) |
Add a camera to this scene. | |
NVSG_API void | removeCamera (size_t index) |
Remove a camera from the scene. | |
NVSG_API const Camera * | getCamera (size_t index=0) const |
Get a camera of the scene. | |
NVSG_API size_t | getNumberOfCameras (void) const |
Get the number of cameras in the scene. | |
NVSG_API size_t | getNumberOfCameraAnimations (void) const |
Get the number of camera animations in the scene. | |
NVSG_API void | addCameraAnimation (const Animation< nvmath::Trafo > *pAnimation) |
Add a camera animation to this scene. | |
NVSG_API const Animation< nvmath::Trafo > * | getCameraAnimation (size_t index=0) const |
Get a camera animation of the scene. | |
NVSG_API void | removeCameraAnimation (size_t index) |
Remove a camera animation from the scene. | |
NVSG_API size_t | getNumberOfFrames (void) const |
Get the number of animation frames. | |
NVSG_API void | setRootNode (const Node *root) |
Set the root node. | |
NVSG_API const Node * | getRootNode (void) const |
Get the root node of the scene tree. | |
NVSG_API void | setDefaultStateSet (const StateSet *pStateSet) |
Set the default state set. | |
NVSG_API const StateSet * | getDefaultStateSet (void) const |
Get the default state set of the scene. | |
NVSG_API void | setOverrideStateSet (const StateSet *pStateSet) |
Set the override state set. | |
NVSG_API const StateSet * | getOverrideStateSet (void) const |
Get the override state set of the scene. | |
NVSG_API bool | containsCgFx (void) const |
Ask if this Scene contains any CgFx attribute. | |
NVSG_API bool | containsLight (void) const |
Ask if this Scene contains any LightSource. | |
NVSG_API bool | containsTransparentMaterial (void) const |
Ask if this Scene contains any transparent Material attribute. | |
NVSG_API bool | containsTransparentTexture (void) const |
Ask if this Scene contains any transparent Texture. | |
NVSG_API bool | waitToRead (size_t milliseconds=0xFFFFFFFF) const |
Acquire read access in a multithreaded environment. | |
NVSG_API void | doneReading (void) const |
Signal finished reading the object. | |
NVSG_API bool | waitToWrite (size_t milliseconds=0xFFFFFFFF) const |
Acquire write access in a multithreaded enviroment. | |
NVSG_API void | doneWriting (void) const |
Signal when finished writing the object. | |
Static Public Member Functions | |
static NVSG_API const Scene * | create (void) |
Create a Scene. | |
Protected Member Functions | |
NVSG_API | Scene (void) |
Constructor. | |
virtual NVSG_API | ~Scene (void) |
Protected destructor to prevent explicit creation on stack. |
|
Constructor.
|
|
Protected destructor to prevent explicit creation on stack.
|
|
Create a Scene.
|
|
Set the background color.
|
|
Get the background color.
|
|
Add a camera to this scene. A scene holds a list of cameras from which one can be selected for viewing. The reference count for the camera is incremented.
|
|
Remove a camera from the scene.
|
|
Get a camera of the scene.
|
|
Get the number of cameras in the scene. A scene holds a list of cameras from which one can be selected for viewing.
|
|
Get the number of camera animations in the scene. A scene holds a list of camera animations from which one can be selected (independently from the camera) for animated viewing.
|
|
Add a camera animation to this scene. A scene holds a list of camera animations from which one can be selected (independently from the camera) for animated viewing. The reference count for the animation is incremented.
|
|
Get a camera animation of the scene.
|
|
Remove a camera animation from the scene.
|
|
Get the number of animation frames. All animations in a scene must have the same number of steps. This number is queried here.
|
|
Set the root node. If there already is a root node, it is dereferenced; the reference count of the new root node is incremented.
|
|
Get the root node of the scene tree.
|
|
Set the default state set. If a geometry in this scene doesn't have a StateAttribute of a special kind, but there is one in this default StateSet, the default one is used. If there is already a defaul StateSet, it is dereferenced; the reference count of this StateSet is incremented.
|
|
Get the default state set of the scene. If a geometry in this scene doesn't have a StateAttribute of a special kind, but there is one in this default StateSet, the default one (if there is one) is used. |
|
Set the override state set. If there is an override state set in the scene, all geometries are rendered using that state set, ignoring any other state set in the scene.
|
|
Get the override state set of the scene. If there is an override state set in the scene, all geometries are rendered using that state set, ignoring any other state set in the scene. |
|
Ask if this Scene contains any CgFx attribute.
|
|
Ask if this Scene contains any LightSource.
|
|
Ask if this Scene contains any transparent Material attribute.
|
|
Ask if this Scene contains any transparent Texture.
|
|
Acquire read access in a multithreaded environment. For safety in a multithreaded environment, an object maintains a read/write locking mechanism that allows contemporaneous access for multiple readers but write access for only a single writer.
|
|
Signal finished reading the object. A read access to this object, that has been acquired by a previous call to waitToRead, will be ended by a call to this function. |
|
Acquire write access in a multithreaded enviroment. For safety in a multithreaded environment, an object maintains a read/write locking mechanism that allows contemporaneous access for multiple readers but write access for only a single writer.
|
|
Signal when finished writing the object. A write access to this object that has been acquired by a previous call to waitToWrite will be ended by a call to this function. |