AGXDynamics  2.31.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
agxOSG::CylinderGeometryShader Class Reference

#include <CylinderGeometryShader.h>

+ Inheritance diagram for agxOSG::CylinderGeometryShader:

Public Member Functions

 CylinderGeometryShader (size_t initialBufferSize=256)
 
void add (const agx::Vec3 &startPoint, const agx::Vec3 &endPoint, agx::Real radius, agx::Vec2 redShift=agx::Vec2(0, 0))
 Add cylinder given world start- and end point, and radius. More...
 
void add (const agx::Vec3 &point, const agx::Quat &zToDir, agx::Real radius, agx::Real redShift=agx::Real(0))
 Continuous mesh, for splines. More...
 
void add (const agxCollide::Geometry *geometry)
 All compatible shapes in geometry will be rendered. More...
 
osg::Uniform * getCylinderColorUniform ()
 
const osg::Uniform * getCylinderColorUniform () const
 
osg::Uniform * getNumCylinderSegmentsUniform ()
 
const osg::Uniform * getNumCylinderSegmentsUniform () const
 
osg::Program * getProgram ()
 
const osg::Program * getProgram () const
 
osg::Vec4Array * getQuatsInColorArray ()
 
osg::FloatArray * getRadiusArray ()
 
osg::Vec3Array * getVertexArray ()
 
void resetCounters ()
 Resets all internal counters. More...
 
void setNumActiveElements (size_t numActiveElements)
 
void update ()
 Push the data to the graphics card. More...
 

Protected Member Functions

virtual ~CylinderGeometryShader ()
 

Protected Attributes

osg::Uniform * m_cylinderColor
 
size_t m_numActiveElements
 
osg::Uniform * m_numCylinderSegments
 
osg::DrawArrays * m_primitiveSet
 
osg::Program * m_program
 
osg::Vec4Array * m_quatsInColorArray
 
osg::FloatArray * m_radiusArray
 
osg::FloatArray * m_redShiftArray
 
osg::Vec3Array * m_vertexArray
 

Detailed Description

Definition at line 36 of file CylinderGeometryShader.h.

Constructor & Destructor Documentation

agxOSG::CylinderGeometryShader::CylinderGeometryShader ( size_t  initialBufferSize = 256)
virtual agxOSG::CylinderGeometryShader::~CylinderGeometryShader ( )
protectedvirtual

Member Function Documentation

void agxOSG::CylinderGeometryShader::add ( const agx::Vec3 &  startPoint,
const agx::Vec3 &  endPoint,
agx::Real  radius,
agx::Vec2  redShift = agx::Vec2(0, 0) 
)

Add cylinder given world start- and end point, and radius.

void agxOSG::CylinderGeometryShader::add ( const agx::Vec3 &  point,
const agx::Quat &  zToDir,
agx::Real  radius,
agx::Real  redShift = agx::Real(0) 
)

Continuous mesh, for splines.

Add point and direction towards the next.

void agxOSG::CylinderGeometryShader::add ( const agxCollide::Geometry *  geometry)

All compatible shapes in geometry will be rendered.

Parameters
geometry- geometry with one or several compatible shapes
osg::Uniform* agxOSG::CylinderGeometryShader::getCylinderColorUniform ( )
inline
Returns
the uniform holding the color of the cylinders

Definition at line 82 of file CylinderGeometryShader.h.

const osg::Uniform* agxOSG::CylinderGeometryShader::getCylinderColorUniform ( ) const
inline

Definition at line 83 of file CylinderGeometryShader.h.

osg::Uniform* agxOSG::CylinderGeometryShader::getNumCylinderSegmentsUniform ( )
inline
Returns
the uniform holding the number of cylinder segments in the shader

Definition at line 76 of file CylinderGeometryShader.h.

const osg::Uniform* agxOSG::CylinderGeometryShader::getNumCylinderSegmentsUniform ( ) const
inline

Definition at line 77 of file CylinderGeometryShader.h.

osg::Program* agxOSG::CylinderGeometryShader::getProgram ( )
inline
Returns
the program

Definition at line 70 of file CylinderGeometryShader.h.

const osg::Program* agxOSG::CylinderGeometryShader::getProgram ( ) const
inline

Definition at line 71 of file CylinderGeometryShader.h.

osg::Vec4Array* agxOSG::CylinderGeometryShader::getQuatsInColorArray ( )
inline

Definition at line 86 of file CylinderGeometryShader.h.

osg::FloatArray* agxOSG::CylinderGeometryShader::getRadiusArray ( )
inline

Definition at line 87 of file CylinderGeometryShader.h.

osg::Vec3Array* agxOSG::CylinderGeometryShader::getVertexArray ( )
inline

Definition at line 85 of file CylinderGeometryShader.h.

void agxOSG::CylinderGeometryShader::resetCounters ( )

Resets all internal counters.

I.e., all old data will be forgotten.

void agxOSG::CylinderGeometryShader::setNumActiveElements ( size_t  numActiveElements)
inline

Definition at line 88 of file CylinderGeometryShader.h.

void agxOSG::CylinderGeometryShader::update ( )

Push the data to the graphics card.

Member Data Documentation

osg::Uniform* agxOSG::CylinderGeometryShader::m_cylinderColor
protected

Definition at line 103 of file CylinderGeometryShader.h.

size_t agxOSG::CylinderGeometryShader::m_numActiveElements
protected

Definition at line 94 of file CylinderGeometryShader.h.

osg::Uniform* agxOSG::CylinderGeometryShader::m_numCylinderSegments
protected

Definition at line 102 of file CylinderGeometryShader.h.

osg::DrawArrays* agxOSG::CylinderGeometryShader::m_primitiveSet
protected

Definition at line 96 of file CylinderGeometryShader.h.

osg::Program* agxOSG::CylinderGeometryShader::m_program
protected

Definition at line 101 of file CylinderGeometryShader.h.

osg::Vec4Array* agxOSG::CylinderGeometryShader::m_quatsInColorArray
protected

Definition at line 98 of file CylinderGeometryShader.h.

osg::FloatArray* agxOSG::CylinderGeometryShader::m_radiusArray
protected

Definition at line 99 of file CylinderGeometryShader.h.

osg::FloatArray* agxOSG::CylinderGeometryShader::m_redShiftArray
protected

Definition at line 100 of file CylinderGeometryShader.h.

osg::Vec3Array* agxOSG::CylinderGeometryShader::m_vertexArray
protected

Definition at line 97 of file CylinderGeometryShader.h.


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