#include <RenderArea.h>
Inheritance diagram for nvui::RenderArea:
Public Methods | |
virtual NVSG_API | ~RenderArea (void) |
Destructor. More... | |
virtual NVSG_API bool | init (RenderArea *shareArea=NULL) |
Create the render area. More... | |
virtual NVSG_API void | destroy (void) |
Destroy the render area. More... | |
virtual NVSG_API void | keyDown (UINT key, bool keyRepeated=false) |
Handle key down. More... | |
virtual NVSG_API void | keyUp (UINT key) |
Handle key up. More... | |
virtual NVSG_API void | resetKeyState (void) |
Reset the current key state. More... | |
virtual NVSG_API void | mouseButtonDown (UINT btn, int x, int y) |
Handle mouse button down. More... | |
virtual NVSG_API void | mouseButtonUp (UINT btn, int x, int y) |
Handle mouse button up. More... | |
virtual NVSG_API void | resetButtonState (void) |
Reset the current button state. More... | |
virtual NVSG_API void | mouseMotion (int x, int y) |
Handle mouse motion. More... | |
virtual NVSG_API void | renderScene (void) |
Render the scene. More... | |
virtual NVSG_API void | setViewportSize (size_t width, size_t height) |
Handle the viewport resizing. More... | |
NVSG_API bool | pickCameraTargetPoint (int x, int y) |
Pick the cameras' target point. More... | |
NVSG_API nvtraverser::RenderTraverser * | getRenderTraverser (void) const |
Get the current render traverser. More... | |
NVSG_API void | setRenderTraverser (nvtraverser::RenderTraverser *tr) |
Set the current render traverser. More... | |
NVSG_API void | setAppTraverser (nvtraverser::AppTraverser *tr) |
Set the current app traverser. More... | |
NVSG_API nvtraverser::AppTraverser * | getAppTraverser () const |
Get the current app traverser. More... | |
NVSG_API void | pushCullTraverser (nvtraverser::CullTraverser *tr) |
Add a cull traverser to the cull pipeline. More... | |
NVSG_API void | popCullTraverser () |
Remove a cull traverser from the cull pipeline. More... | |
NVSG_API size_t | getNumberOfCullTraverser () const |
Get the number of culling stages in the culling pipeline. More... | |
NVSG_API nvtraverser::CullTraverser * | getCullTraverser (size_t position) const |
Get the specified cull traverser. More... | |
NVSG_API const nvsg::ViewState * | getViewState (void) const |
Get the current view state. More... | |
NVSG_API void | setViewState (const nvsg::ViewState *viewState) |
Set the current view state. More... | |
NVSG_API float | getAspectRatio (void) const |
Get the current aspect ratio of the render area. More... | |
NVSG_API bool | isStereoAvailable (void) |
Check if stereo is available for the current render area. More... | |
NVSG_API void | requestFSAA (bool bOn, unsigned int numBuffers) |
Request full-scene antialiasing (FSAA) support. More... | |
NVSG_API void | requestStereoSupport (bool bStereo) |
Request stereo support. More... | |
NVSG_API void | setSceneData (nvui::CameraManipulator *pCamManip, const nvsg::Scene *pScene, const nvsg::ViewState *pViewState=NULL) |
Sets the Scene to be rendered together with render-specific view data. More... | |
virtual NVSG_API void | triggerRedraw (void) |
Static Public Methods | |
NVSG_API size_t | createNewRenderAreaID () |
Trigger a redraw of the scene. More... | |
Protected Types | |
enum | { _UNDEFINED = 0x00000000, _STEREO = 0x00000001, _MULTISAMPLE = 0x00000002 } |
Possible features of the render area. (mainly influencing the pixelformat - OGL). More... | |
Protected Methods | |
NVSG_API | RenderArea (void) |
Default constructor. More... | |
Protected Attributes | |
std::vector< nvtraverser::CullTraverser * > | m_cullTraverser |
These traversers cull objects in the tree. More... | |
nvtraverser::RenderTraverser * | m_renderTraverser |
This traverser renders / displays the tree. More... | |
nvtraverser::AppTraverser * | m_appTraverser |
This traversers applie all pending changes to the tree. More... | |
CameraManipulator * | m_camManip |
Camera manipulator. Could be NULL! More... | |
const nvsg::Scene * | m_scene |
Pointer to the root node of the scene. m_scene could be NULL !! More... | |
const nvsg::ViewState * | m_viewState |
Pointer to the view specific controls (camera, animation state,...). More... | |
unsigned long | m_features |
All requested features for this render area stereo, multisample, ... More... | |
UINT | m_numMSBuffers |
Number of multi sample buffers. More... | |
bool | m_raCreated |
Signal the Create() status. More... | |
size_t | m_raHeight |
Height of the render area. More... | |
size_t | m_raWidth |
Width of the render area. More... | |
Static Protected Attributes | |
size_t | m_idRenderArea |
The child window ID for the different CWnd derived render area windows. (e.g. GLMFCRAWnd) Use this ID in the create call - see CWnd->Create() - (don't forget to increment the ID before using it). More... |
This class provides a generic interface to a render target view that is independent of device, hardware, and operating system specifics.
|
Possible features of the render area. (mainly influencing the pixelformat - OGL).
|
|
Destructor.
|
|
Default constructor.
|
|
Create the render area. This method creates and initializes the render area.
Reimplemented in nvui::GLWinRenderArea. |
|
Destroy the render area. This method destroys and cleans up the render area. Reimplemented in nvui::GLWinRenderArea. |
|
Handle key down. React on a key down event. (For example, report it to the camera manipulator.)
|
|
Handle key up. React on a key down event. (For example, report it to the camera manipulator.)
|
|
Reset the current key state. This method also resets the camera manipulator key states. |
|
Handle mouse button down. React on mouse button down events. (For example, report it to the current camera manipulator.)
Reimplemented in nvui::GLWinRenderArea. |
|
Handle mouse button up. React on mouse button up events. (For example, report it to the current camera manipulator.)
Reimplemented in nvui::GLWinRenderArea. |
|
Reset the current button state. This method also resets the camera manipulator button states. |
|
Handle mouse motion. React on mouse motion events. (For example, report it to the current camera manipulator.)
Reimplemented in nvui::GLWinRenderArea. |
|
Render the scene. Render the entire scene. (app, cull, draw the whole tree) If you want to trigger this method, use triggerRedraw() to force a redraw of the scene. Reimplemented in nvui::GLWinRenderArea. |
|
Handle the viewport resizing. Resize the viewport. React on parent window size changes. Report it to OpenGL, to the render window, or to the camera manipulator.
Reimplemented in nvui::GLWinRenderArea. |
|
Pick the cameras' target point. Determine the target point and report it to the current camera. This method takes the mouse coordinates and sends a ray into the scene to calculate the nearest intersection with an object from the scene. It then takes the intersection and reports it to the camera, where the camera can use it as the rotation point, etc.
|
|
Get the current render traverser.
|
|
Set the current render traverser. The old render traverser will be unreferenced and the new one will be referenced.
|
|
Set the current app traverser. The old app traverser will be unreferenced and the new one will be referenced.
|
|
Get the current app traverser.
|
|
Add a cull traverser to the cull pipeline. This method appends an additional cull traverser to the culling stage of this render area. Every additional culler will be added to the end of the culling pipeline.
|
|
Remove a cull traverser from the cull pipeline. This method removes the last cull traverser from the end of the cull pipeline.
|
|
Get the number of culling stages in the culling pipeline.
|
|
Get the specified cull traverser. Retrieve the cull traverser from the specified position of the culling pipeline.
|
|
Get the current view state.
|
|
Set the current view state. This method retrieves the viewstate from the given and copies the data into the local viewstate. |
|
Get the current aspect ratio of the render area.
|
|
Check if stereo is available for the current render area.
|
|
Request full-scene antialiasing (FSAA) support.
|
|
Request stereo support.
|
|
Sets the Scene to be rendered together with render-specific view data. The function replaces the RenderArea's current Scene by the Scene passed through pScene. The behavior is undefined if a NULL pointer is passed through pScene! The CameraManipulator passed through pCamManip replaces the RenderArea's current CameraManipulator. If a NULL pointer is passed through pCamManip, there will be no CameraManipulator attached to the RenderArea after this call! If a valid CameraManipulator is passed through pCamManip, the RenderArea's internal ViewState will always adopt the camera attached to that manipulator, regardless of whether the ViewState passed through pViewState is valid or not. If the ViewState passed through pViewState is valid, it will replace the RenderArea's current ViewState. If a NULL pointer is passed through pViewState, the RenderArea's current ViewState remains unchanged.
|
|
Trigger a redraw of the scene.
|
|
Reimplemented in nvui::GLWinRenderArea. |
|
These traversers cull objects in the tree.
|
|
This traverser renders / displays the tree.
|
|
This traversers applie all pending changes to the tree.
|
|
Camera manipulator. Could be NULL!
|
|
Pointer to the root node of the scene. m_scene could be NULL !!
|
|
Pointer to the view specific controls (camera, animation state,...).
|
|
All requested features for this render area stereo, multisample, ...
|
|
Number of multi sample buffers.
|
|
Signal the Create() status.
|
|
Height of the render area.
|
|
Width of the render area.
|
|
The child window ID for the different CWnd derived render area windows. (e.g. GLMFCRAWnd) Use this ID in the create call - see CWnd->Create() - (don't forget to increment the ID before using it).
|