OpenSceneGraph 3.6.5
osg::BuildShapeGeometryVisitor Class Reference

Convenience class for populating an Geometry with vertex, normals, texture coords and primitives that can render a Shape. More...

#include <Shape>

Inheritance diagram for osg::BuildShapeGeometryVisitor:

Public Member Functions

 BuildShapeGeometryVisitor (Geometry *geometry, const TessellationHints *hints)
virtual void apply (const Sphere &)
virtual void apply (const Box &)
virtual void apply (const Cone &)
virtual void apply (const Cylinder &)
virtual void apply (const Capsule &)
virtual void apply (const InfinitePlane &)
virtual void apply (const TriangleMesh &)
virtual void apply (const ConvexHull &)
virtual void apply (const HeightField &)
virtual void apply (const CompositeShape &)
void Normal (const Vec3f &v)
void Normal3f (float x, float y, float z)
void TexCoord (const Vec2f &tc)
void TexCoord2f (float x, float y)
void Vertex (const Vec3f &v)
void Vertex3f (float x, float y, float z)
void setMatrix (const Matrixd &m)
void Begin (GLenum mode)
void End ()
Public Member Functions inherited from osg::ConstShapeVisitor
 ConstShapeVisitor ()
virtual ~ConstShapeVisitor ()
virtual void apply (const Shape &)

Protected Types

enum  SphereHalf { SphereTopHalf , SphereBottomHalf }

Protected Member Functions

BuildShapeGeometryVisitoroperator= (const BuildShapeGeometryVisitor &)
void drawCylinderBody (unsigned int numSegments, float radius, float height)
void drawHalfSphere (unsigned int numSegments, unsigned int numRows, float radius, SphereHalf which, float zOffset=0.0f)

Protected Attributes

Geometry_geometry
const TessellationHints_hints
ref_ptr< Vec3Array_vertices
ref_ptr< Vec3Array_normals
ref_ptr< Vec2Array_texcoords
GLenum _mode
unsigned int _start_index
Matrixd _matrix
Matrixd _inverse

Detailed Description

Convenience class for populating an Geometry with vertex, normals, texture coords and primitives that can render a Shape.

Member Enumeration Documentation

◆ SphereHalf

Enumerator
SphereTopHalf 
SphereBottomHalf 

Constructor & Destructor Documentation

◆ BuildShapeGeometryVisitor()

osg::BuildShapeGeometryVisitor::BuildShapeGeometryVisitor ( Geometry * geometry,
const TessellationHints * hints )

Referenced by operator=().

Member Function Documentation

◆ apply() [1/10]

virtual void osg::BuildShapeGeometryVisitor::apply ( const Box & )
virtual

Reimplemented from osg::ConstShapeVisitor.

◆ apply() [2/10]

virtual void osg::BuildShapeGeometryVisitor::apply ( const Capsule & )
virtual

Reimplemented from osg::ConstShapeVisitor.

◆ apply() [3/10]

virtual void osg::BuildShapeGeometryVisitor::apply ( const CompositeShape & )
virtual

Reimplemented from osg::ConstShapeVisitor.

◆ apply() [4/10]

virtual void osg::BuildShapeGeometryVisitor::apply ( const Cone & )
virtual

Reimplemented from osg::ConstShapeVisitor.

◆ apply() [5/10]

virtual void osg::BuildShapeGeometryVisitor::apply ( const ConvexHull & )
virtual

Reimplemented from osg::ConstShapeVisitor.

◆ apply() [6/10]

virtual void osg::BuildShapeGeometryVisitor::apply ( const Cylinder & )
virtual

Reimplemented from osg::ConstShapeVisitor.

◆ apply() [7/10]

virtual void osg::BuildShapeGeometryVisitor::apply ( const HeightField & )
virtual

Reimplemented from osg::ConstShapeVisitor.

◆ apply() [8/10]

virtual void osg::BuildShapeGeometryVisitor::apply ( const InfinitePlane & )
virtual

Reimplemented from osg::ConstShapeVisitor.

◆ apply() [9/10]

virtual void osg::BuildShapeGeometryVisitor::apply ( const Sphere & )
virtual

Reimplemented from osg::ConstShapeVisitor.

◆ apply() [10/10]

virtual void osg::BuildShapeGeometryVisitor::apply ( const TriangleMesh & )
virtual

Reimplemented from osg::ConstShapeVisitor.

◆ Begin()

void osg::BuildShapeGeometryVisitor::Begin ( GLenum mode)

◆ drawCylinderBody()

void osg::BuildShapeGeometryVisitor::drawCylinderBody ( unsigned int numSegments,
float radius,
float height )
protected

◆ drawHalfSphere()

void osg::BuildShapeGeometryVisitor::drawHalfSphere ( unsigned int numSegments,
unsigned int numRows,
float radius,
SphereHalf which,
float zOffset = 0.0f )
protected

◆ End()

void osg::BuildShapeGeometryVisitor::End ( )

◆ Normal()

void osg::BuildShapeGeometryVisitor::Normal ( const Vec3f & v)
inline

References _normals.

Referenced by Normal3f().

◆ Normal3f()

void osg::BuildShapeGeometryVisitor::Normal3f ( float x,
float y,
float z )
inline

References Normal().

◆ operator=()

BuildShapeGeometryVisitor & osg::BuildShapeGeometryVisitor::operator= ( const BuildShapeGeometryVisitor & )
inlineprotected

◆ setMatrix()

void osg::BuildShapeGeometryVisitor::setMatrix ( const Matrixd & m)

◆ TexCoord()

void osg::BuildShapeGeometryVisitor::TexCoord ( const Vec2f & tc)
inline

References _texcoords.

Referenced by TexCoord2f().

◆ TexCoord2f()

void osg::BuildShapeGeometryVisitor::TexCoord2f ( float x,
float y )
inline

References TexCoord().

◆ Vertex()

void osg::BuildShapeGeometryVisitor::Vertex ( const Vec3f & v)

Referenced by Vertex3f().

◆ Vertex3f()

void osg::BuildShapeGeometryVisitor::Vertex3f ( float x,
float y,
float z )
inline

References Vertex().

Member Data Documentation

◆ _geometry

Geometry* osg::BuildShapeGeometryVisitor::_geometry
protected

◆ _hints

const TessellationHints* osg::BuildShapeGeometryVisitor::_hints
protected

◆ _inverse

Matrixd osg::BuildShapeGeometryVisitor::_inverse
protected

◆ _matrix

Matrixd osg::BuildShapeGeometryVisitor::_matrix
protected

◆ _mode

GLenum osg::BuildShapeGeometryVisitor::_mode
protected

◆ _normals

ref_ptr<Vec3Array> osg::BuildShapeGeometryVisitor::_normals
protected

Referenced by Normal().

◆ _start_index

unsigned int osg::BuildShapeGeometryVisitor::_start_index
protected

◆ _texcoords

ref_ptr<Vec2Array> osg::BuildShapeGeometryVisitor::_texcoords
protected

Referenced by TexCoord().

◆ _vertices

ref_ptr<Vec3Array> osg::BuildShapeGeometryVisitor::_vertices
protected

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

osg logo
Generated at Sun Jul 20 2025 00:00:00 for the OpenSceneGraph by doxygen 1.14.0.