H3D::RenderProperties Class Reference
[H3D specific Node classes.]

The RenderProperties node specifies additional rendering options that cannot be specified with the X3D Appearance node. More...

#include <H3D/RenderProperties.h>

Inheritance diagram for H3D::RenderProperties:

Inheritance graph

List of all members.

Public Member Functions

 RenderProperties (Inst< SFNode > _metadata=0, Inst< DisplayList > _displayList=0, Inst< SFBool > _depthTestEnabled=0, Inst< SFBool > _smoothShading=0, Inst< SFBool > _multiPassTransparency=0)
 Constructor.
virtual void preRender ()
 This function will be called by the X3DShapeNode before any rendering of geometry and before the call to the render function.
virtual void postRender ()
 This function will be called by the X3DShapeNode after the geometry has been rendered to restore the states to what it was before the call to preRender().
virtual void render ()
 Set up the line properties with OpenGL.
virtual string defaultXMLContainerField ()
 Returns the default xml containerField attribute value.

Public Attributes

auto_ptr< SFBooldepthTestEnabled
 The depthTestEnabled field specifies if depth test should be enabled or not.
auto_ptr< SFBoolsmoothShading
 The smoothShading field specifies if smooth shading should be used.
auto_ptr< SFBoolmultiPassTransparency
 If the multiPassTransparency field is true, and we have a transparent shape, the entire scene will be rendered three times, once with all non-transparant objects drawn, once with all transparant objects drawn with front face culled and once with all transparent objects with back face culled.

Static Public Attributes

static H3DNodeDatabase database
 The H3DNodeDatabase for this node.


Detailed Description

The RenderProperties node specifies additional rendering options that cannot be specified with the X3D Appearance node.

The lightingEnabled field specifies if the geometry should take lighting into account when calculating colors. If false the color for each vertex will be used directly.

The depthTestEnabled field specifies if depth test should be enabled or not. If depth test is disabled geometries will be drawn over the current values in the frame buffer regardless of if it is in front of or behind the previous objects drawn.

The smoothShading field specifies if smooth shading should be used. If false, flat shading is used.

Internal routes:
RenderProperties.dot

Member Function Documentation

virtual string H3D::RenderProperties::defaultXMLContainerField (  )  [inline, virtual]

Returns the default xml containerField attribute value.

For this node it is "fillProperties".

Reimplemented from H3D::Node.

virtual void H3D::RenderProperties::postRender (  )  [inline, virtual]

This function will be called by the X3DShapeNode after the geometry has been rendered to restore the states to what it was before the call to preRender().

Reimplemented from H3D::X3DAppearanceChildNode.

Referenced by H3D::Appearance::postRender().

virtual void H3D::RenderProperties::preRender (  )  [inline, virtual]

This function will be called by the X3DShapeNode before any rendering of geometry and before the call to the render function.

So this is the place to save the states that are going to be changed in render() in order to restore it in postRender().

Reimplemented from H3D::X3DAppearanceChildNode.

Referenced by H3D::Appearance::preRender().


Member Data Documentation

The depthTestEnabled field specifies if depth test should be enabled or not.

If depth test is disabled geometries will be drawn over the current values in the frame buffer regardless of if it is in front of or behind the previous objects drawn.

Access type: inputOutput
Default value: true

RenderProperties_depthTestEnabled.dot

Referenced by render(), and RenderProperties().

If the multiPassTransparency field is true, and we have a transparent shape, the entire scene will be rendered three times, once with all non-transparant objects drawn, once with all transparant objects drawn with front face culled and once with all transparent objects with back face culled.

This will avoid many artifact of transparency caused by rendering objects in the wrong order, however it requires three traversals of the scenegraph. If set to false, transparent objects will just be drawn in the order they appear in the scene graph.

Access type: inputOutput
Default value: true

RenderProperties_multiPassTransparency.dot

Referenced by H3D::H3DWindowNode::render(), RenderProperties(), and H3D::Appearance::usingMultiPassTransparency().

The smoothShading field specifies if smooth shading should be used.

If false, flat shading is used.

Access type: inputOutput
Default value: true

RenderProperties_smoothShading.dot

Referenced by render(), and RenderProperties().


The documentation for this class was generated from the following files:

Generated on Fri Nov 7 10:30:49 2008 for H3D API by  doxygen 1.5.7