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

nvtraverser::GLTraverser Class Reference

RenderTraverser using OpenGL. More...

#include <GLTraverser.h>

Inheritance diagram for nvtraverser::GLTraverser:

Inheritance graph
[legend]
Collaboration diagram for nvtraverser::GLTraverser:

Collaboration graph
[legend]
List of all members.

Public Member Functions

NVSG_API GLTraverser (void)
 Constructor.
virtual NVSG_API JitterTechnique getJitterTechnique (void) const
 Get the current jitter technique.
virtual NVSG_API bool isJitterTechniqueSupported (JitterTechnique jt) const
 Test on supported jitter techniques.
virtual NVSG_API bool setJitterTechnique (JitterTechnique jt)
 Set the jitter technique the render should use.
virtual NVSG_API RenderTechnique getRenderTechnique (void) const
 Get the current render technique.
virtual NVSG_API bool isRenderTechniqueSupported (RenderTechnique rt) const
 Test on supported render techhniques.
virtual NVSG_API bool setRenderTechnique (RenderTechnique rt)
 Set the render technique the render should use.
virtual NVSG_API TransparencyTechnique getTransparencyTechnique (void) const
 Get the current transparency technique.
virtual NVSG_API bool isTransparencyTechniqueSupported (TransparencyTechnique tt) const
 Test on supported transparency techhniques.
virtual NVSG_API bool setTransparencyTechnique (TransparencyTechnique tt)
 Set the transparency technique the render should use.
virtual NVSG_API OITTechnique getOITTechnique (void) const
 Get the current OIT (Order Independent Transparency) technique.
virtual NVSG_API bool isOITTechniqueSupported (OITTechnique ot) const
 Test on supported OIT techhniques.
virtual NVSG_API bool setOITTechnique (OITTechnique ot)
 Set the OIT technique the render should use.
virtual NVSG_API size_t getOITMaxPasses (void) const
 Get maximum OIT passes.
virtual NVSG_API bool setOITMaxPasses (size_t maxPasses)
 Set the number of maxumum passes to archieve the desired transparency effect.
virtual NVSG_API float getOITThreshold (void) const
 Get the current threshold.
virtual NVSG_API bool setOITThreshold (float threshold)
 Set the threshold.
virtual NVSG_API GeometryCacheTechnique getGeometryCacheTechnique (void) const
 Get the current geoemtry caching technique.
virtual NVSG_API bool isGeometryCacheTechniqueSupported (GeometryCacheTechnique gct) const
 Test on supported geometry caching techhniques.
virtual NVSG_API bool setGeometryCacheTechnique (GeometryCacheTechnique gct)
 Set the geometry caching technique the render should use.
virtual NVSG_API void getTextureSizeLimits (size_t &width, size_t &height) const
 Get the texture size limits.
virtual NVSG_API void setTextureSizeLimits (size_t width, size_t height)
 Set the texture size limits.
virtual NVSG_API void onReleaseDAL (nvsg::HDAL hDAL)

Protected Member Functions

virtual NVSG_API ~GLTraverser (void)
 Destructor.
virtual NVSG_API void doApply (const nvsg::ViewState *pViewState, const nvsg::Scene *pScene)
 Initiate traversing a given scene graph.
virtual NVSG_API void handleTransform (const nvsg::Transform *p)
 Routine to handle a Transform node while traversing the scene graph.
virtual NVSG_API void handleDirectedLight (const nvsg::DirectedLight *p)
 Routine to handle a DirectedLight node while traversing the scene graph.
virtual NVSG_API void handlePointLight (const nvsg::PointLight *p)
 Routine to handle a PointLight node while traversing the scene graph.
virtual NVSG_API void handleSpotLight (const nvsg::SpotLight *p)
 Routine to handle a SpotLight node while traversing the scene graph.
virtual NVSG_API void handleQuads (const nvsg::Quads *p)
 Routine to handle a Quads object while traversing the scene graph.
virtual NVSG_API void handleAnimatedQuads (const nvsg::AnimatedQuads *p)
 Routine to handle a AnimatedQuads object while traversing the scene graph.
virtual NVSG_API void handleQuadStrips (const nvsg::QuadStrips *p)
 Routine to handle a QuadStrips object while traversing the scene graph.
virtual NVSG_API void handleTriangles (const nvsg::Triangles *p)
 Routine to handle a Triangles object while traversing the scene graph.
virtual NVSG_API void handleAnimatedTriangles (const nvsg::AnimatedTriangles *p)
 Routine to handle a AnimatedTriangles object while traversing the scene graph.
virtual NVSG_API void handleSkinnedTriangles (const nvsg::SkinnedTriangles *p)
 Routine to handle a SkinnedTriangles object while traversing the scene graph.
virtual NVSG_API void handleTriStrips (const nvsg::TriStrips *p)
 Routine to handle a TriStrips object while traversing the scene graph.
virtual NVSG_API void handleStateSet (const nvsg::StateSet *p)
 Routine to handle a StateSet object while traversing the scene graph.
virtual NVSG_API void handleCgFx (const nvsg::CgFx *p)
 Routine to handle a CgFx attribute while traversing the scene graph.
virtual NVSG_API void handleFaceAttribute (const nvsg::FaceAttribute *p)
 Routine to handle a FaceAttribute attribute while traversing the scene graph.
virtual NVSG_API void handleMaterial (const nvsg::Material *p)
 Routine to handle a Material attribute while traversing the scene graph.
virtual NVSG_API void handleTextureAttribute (const nvsg::TextureAttribute *p)
 Routine to handle a TextureAttribute attribute while traversing the scene graph.
virtual NVSG_API void handleTextureAttributeItem (const nvsg::TextureAttributeItem *p, size_t tu)
 Routine to handle a TextureAttributeItem object while traversing the scene graph.
virtual NVSG_API void handleJitterCamera (const nvsg::JitterCamera *p, const nvsg::Node *root)
 Routine to handle a JitterCamera object while traversing the scene graph.
virtual NVSG_API void handleParallelCamera (const nvsg::ParallelCamera *p, const nvsg::Node *root)
 Routine to handle a ParallelCamera object while traversing the scene graph.
virtual NVSG_API void handlePerspectiveCamera (const nvsg::PerspectiveCamera *p, const nvsg::Node *root)
 Routine to handle a PerspectiveCamera object while traversing the scene graph.
virtual NVSG_API void handleStereoCamera (const nvsg::StereoCamera *p, const nvsg::Node *root)
 Routine to handle a StereoCamera object while traversing the scene graph.
virtual NVSG_API void handleHighlightBox (const nvsg::HighlightBox *p, const nvsg::GeoSet *geoSet)
 Routine to handle a HighlightBox object while traversing the scene graph.
virtual NVSG_API void handleHighlightEdges (const nvsg::HighlightEdges *p, const nvsg::GeoSet *geoSet)
 Routine to handle a HighlightEdges object while traversing the scene graph.
virtual NVSG_API bool preTraverseTransform (const nvsg::Transform *p)
 Handles stuff to do between transform stack adjustment and traversal.
virtual NVSG_API bool preTraverseRoot (const nvsg::SimpleCamera *p, const nvsg::Node *root)
 Handles stuff to do just before the scene is traversed.
virtual NVSG_API bool preTraverseDrawable (const nvsg::Drawable *p)
 Handles stuff to do just before a Drawable is traversed.
virtual NVSG_API void disableLightSource (const nvsg::LightSource *p)
 This function is called from the RenderTraverser framework whenever a LightSource is to be disabled.

Protected Attributes

const nvsg::CgFxm_effect
bool m_resetStateAttribute

Classes

struct  DLInfo
class  StipplePatterns
struct  TexInfo
struct  VBOInfo

Detailed Description

RenderTraverser using OpenGL.


Constructor & Destructor Documentation

NVSG_API nvtraverser::GLTraverser::GLTraverser void   ) 
 

Constructor.

virtual NVSG_API nvtraverser::GLTraverser::~GLTraverser void   )  [protected, virtual]
 

Destructor.


Member Function Documentation

virtual NVSG_API JitterTechnique nvtraverser::GLTraverser::getJitterTechnique void   )  const [virtual]
 

Get the current jitter technique.

Returns:
The currently used technique.

Implements nvtraverser::RenderTraverser.

virtual NVSG_API bool nvtraverser::GLTraverser::isJitterTechniqueSupported JitterTechnique  jt  )  const [virtual]
 

Test on supported jitter techniques.

Use this method to test if this special jitter technique is currently available.

Returns:
true - supported, false - not supported
Parameters:
jt  Jitter technique.

Implements nvtraverser::RenderTraverser.

virtual NVSG_API bool nvtraverser::GLTraverser::setJitterTechnique JitterTechnique  jt  )  [virtual]
 

Set the jitter technique the render should use.

Returns:
true - everything went fine, false - not set
Parameters:
jt  Jitter technique

Implements nvtraverser::RenderTraverser.

virtual NVSG_API RenderTechnique nvtraverser::GLTraverser::getRenderTechnique void   )  const [virtual]
 

Get the current render technique.

Implements nvtraverser::RenderTraverser.

virtual NVSG_API bool nvtraverser::GLTraverser::isRenderTechniqueSupported RenderTechnique  rt  )  const [virtual]
 

Test on supported render techhniques.

Use this technique to test if this special render technique is currently available.

Returns:
true - supported, false - not supported.
Parameters:
rt  Render technique.

Implements nvtraverser::RenderTraverser.

virtual NVSG_API bool nvtraverser::GLTraverser::setRenderTechnique RenderTechnique  rt  )  [virtual]
 

Set the render technique the render should use.

Returns:
true - everything went fine, false - not set
Parameters:
rt  Render technique.

Implements nvtraverser::RenderTraverser.

virtual NVSG_API TransparencyTechnique nvtraverser::GLTraverser::getTransparencyTechnique void   )  const [virtual]
 

Get the current transparency technique.

Implements nvtraverser::RenderTraverser.

virtual NVSG_API bool nvtraverser::GLTraverser::isTransparencyTechniqueSupported TransparencyTechnique  tt  )  const [virtual]
 

Test on supported transparency techhniques.

Use this technique to test if this special transparency technique is currently available.

Returns:
true - supported, jalse - not supported.
Parameters:
tt  Transparency technique.

Implements nvtraverser::RenderTraverser.

virtual NVSG_API bool nvtraverser::GLTraverser::setTransparencyTechnique TransparencyTechnique  tt  )  [virtual]
 

Set the transparency technique the render should use.

Returns:
true - everything went fine, false - not set
Parameters:
tt  Transparency technique.

Implements nvtraverser::RenderTraverser.

virtual NVSG_API OITTechnique nvtraverser::GLTraverser::getOITTechnique void   )  const [virtual]
 

Get the current OIT (Order Independent Transparency) technique.

Implements nvtraverser::RenderTraverser.

virtual NVSG_API bool nvtraverser::GLTraverser::isOITTechniqueSupported OITTechnique  ot  )  const [virtual]
 

Test on supported OIT techhniques.

Use this technique to test if this special OIT technique is currently available.

Returns:
true - supported, jalse - not supported.
Parameters:
ot  OIT technique

Implements nvtraverser::RenderTraverser.

virtual NVSG_API bool nvtraverser::GLTraverser::setOITTechnique OITTechnique  ot  )  [virtual]
 

Set the OIT technique the render should use.

Returns:
true - everything went fine, false - not set
Parameters:
ot  OIT technique

Implements nvtraverser::RenderTraverser.

virtual NVSG_API size_t nvtraverser::GLTraverser::getOITMaxPasses void   )  const [virtual]
 

Get maximum OIT passes.

Returns:
Maximum rendering passes to archive the desired effect.

Implements nvtraverser::RenderTraverser.

virtual NVSG_API bool nvtraverser::GLTraverser::setOITMaxPasses size_t  maxPasses  )  [virtual]
 

Set the number of maxumum passes to archieve the desired transparency effect.

Returns:
true - everything went fine, false - not set
Parameters:
maxPasses  Maximum passes to render, even when threshold is not reached.

Implements nvtraverser::RenderTraverser.

virtual NVSG_API float nvtraverser::GLTraverser::getOITThreshold void   )  const [virtual]
 

Get the current threshold.

Returns:
threshold [0,1]

Implements nvtraverser::RenderTraverser.

virtual NVSG_API bool nvtraverser::GLTraverser::setOITThreshold float  threshold  )  [virtual]
 

Set the threshold.

The thereshold tells the refinement step of the OIT algorithm if it needs another pass or if it is good enough to show the rendered result. The value lies between 0 and 1 (0%-100%). The refinement step compares the percentage of drawn pixels with the threshold and stops if it is smaller than the user defined value.

Returns:
true - everything went fine, false - not set
Parameters:
threshold  Threshold [0,1]

Implements nvtraverser::RenderTraverser.

virtual NVSG_API GeometryCacheTechnique nvtraverser::GLTraverser::getGeometryCacheTechnique void   )  const [virtual]
 

Get the current geoemtry caching technique.

Implements nvtraverser::RenderTraverser.

virtual NVSG_API bool nvtraverser::GLTraverser::isGeometryCacheTechniqueSupported GeometryCacheTechnique  gct  )  const [virtual]
 

Test on supported geometry caching techhniques.

Returns:
true - supported, false - not supported.
Parameters:
gct  GeometryCache technique.

Implements nvtraverser::RenderTraverser.

virtual NVSG_API bool nvtraverser::GLTraverser::setGeometryCacheTechnique GeometryCacheTechnique  gct  )  [virtual]
 

Set the geometry caching technique the render should use.

Returns:
true - everything went fine, false - not set
Parameters:
gct  GeometryCache technique.

Implements nvtraverser::RenderTraverser.

virtual NVSG_API void nvtraverser::GLTraverser::getTextureSizeLimits size_t &  width,
size_t &  height
const [virtual]
 

Get the texture size limits.

Textures are downscaled to those limits if they are larger.

Implements nvtraverser::RenderTraverser.

virtual NVSG_API void nvtraverser::GLTraverser::setTextureSizeLimits size_t  width,
size_t  height
[virtual]
 

Set the texture size limits.

Textures are downscaled to those limits if they are larger.

Note:
Setting width or height to 0 (zero), disables the respective texture size limit.

Implements nvtraverser::RenderTraverser.

virtual NVSG_API void nvtraverser::GLTraverser::doApply const nvsg::ViewState pViewState,
const nvsg::Scene pScene
[protected, virtual]
 

Initiate traversing a given scene graph.

This overloadable function is called from the traverser's entry point apply . The base implementation first initiates the traversing of the scene's global states, if available. After that the scene itself is traversed. If an optional ViewState ViewState is passed through viewState, it is applied prior to traversing the scene.

Custom traversers may override this function in order to implement initial work to be done before traversing the scene. For derived classes to ensure proper traversing of the scene, it is recommended to always call the base implementation after the initial work has been done.

Reimplemented from nvtraverser::Traverser.

virtual NVSG_API void nvtraverser::GLTraverser::handleTransform const nvsg::Transform p  )  [protected, virtual]
 

Routine to handle a Transform node while traversing the scene graph.

Reimplemented from nvtraverser::ModelViewTraverser.

virtual NVSG_API void nvtraverser::GLTraverser::handleDirectedLight const nvsg::DirectedLight p  )  [protected, virtual]
 

Routine to handle a DirectedLight node while traversing the scene graph.

Reimplemented from nvtraverser::Traverser.

Reimplemented in nvtraverser::OcclusionCullGLTraverser.

virtual NVSG_API void nvtraverser::GLTraverser::handlePointLight const nvsg::PointLight p  )  [protected, virtual]
 

Routine to handle a PointLight node while traversing the scene graph.

Reimplemented from nvtraverser::Traverser.

Reimplemented in nvtraverser::OcclusionCullGLTraverser.

virtual NVSG_API void nvtraverser::GLTraverser::handleSpotLight const nvsg::SpotLight p  )  [protected, virtual]
 

Routine to handle a SpotLight node while traversing the scene graph.

Reimplemented from nvtraverser::Traverser.

Reimplemented in nvtraverser::OcclusionCullGLTraverser.

virtual NVSG_API void nvtraverser::GLTraverser::handleQuads const nvsg::Quads p  )  [protected, virtual]
 

Routine to handle a Quads object while traversing the scene graph.

Reimplemented from nvtraverser::Traverser.

Reimplemented in nvtraverser::OcclusionCullGLTraverser.

virtual NVSG_API void nvtraverser::GLTraverser::handleAnimatedQuads const nvsg::AnimatedQuads p  )  [protected, virtual]
 

Routine to handle a AnimatedQuads object while traversing the scene graph.

Reimplemented from nvtraverser::Traverser.

Reimplemented in nvtraverser::OcclusionCullGLTraverser.

virtual NVSG_API void nvtraverser::GLTraverser::handleQuadStrips const nvsg::QuadStrips p  )  [protected, virtual]
 

Routine to handle a QuadStrips object while traversing the scene graph.

Reimplemented from nvtraverser::Traverser.

Reimplemented in nvtraverser::OcclusionCullGLTraverser.

virtual NVSG_API void nvtraverser::GLTraverser::handleTriangles const nvsg::Triangles p  )  [protected, virtual]
 

Routine to handle a Triangles object while traversing the scene graph.

Reimplemented from nvtraverser::Traverser.

Reimplemented in nvtraverser::OcclusionCullGLTraverser.

virtual NVSG_API void nvtraverser::GLTraverser::handleAnimatedTriangles const nvsg::AnimatedTriangles p  )  [protected, virtual]
 

Routine to handle a AnimatedTriangles object while traversing the scene graph.

Reimplemented from nvtraverser::Traverser.

Reimplemented in nvtraverser::OcclusionCullGLTraverser.

virtual NVSG_API void nvtraverser::GLTraverser::handleSkinnedTriangles const nvsg::SkinnedTriangles p  )  [protected, virtual]
 

Routine to handle a SkinnedTriangles object while traversing the scene graph.

Reimplemented from nvtraverser::Traverser.

Reimplemented in nvtraverser::OcclusionCullGLTraverser.

virtual NVSG_API void nvtraverser::GLTraverser::handleTriStrips const nvsg::TriStrips p  )  [protected, virtual]
 

Routine to handle a TriStrips object while traversing the scene graph.

Reimplemented from nvtraverser::Traverser.

Reimplemented in nvtraverser::OcclusionCullGLTraverser.

virtual NVSG_API void nvtraverser::GLTraverser::handleStateSet const nvsg::StateSet p  )  [protected, virtual]
 

Routine to handle a StateSet object while traversing the scene graph.

Reimplemented from nvtraverser::Traverser.

Reimplemented in nvtraverser::OcclusionCullGLTraverser.

virtual NVSG_API void nvtraverser::GLTraverser::handleCgFx const nvsg::CgFx p  )  [protected, virtual]
 

Routine to handle a CgFx attribute while traversing the scene graph.

Reimplemented from nvtraverser::Traverser.

Reimplemented in nvtraverser::OcclusionCullGLTraverser.

virtual NVSG_API void nvtraverser::GLTraverser::handleFaceAttribute const nvsg::FaceAttribute p  )  [protected, virtual]
 

Routine to handle a FaceAttribute attribute while traversing the scene graph.

Reimplemented from nvtraverser::Traverser.

Reimplemented in nvtraverser::OcclusionCullGLTraverser.

virtual NVSG_API void nvtraverser::GLTraverser::handleMaterial const nvsg::Material p  )  [protected, virtual]
 

Routine to handle a Material attribute while traversing the scene graph.

Reimplemented from nvtraverser::Traverser.

Reimplemented in nvtraverser::OcclusionCullGLTraverser.

virtual NVSG_API void nvtraverser::GLTraverser::handleTextureAttribute const nvsg::TextureAttribute p  )  [protected, virtual]
 

Routine to handle a TextureAttribute attribute while traversing the scene graph.

Reimplemented from nvtraverser::Traverser.

Reimplemented in nvtraverser::OcclusionCullGLTraverser.

virtual NVSG_API void nvtraverser::GLTraverser::handleTextureAttributeItem const nvsg::TextureAttributeItem p,
size_t  tu
[protected, virtual]
 

Routine to handle a TextureAttributeItem object while traversing the scene graph.

Reimplemented from nvtraverser::Traverser.

Reimplemented in nvtraverser::OcclusionCullGLTraverser.

virtual NVSG_API void nvtraverser::GLTraverser::handleJitterCamera const nvsg::JitterCamera p,
const nvsg::Node root
[protected, virtual]
 

Routine to handle a JitterCamera object while traversing the scene graph.

Reimplemented from nvtraverser::Traverser.

Reimplemented in nvtraverser::OcclusionCullGLTraverser.

virtual NVSG_API void nvtraverser::GLTraverser::handleParallelCamera const nvsg::ParallelCamera p,
const nvsg::Node root
[protected, virtual]
 

Routine to handle a ParallelCamera object while traversing the scene graph.

Reimplemented from nvtraverser::RenderTraverser.

virtual NVSG_API void nvtraverser::GLTraverser::handlePerspectiveCamera const nvsg::PerspectiveCamera p,
const nvsg::Node root
[protected, virtual]
 

Routine to handle a PerspectiveCamera object while traversing the scene graph.

Reimplemented from nvtraverser::RenderTraverser.

virtual NVSG_API void nvtraverser::GLTraverser::handleStereoCamera const nvsg::StereoCamera p,
const nvsg::Node root
[protected, virtual]
 

Routine to handle a StereoCamera object while traversing the scene graph.

Reimplemented from nvtraverser::Traverser.

Reimplemented in nvtraverser::OcclusionCullGLTraverser.

virtual NVSG_API void nvtraverser::GLTraverser::handleHighlightBox const nvsg::HighlightBox p,
const nvsg::GeoSet geoSet
[protected, virtual]
 

Routine to handle a HighlightBox object while traversing the scene graph.

Reimplemented from nvtraverser::Traverser.

Reimplemented in nvtraverser::OcclusionCullGLTraverser.

virtual NVSG_API void nvtraverser::GLTraverser::handleHighlightEdges const nvsg::HighlightEdges p,
const nvsg::GeoSet geoSet
[protected, virtual]
 

Routine to handle a HighlightEdges object while traversing the scene graph.

Reimplemented from nvtraverser::Traverser.

Reimplemented in nvtraverser::OcclusionCullGLTraverser.

virtual NVSG_API bool nvtraverser::GLTraverser::preTraverseTransform const nvsg::Transform p  )  [protected, virtual]
 

Handles stuff to do between transform stack adjustment and traversal.

The model view matrix stack is already adjusted, so we can load it to the GL-engine.

Returns:
result of the base class (RenderTraverser)

Reimplemented from nvtraverser::ModelViewTraverser.

virtual NVSG_API bool nvtraverser::GLTraverser::preTraverseRoot const nvsg::SimpleCamera p,
const nvsg::Node root
[protected, virtual]
 

Handles stuff to do just before the scene is traversed.

This initializes the camera related part of the transform stack (after traversal of the headlights).

Reimplemented from nvtraverser::ModelViewTraverser.

Reimplemented in nvtraverser::OcclusionCullGLTraverser.

virtual NVSG_API bool nvtraverser::GLTraverser::preTraverseDrawable const nvsg::Drawable p  )  [protected, virtual]
 

Handles stuff to do just before a Drawable is traversed.

This tests, if the Drawable is to be drawn regarding the current render states.

Reimplemented from nvtraverser::Traverser.

virtual NVSG_API void nvtraverser::GLTraverser::disableLightSource const nvsg::LightSource p  )  [protected, virtual]
 

This function is called from the RenderTraverser framework whenever a LightSource is to be disabled.

Implements nvtraverser::RenderTraverser.


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