AGX Dynamics  2.37.3.2
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

◆ CylinderGeometryShader()

agxOSG::CylinderGeometryShader::CylinderGeometryShader ( size_t  initialBufferSize = 256)

◆ ~CylinderGeometryShader()

virtual agxOSG::CylinderGeometryShader::~CylinderGeometryShader ( )
protectedvirtual

Member Function Documentation

◆ add() [1/3]

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.

◆ add() [2/3]

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.

◆ add() [3/3]

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

◆ getCylinderColorUniform() [1/2]

osg::Uniform* agxOSG::CylinderGeometryShader::getCylinderColorUniform ( )
inline
Returns
the uniform holding the color of the cylinders

Definition at line 82 of file CylinderGeometryShader.h.

◆ getCylinderColorUniform() [2/2]

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

Definition at line 83 of file CylinderGeometryShader.h.

◆ getNumCylinderSegmentsUniform() [1/2]

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.

◆ getNumCylinderSegmentsUniform() [2/2]

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

Definition at line 77 of file CylinderGeometryShader.h.

◆ getProgram() [1/2]

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

Definition at line 70 of file CylinderGeometryShader.h.

◆ getProgram() [2/2]

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

Definition at line 71 of file CylinderGeometryShader.h.

◆ getQuatsInColorArray()

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

Definition at line 86 of file CylinderGeometryShader.h.

◆ getRadiusArray()

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

Definition at line 87 of file CylinderGeometryShader.h.

◆ getVertexArray()

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

Definition at line 85 of file CylinderGeometryShader.h.

◆ resetCounters()

void agxOSG::CylinderGeometryShader::resetCounters ( )

Resets all internal counters.

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

◆ setNumActiveElements()

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

Definition at line 88 of file CylinderGeometryShader.h.

◆ update()

void agxOSG::CylinderGeometryShader::update ( )

Push the data to the graphics card.

Member Data Documentation

◆ m_cylinderColor

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

Definition at line 103 of file CylinderGeometryShader.h.

◆ m_numActiveElements

size_t agxOSG::CylinderGeometryShader::m_numActiveElements
protected

Definition at line 94 of file CylinderGeometryShader.h.

◆ m_numCylinderSegments

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

Definition at line 102 of file CylinderGeometryShader.h.

◆ m_primitiveSet

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

Definition at line 96 of file CylinderGeometryShader.h.

◆ m_program

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

Definition at line 101 of file CylinderGeometryShader.h.

◆ m_quatsInColorArray

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

Definition at line 98 of file CylinderGeometryShader.h.

◆ m_radiusArray

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

Definition at line 99 of file CylinderGeometryShader.h.

◆ m_redShiftArray

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

Definition at line 100 of file CylinderGeometryShader.h.

◆ m_vertexArray

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: