Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

nvsg::ViewState Class Reference

Class to encapsulate the view specific states. More...

#include <ViewState.h>

Inheritance diagram for nvsg::ViewState:

Inheritance graph
[legend]
Collaboration diagram for nvsg::ViewState:

Collaboration graph
[legend]
List of all members.

Public Methods

NVSG_API const ViewState * clone () const
 Instantiates a constant copy of this ViewState object. More...

NVSG_API size_t getAnimationFrame (void) const
 Get the current animation frame. More...

NVSG_API const CameragetCamera (void) const
 Get the current camera. More...

NVSG_API bool isAnimating (void) const
 Ask if the view is animated. More...

NVSG_API bool isStereo (void) const
 Ask if the view is in stereo mode. More...

NVSG_API void setAnimationFrame (size_t frame)
 Set the animation frame. More...

NVSG_API void setAnimation (bool state)
 Enable/Disable animation. More...

NVSG_API void setCamera (const Camera *pCamera)
 Set the current camera. More...

NVSG_API void setStereo (bool state)
 Enable/Disable stereo. More...

NVSG_API void clearCullTree (void) const
 Clear the current cull tree. More...

NVSG_API const CullDatagetCullTree (void) const
 Get the root of the CullData-tree. More...

NVSG_API void setCullTree (const CullData *cullTree)
 Set a given cull tree as the current. More...

NVSG_API bool waitToRead (size_t milliseconds=0xFFFFFFFF) const
 Acquire read access in a multithreaded environment. More...

NVSG_API void doneReading (void) const
 Signal when finished reading the object. More...

NVSG_API bool waitToWrite (size_t milliseconds=0xFFFFFFFF) const
 Acquire write access in a multithreaded enviroment. More...

NVSG_API void doneWriting (void) const
 Signal finished writing the object. More...


Static Public Methods

NVSG_API const ViewState * create ()
 Instantiates a default-constructed constant ViewState. More...


Protected Methods

NVSG_API ViewState (void)
 Default-initializes a ViewState object. More...

NVSG_API ViewState (const ViewState &rhs)
 Initializes a ViewState as a copy of another ViewState object. More...

virtual NVSG_API ~ViewState (void)
 Protected destructor to prevent explicit creation on stack. More...


Detailed Description

Class to encapsulate the view specific states.


Constructor & Destructor Documentation

NVSG_API nvsg::ViewState::ViewState void    [protected]
 

Default-initializes a ViewState object.

Note:
A default-constructwed ViewState has no camera attached!

NVSG_API nvsg::ViewState::ViewState const ViewState &    rhs [protected]
 

Initializes a ViewState as a copy of another ViewState object.

Note:
The new constructed ViewState will not inherit the cull tree from the source ViewState
  • that is the cull tree for the new constructed ViewState initially is cleared!

virtual NVSG_API nvsg::ViewState::~ViewState void    [protected, virtual]
 

Protected destructor to prevent explicit creation on stack.


Member Function Documentation

NVSG_API const ViewState* nvsg::ViewState::create   [static]
 

Instantiates a default-constructed constant ViewState.

Returns:
A pointer to the new created ViewState.

NVSG_API const ViewState* nvsg::ViewState::clone   const
 

Instantiates a constant copy of this ViewState object.

Note:
The new copy does not inherit this ViewState's cull information but will initialy have its cull tree cleared!
Returns:
A pointer to the copy-constructed ViewState.

size_t nvsg::ViewState::getAnimationFrame void    const [inline]
 

Get the current animation frame.

Returns:
The current animation frame

const Camera * nvsg::ViewState::getCamera void    const [inline]
 

Get the current camera.

Returns:
A pointer to the camera in use with this view

bool nvsg::ViewState::isAnimating void    const [inline]
 

Ask if the view is animated.

Returns:
true if this view is currently animated, otherwise false

bool nvsg::ViewState::isStereo void    const [inline]
 

Ask if the view is in stereo mode.

Returns:
true if this view is currently in stereo mode, otherwise false

void nvsg::ViewState::setAnimationFrame size_t    frame [inline]
 

Set the animation frame.

Parameters:
frame  frame to use for next evaluation

void nvsg::ViewState::setAnimation bool    state [inline]
 

Enable/Disable animation.

Parameters:
state  true, to enable animation in this view, otherwise false

void nvsg::ViewState::setCamera const Camera   pCamera [inline]
 

Set the current camera.

Parameters:
pCamera  pointer to camera to use in this view

void nvsg::ViewState::setStereo bool    state [inline]
 

Enable/Disable stereo.

Parameters:
state  true, to enable stereo display, otherwise false

NVSG_API void nvsg::ViewState::clearCullTree void    const
 

Clear the current cull tree.

const CullData * nvsg::ViewState::getCullTree void    const [inline]
 

Get the root of the CullData-tree.

void nvsg::ViewState::setCullTree const CullData   cullTree [inline]
 

Set a given cull tree as the current.

bool nvsg::ViewState::waitToRead size_t    milliseconds = 0xFFFFFFFF const [inline]
 

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.

This function returns either when it gets read access or when the time-out interval elapses. By default, this function waits indefinitely.

Returns:
true, if read access could be acquired, false otherwise.

void nvsg::ViewState::doneReading void    const [inline]
 

Signal when 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.

bool nvsg::ViewState::waitToWrite size_t    milliseconds = 0xFFFFFFFF const [inline]
 

Acquire write access in a multithreaded enviroment.

or 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.

This function returns either when it gets write access or when the time-out interval elapses. By default, this function waits indefinitely.

Returns:
true, if write access could be acquired, false otherwise.
Parameters:
milliseconds  Time-out interval, in milliseconds.

void nvsg::ViewState::doneWriting void    const [inline]
 

Signal 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.


The documentation for this class was generated from the following file:
Generated on Tue Mar 1 13:20:35 2005 for NVSGSDK by NVIDIA