OSG  3.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
osgUtil::SceneGraphBuilder Class Reference

#include <SceneGraphBuilder.h>

Collaboration diagram for osgUtil::SceneGraphBuilder:
Collaboration graph
[legend]

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::NodegetScene ()
 
osg::NodetakeScene ()
 

Protected Types

typedef std::vector< osg::MatrixdMatrices
 

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 equivilant to OpenGL 1.0 style calls.

Definition at line 28 of file SceneGraphBuilder.h.

Member Typedef Documentation

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

Definition at line 124 of file SceneGraphBuilder.h.

Constructor & Destructor Documentation

osgUtil::SceneGraphBuilder::SceneGraphBuilder ( )

Member Function Documentation

void osgUtil::SceneGraphBuilder::addAttribute ( osg::StateAttribute attribute)
protected
void osgUtil::SceneGraphBuilder::addDrawable ( osg::Drawable drawable)
protected
void osgUtil::SceneGraphBuilder::addMode ( GLenum  mode,
bool  enabled 
)
protected
void osgUtil::SceneGraphBuilder::addShape ( osg::Shape shape)
protected
void osgUtil::SceneGraphBuilder::addTextureAttribute ( unsigned int  unit,
osg::StateAttribute attribute 
)
protected
void osgUtil::SceneGraphBuilder::addTextureMode ( unsigned int  unit,
GLenum  mode,
bool  enabled 
)
protected
void osgUtil::SceneGraphBuilder::allocateGeometry ( )
protected
void osgUtil::SceneGraphBuilder::allocateStateSet ( )
protected
void osgUtil::SceneGraphBuilder::Begin ( GLenum  mode)
void osgUtil::SceneGraphBuilder::BlendFunc ( GLenum  srcFactor,
GLenum  dstFactor 
)
void osgUtil::SceneGraphBuilder::Color4f ( GLfloat  red,
GLfloat  green,
GLfloat  blue,
GLfloat  alpha 
)
void osgUtil::SceneGraphBuilder::Color4fv ( GLfloat *  c)
inline

Definition at line 62 of file SceneGraphBuilder.h.

void osgUtil::SceneGraphBuilder::completeGeometry ( )
protected
void osgUtil::SceneGraphBuilder::CullFace ( GLenum  mode)
void osgUtil::SceneGraphBuilder::Cylinder ( GLfloat  base,
GLfloat  top,
GLfloat  height,
GLint  slices,
GLint  stacks 
)
void osgUtil::SceneGraphBuilder::DepthFunc ( GLenum  mode)
void osgUtil::SceneGraphBuilder::Disable ( GLenum  mode)
void osgUtil::SceneGraphBuilder::Disk ( GLfloat  inner,
GLfloat  outer,
GLint  slices,
GLint  loops 
)
void osgUtil::SceneGraphBuilder::Enable ( GLenum  mode)
void osgUtil::SceneGraphBuilder::End ( )
void osgUtil::SceneGraphBuilder::FrontFace ( GLenum  mode)
osg::Node* osgUtil::SceneGraphBuilder::getScene ( )
void osgUtil::SceneGraphBuilder::LineStipple ( GLint  factor,
GLushort  pattern 
)
void osgUtil::SceneGraphBuilder::LineWidth ( GLfloat  lineWidth)
void osgUtil::SceneGraphBuilder::LoadIdentity ( )
void osgUtil::SceneGraphBuilder::LoadMatrixd ( const GLdouble m)
void osgUtil::SceneGraphBuilder::matrixChanged ( )
protected
void osgUtil::SceneGraphBuilder::MultMatrixd ( const GLdouble m)
void osgUtil::SceneGraphBuilder::newGeometry ( )
protected
void osgUtil::SceneGraphBuilder::Normal3f ( GLfloat  x,
GLfloat  y,
GLfloat  z 
)
void osgUtil::SceneGraphBuilder::Normal3fv ( GLfloat *  n)
inline

Definition at line 68 of file SceneGraphBuilder.h.

void osgUtil::SceneGraphBuilder::PartialDisk ( GLfloat  inner,
GLfloat  outer,
GLint  slices,
GLint  loops,
GLfloat  start,
GLfloat  sweep 
)
void osgUtil::SceneGraphBuilder::PointSize ( GLfloat  pointSize)
void osgUtil::SceneGraphBuilder::PolygonMode ( GLenum  face,
GLenum  mode 
)
void osgUtil::SceneGraphBuilder::PolygonOffset ( GLfloat  factor,
GLfloat  units 
)
void osgUtil::SceneGraphBuilder::PolygonStipple ( const GLubyte *  mask)
void osgUtil::SceneGraphBuilder::PopMatrix ( )
void osgUtil::SceneGraphBuilder::PushMatrix ( )
void osgUtil::SceneGraphBuilder::QuadricDrawStyle ( GLenum  aDrawStyle)
void osgUtil::SceneGraphBuilder::QuadricNormals ( GLenum  aNormals)
void osgUtil::SceneGraphBuilder::QuadricOrientation ( GLenum  aOrientation)
void osgUtil::SceneGraphBuilder::QuadricTexture ( GLboolean  aTexture)
void osgUtil::SceneGraphBuilder::Rotated ( GLdouble  angle,
GLdouble  x,
GLdouble  y,
GLdouble  z 
)
void osgUtil::SceneGraphBuilder::Scaled ( GLdouble  x,
GLdouble  y,
GLdouble  z 
)
void osgUtil::SceneGraphBuilder::ShadeModel ( GLenum  mode)
void osgUtil::SceneGraphBuilder::Sphere ( GLfloat  radius,
GLint  slices,
GLint  stacks 
)
osg::Node* osgUtil::SceneGraphBuilder::takeScene ( )
void osgUtil::SceneGraphBuilder::TexCoord1f ( GLfloat  x)
void osgUtil::SceneGraphBuilder::TexCoord1fv ( GLfloat *  tc)
inline

Definition at line 71 of file SceneGraphBuilder.h.

void osgUtil::SceneGraphBuilder::TexCoord2f ( GLfloat  x,
GLfloat  y 
)
void osgUtil::SceneGraphBuilder::TexCoord2fv ( GLfloat *  tc)
inline

Definition at line 74 of file SceneGraphBuilder.h.

void osgUtil::SceneGraphBuilder::TexCoord3f ( GLfloat  x,
GLfloat  y,
GLfloat  z 
)
void osgUtil::SceneGraphBuilder::TexCoord3fv ( GLfloat *  tc)
inline

Definition at line 77 of file SceneGraphBuilder.h.

void osgUtil::SceneGraphBuilder::TexCoord4f ( GLfloat  x,
GLfloat  y,
GLfloat  z,
GLfloat  w 
)
void osgUtil::SceneGraphBuilder::TexCoord4fv ( GLfloat *  tc)
inline

Definition at line 80 of file SceneGraphBuilder.h.

void osgUtil::SceneGraphBuilder::Translated ( GLdouble  x,
GLdouble  y,
GLdouble  z 
)
void osgUtil::SceneGraphBuilder::Vertex3f ( GLfloat  x,
GLfloat  y,
GLfloat  z 
)
void osgUtil::SceneGraphBuilder::Vertex3fv ( GLfloat *  v)
inline

Definition at line 65 of file SceneGraphBuilder.h.

Member Data Documentation

osg::Vec4f osgUtil::SceneGraphBuilder::_color
protected

Definition at line 148 of file SceneGraphBuilder.h.

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

Definition at line 156 of file SceneGraphBuilder.h.

bool osgUtil::SceneGraphBuilder::_colorSet
protected

Definition at line 147 of file SceneGraphBuilder.h.

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

Definition at line 177 of file SceneGraphBuilder.h.

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

Definition at line 176 of file SceneGraphBuilder.h.

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

Definition at line 179 of file SceneGraphBuilder.h.

Matrices osgUtil::SceneGraphBuilder::_matrixStack
protected

Definition at line 140 of file SceneGraphBuilder.h.

unsigned int osgUtil::SceneGraphBuilder::_maxNumTexCoordComponents
protected

Definition at line 150 of file SceneGraphBuilder.h.

osg::Vec3f osgUtil::SceneGraphBuilder::_normal
protected

Definition at line 145 of file SceneGraphBuilder.h.

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

Definition at line 155 of file SceneGraphBuilder.h.

bool osgUtil::SceneGraphBuilder::_normalSet
protected

Definition at line 144 of file SceneGraphBuilder.h.

GLenum osgUtil::SceneGraphBuilder::_primitiveMode
protected

Definition at line 153 of file SceneGraphBuilder.h.

QuadricState osgUtil::SceneGraphBuilder::_quadricState
protected

Definition at line 173 of file SceneGraphBuilder.h.

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

Definition at line 141 of file SceneGraphBuilder.h.

bool osgUtil::SceneGraphBuilder::_statesetAssigned
protected

Definition at line 142 of file SceneGraphBuilder.h.

osg::Vec4f osgUtil::SceneGraphBuilder::_texCoord
protected

Definition at line 151 of file SceneGraphBuilder.h.

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

Definition at line 157 of file SceneGraphBuilder.h.

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

Definition at line 178 of file SceneGraphBuilder.h.

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

Definition at line 154 of file SceneGraphBuilder.h.


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