osgUtil::SceneGraphBuilder Class Reference

`#include <SceneGraphBuilder>`

## Classes

struct | QuadricState

## Public Member Functions

| SceneGraphBuilder ()
void | PushMatrix ()
void | PopMatrix ()
void | LoadIdentity ()
void | LoadMatrixd (const GLdouble *m)
void | MultMatrixd (const GLdouble *m)
void | Translated (GLdouble x, GLdouble y, GLdouble z)
void | Scaled (GLdouble x, GLdouble y, GLdouble z)
void | Rotated (GLdouble angle, GLdouble x, GLdouble y, GLdouble z)
void | BlendFunc (GLenum srcFactor, GLenum dstFactor)
void | CullFace (GLenum mode)
void | DepthFunc (GLenum mode)
void | FrontFace (GLenum mode)
void | LineStipple (GLint factor, GLushort pattern)
void | LineWidth (GLfloat lineWidth)
void | PointSize (GLfloat pointSize)
void | PolygonMode (GLenum face, GLenum mode)
void | PolygonOffset (GLfloat factor, GLfloat units)
void | PolygonStipple (const GLubyte *mask)
void | ShadeModel (GLenum mode)
void | Enable (GLenum mode)
void | Disable (GLenum mode)
void | Color4f (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
void | Color4fv (GLfloat *c)
void | Vertex3f (GLfloat x, GLfloat y, GLfloat z)
void | Vertex3fv (GLfloat *v)
void | Normal3f (GLfloat x, GLfloat y, GLfloat z)
void | Normal3fv (GLfloat *n)
void | TexCoord1f (GLfloat x)
void | TexCoord1fv (GLfloat *tc)
void | TexCoord2f (GLfloat x, GLfloat y)
void | TexCoord2fv (GLfloat *tc)
void | TexCoord3f (GLfloat x, GLfloat y, GLfloat z)
void | TexCoord3fv (GLfloat *tc)
void | TexCoord4f (GLfloat x, GLfloat y, GLfloat z, GLfloat w)
void | TexCoord4fv (GLfloat *tc)
void | Begin (GLenum mode)
void | End ()
void | QuadricDrawStyle (GLenum aDrawStyle)
void | QuadricNormals (GLenum aNormals)
void | QuadricOrientation (GLenum aOrientation)
void | QuadricTexture (GLboolean aTexture)
void | Cylinder (GLfloat base, GLfloat top, GLfloat height, GLint slices, GLint stacks)
void | Disk (GLfloat inner, GLfloat outer, GLint slices, GLint loops)
void | PartialDisk (GLfloat inner, GLfloat outer, GLint slices, GLint loops, GLfloat start, GLfloat sweep)
void | Sphere (GLfloat radius, GLint slices, GLint stacks)
osg::Node * | getScene ()
osg::Node * | takeScene ()

## Protected Types

typedef std::vector< osg::Matrixd > | Matrices

## Protected Member Functions

void | matrixChanged ()
void | addAttribute (osg::StateAttribute *attribute)
void | addMode (GLenum mode, bool enabled)
void | addTextureAttribute (unsigned int unit, osg::StateAttribute *attribute)
void | addTextureMode (unsigned int unit, GLenum mode, bool enabled)
void | addShape (osg::Shape *shape)
void | addDrawable (osg::Drawable *drawable)
void | newGeometry ()
void | allocateGeometry ()
void | completeGeometry ()
void | allocateStateSet ()

## Protected Attributes

Matrices | _matrixStack
osg::ref_ptr< osg::StateSet > | _stateset
bool | _statesetAssigned
bool | _normalSet
osg::Vec3f | _normal
bool | _colorSet
osg::Vec4f | _color
unsigned int | _maxNumTexCoordComponents
osg::Vec4f | _texCoord
GLenum | _primitiveMode
osg::ref_ptr< osg::Vec3Array > | _vertices
osg::ref_ptr< osg::Vec3Array > | _normals
osg::ref_ptr< osg::Vec4Array > | _colors
osg::ref_ptr< osg::Vec4Array > | _texCoords
QuadricState | _quadricState
osg::ref_ptr< osg::Geometry > | _geometry
osg::ref_ptr< osg::Geode > | _geode
osg::ref_ptr< osg::MatrixTransform > | _transform
osg::ref_ptr< osg::Group > | _group

## Detailed Description

A class for assisting the building a scene graph that is equivalent to OpenGL 1.0 style calls.

## Member Typedef Documentation

## Matrices

typedef std::vector<osg::Matrixd> osgUtil::SceneGraphBuilder::Matrices

protected

## Constructor & Destructor Documentation

## SceneGraphBuilder()

osgUtil::SceneGraphBuilder::SceneGraphBuilder | ( |  | ) |

## Member Function Documentation

## addAttribute()

void osgUtil::SceneGraphBuilder::addAttribute | ( | osg::StateAttribute * | attribute | ) |

protected

## addDrawable()

void osgUtil::SceneGraphBuilder::addDrawable | ( | osg::Drawable * | drawable | ) |

protected

## addMode()

void osgUtil::SceneGraphBuilder::addMode | ( | GLenum | mode,
|  | bool | enabled )

protected

## addShape()

void osgUtil::SceneGraphBuilder::addShape | ( | osg::Shape * | shape | ) |

protected

## addTextureAttribute()

void osgUtil::SceneGraphBuilder::addTextureAttribute | ( | unsigned int | unit,
|  | osg::StateAttribute * | attribute )

protected

## addTextureMode()

void osgUtil::SceneGraphBuilder::addTextureMode | ( | unsigned int | unit,
|  | GLenum | mode,
|  | bool | enabled )

protected

## allocateGeometry()

void osgUtil::SceneGraphBuilder::allocateGeometry | ( |  | ) |

protected

## allocateStateSet()

void osgUtil::SceneGraphBuilder::allocateStateSet | ( |  | ) |

protected

## Begin()

void osgUtil::SceneGraphBuilder::Begin | ( | GLenum | mode | ) |

## BlendFunc()

void osgUtil::SceneGraphBuilder::BlendFunc | ( | GLenum | srcFactor,
|  | GLenum | dstFactor )

## Color4f()

void osgUtil::SceneGraphBuilder::Color4f | ( | GLfloat | red,
|  | GLfloat | green,
|  | GLfloat | blue,
|  | GLfloat | alpha )

Referenced by Color4fv().

## Color4fv()

void osgUtil::SceneGraphBuilder::Color4fv | ( | GLfloat * | c | ) |

inline

References Color4f().

## completeGeometry()

void osgUtil::SceneGraphBuilder::completeGeometry | ( |  | ) |

protected

## CullFace()

void osgUtil::SceneGraphBuilder::CullFace | ( | GLenum | mode | ) |

## Cylinder()

void osgUtil::SceneGraphBuilder::Cylinder | ( | GLfloat | base,
|  | GLfloat | top,
|  | GLfloat | height,
|  | GLint | slices,
|  | GLint | stacks )

## DepthFunc()

void osgUtil::SceneGraphBuilder::DepthFunc | ( | GLenum | mode | ) |

## Disable()

void osgUtil::SceneGraphBuilder::Disable | ( | GLenum | mode | ) |

## Disk()

void osgUtil::SceneGraphBuilder::Disk | ( | GLfloat | inner,
|  | GLfloat | outer,
|  | GLint | slices,
|  | GLint | loops )

## Enable()

void osgUtil::SceneGraphBuilder::Enable | ( | GLenum | mode | ) |

## End()

void osgUtil::SceneGraphBuilder::End | ( |  | ) |

## FrontFace()

void osgUtil::SceneGraphBuilder::FrontFace | ( | GLenum | mode | ) |

## getScene()

osg::Node * osgUtil::SceneGraphBuilder::getScene | ( |  | ) |

## LineStipple()

void osgUtil::SceneGraphBuilder::LineStipple | ( | GLint | factor,
|  | GLushort | pattern )

## LineWidth()

void osgUtil::SceneGraphBuilder::LineWidth | ( | GLfloat | lineWidth | ) |

## LoadIdentity()

void osgUtil::SceneGraphBuilder::LoadIdentity | ( |  | ) |

## LoadMatrixd()

void osgUtil::SceneGraphBuilder::LoadMatrixd | ( | const GLdouble * | m | ) |

## matrixChanged()

void osgUtil::SceneGraphBuilder::matrixChanged | ( |  | ) |

protected

## MultMatrixd()

void osgUtil::SceneGraphBuilder::MultMatrixd | ( | const GLdouble * | m | ) |

## newGeometry()

void osgUtil::SceneGraphBuilder::newGeometry | ( |  | ) |

protected

## Normal3f()

void osgUtil::SceneGraphBuilder::Normal3f | ( | GLfloat | x,
|  | GLfloat | y,
|  | GLfloat | z )

Referenced by Normal3fv().

## Normal3fv()

void osgUtil::SceneGraphBuilder::Normal3fv | ( | GLfloat * | n | ) |

inline

References Normal3f().

## PartialDisk()

void osgUtil::SceneGraphBuilder::PartialDisk | ( | GLfloat | inner,
|  | GLfloat | outer,
|  | GLint | slices,
|  | GLint | loops,
|  | GLfloat | start,
|  | GLfloat | sweep )

## PointSize()

void osgUtil::SceneGraphBuilder::PointSize | ( | GLfloat | pointSize | ) |

## PolygonMode()

void osgUtil::SceneGraphBuilder::PolygonMode | ( | GLenum | face,
|  | GLenum | mode )

## PolygonOffset()

void osgUtil::SceneGraphBuilder::PolygonOffset | ( | GLfloat | factor,
|  | GLfloat | units )

## PolygonStipple()

void osgUtil::SceneGraphBuilder::PolygonStipple | ( | const GLubyte * | mask | ) |

## PopMatrix()

void osgUtil::SceneGraphBuilder::PopMatrix | ( |  | ) |

## PushMatrix()

void osgUtil::SceneGraphBuilder::PushMatrix | ( |  | ) |

## QuadricDrawStyle()

void osgUtil::SceneGraphBuilder::QuadricDrawStyle | ( | GLenum | aDrawStyle | ) |

## QuadricNormals()

void osgUtil::SceneGraphBuilder::QuadricNormals | ( | GLenum | aNormals | ) |

## QuadricOrientation()

void osgUtil::SceneGraphBuilder::QuadricOrientation | ( | GLenum | aOrientation | ) |

## QuadricTexture()

void osgUtil::SceneGraphBuilder::QuadricTexture | ( | GLboolean | aTexture | ) |

## Rotated()

void osgUtil::SceneGraphBuilder::Rotated | ( | GLdouble | angle,
|  | GLdouble | x,
|  | GLdouble | y,
|  | GLdouble | z )

## Scaled()

void osgUtil::SceneGraphBuilder::Scaled | ( | GLdouble | x,
|  | GLdouble | y,
|  | GLdouble | z )

## ShadeModel()

void osgUtil::SceneGraphBuilder::ShadeModel | ( | GLenum | mode | ) |

## Sphere()

void osgUtil::SceneGraphBuilder::Sphere | ( | GLfloat | radius,
|  | GLint | slices,
|  | GLint | stacks )

## takeScene()

osg::Node * osgUtil::SceneGraphBuilder::takeScene | ( |  | ) |

## TexCoord1f()

void osgUtil::SceneGraphBuilder::TexCoord1f | ( | GLfloat | x | ) |

Referenced by TexCoord1fv().

## TexCoord1fv()

void osgUtil::SceneGraphBuilder::TexCoord1fv | ( | GLfloat * | tc | ) |

inline

References TexCoord1f().

## TexCoord2f()

void osgUtil::SceneGraphBuilder::TexCoord2f | ( | GLfloat | x,
|  | GLfloat | y )

Referenced by TexCoord2fv().

## TexCoord2fv()

void osgUtil::SceneGraphBuilder::TexCoord2fv | ( | GLfloat * | tc | ) |

inline

References TexCoord2f().

## TexCoord3f()

void osgUtil::SceneGraphBuilder::TexCoord3f | ( | GLfloat | x,
|  | GLfloat | y,
|  | GLfloat | z )

Referenced by TexCoord3fv().

## TexCoord3fv()

void osgUtil::SceneGraphBuilder::TexCoord3fv | ( | GLfloat * | tc | ) |

inline

References TexCoord3f().

## TexCoord4f()

void osgUtil::SceneGraphBuilder::TexCoord4f | ( | GLfloat | x,
|  | GLfloat | y,
|  | GLfloat | z,
|  | GLfloat | w )

Referenced by TexCoord4fv().

## TexCoord4fv()

void osgUtil::SceneGraphBuilder::TexCoord4fv | ( | GLfloat * | tc | ) |

inline

References TexCoord4f().

## Translated()

void osgUtil::SceneGraphBuilder::Translated | ( | GLdouble | x,
|  | GLdouble | y,
|  | GLdouble | z )

## Vertex3f()

void osgUtil::SceneGraphBuilder::Vertex3f | ( | GLfloat | x,
|  | GLfloat | y,
|  | GLfloat | z )

Referenced by Vertex3fv().

## Vertex3fv()

void osgUtil::SceneGraphBuilder::Vertex3fv | ( | GLfloat * | v | ) |

inline

References Vertex3f().

## Member Data Documentation

## _color

osg::Vec4f osgUtil::SceneGraphBuilder::_color

protected

## _colors

osg::ref_ptr<osg::Vec4Array> osgUtil::SceneGraphBuilder::_colors

protected

## _colorSet

bool osgUtil::SceneGraphBuilder::_colorSet

protected

## _geode

osg::ref_ptr<osg::Geode> osgUtil::SceneGraphBuilder::_geode

protected

## _geometry

osg::ref_ptr<osg::Geometry> osgUtil::SceneGraphBuilder::_geometry

protected

## _group

osg::ref_ptr<osg::Group> osgUtil::SceneGraphBuilder::_group

protected

## _matrixStack

Matrices osgUtil::SceneGraphBuilder::_matrixStack

protected

## _maxNumTexCoordComponents

unsigned int osgUtil::SceneGraphBuilder::_maxNumTexCoordComponents

protected

## _normal

osg::Vec3f osgUtil::SceneGraphBuilder::_normal

protected

## _normals

osg::ref_ptr<osg::Vec3Array> osgUtil::SceneGraphBuilder::_normals

protected

## _normalSet

bool osgUtil::SceneGraphBuilder::_normalSet

protected

## _primitiveMode

GLenum osgUtil::SceneGraphBuilder::_primitiveMode

protected

## _quadricState

QuadricState osgUtil::SceneGraphBuilder::_quadricState

protected

## _stateset

osg::ref_ptr<osg::StateSet> osgUtil::SceneGraphBuilder::_stateset

protected

## _statesetAssigned

bool osgUtil::SceneGraphBuilder::_statesetAssigned

protected

## _texCoord

osg::Vec4f osgUtil::SceneGraphBuilder::_texCoord

protected

## _texCoords

osg::ref_ptr<osg::Vec4Array> osgUtil::SceneGraphBuilder::_texCoords

protected

## _transform

osg::ref_ptr<osg::MatrixTransform> osgUtil::SceneGraphBuilder::_transform

protected

## _vertices

osg::ref_ptr<osg::Vec3Array> osgUtil::SceneGraphBuilder::_vertices

protected

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

- SceneGraphBuilder