Overview | Modules | Class Hierarchy | Classes | Members

# tlp::AbstractGlCurve Class Reference

`#include <AbstractGlCurve.h>`

Inherits tlp::GlSimpleEntity.

Inherited by tlp::GlBezierCurve, tlp::GlCatmullRomCurve, and tlp::GlOpenUniformCubicBSpline.

Inheritance diagram for tlp::AbstractGlCurve:

[legend]
Collaboration diagram for tlp::AbstractGlCurve:

[legend]
List of all members.

## Public Member Functions

- AbstractGlCurve (const std::string &shaderProgramName, const std::string &curveSpecificShaderCode)
- AbstractGlCurve (const std::string &shaderProgramName, const std::string &curveSpecificShaderCode, const std::vector< Coord > &controlPoints, const Color &startColor, const Color &endColor, const float startSize, const float endSize, const unsigned int nbCurvePoints)
- virtual ~AbstractGlCurve ()
- void draw (float lod, Camera *camera)
- void translate (const Coord &move)
- virtual void setTexture (const std::string &texture)
- virtual void setOutlined (const bool outlined)
- virtual void setOutlineColor (const Color &outlineColor)
- virtual void setBillboardCurve (const bool billboardCurve)
- virtual void setLookDir (const Coord &lookDir)
- void getXML (xmlNodePtr rootNode)
- void setWithXML (xmlNodePtr rootNode)
- virtual void drawCurve (std::vector< Coord > &controlPoints, const Color &startColor, const Color &endColor, const float startSize, const float endSize, const unsigned int nbCurvePoints=100)

## Protected Member Functions

- virtual void setCurveVertexShaderRenderingSpecificParameters ()
- virtual void cleanupAfterCurveVertexShaderRendering ()
- virtual Coord computeCurvePointOnCPU (const std::vector< Coord > &controlPoints, float t)=0
- virtual void computeCurvePointsOnCPU (const std::vector< Coord > &controlPoints, std::vector< Coord > &curvePoints, unsigned int nbCurvePoints)=0
- void initShader (const std::string &shaderProgramName, const std::string &curveSpecificShaderCode)

## Static Protected Member Functions

- static void buildCurveVertexBuffers (const unsigned int nbCurvePoints, bool vboOk)

## Protected Attributes

- std::string shaderProgramName
- GlShaderProgram * curveShaderProgramNormal
- GlShaderProgram * curveShaderProgramBillboard
- GlShaderProgram * curveShaderProgram
- std::vector< Coord > controlPoints
- Color startColor
- Color endColor
- float startSize
- float endSize
- unsigned int nbCurvePoints
- bool outlined
- Color outlineColor
- std::string texture
- float texCoordFactor
- bool billboardCurve
- Coord lookDir

## Static Protected Attributes

- static std::map< unsigned
  int, GLfloat * > curveVertexBuffersData
- static std::map< unsigned
  int, std::vector< GLushort * > > curveVertexBuffersIndices
- static std::map< unsigned
  int, GLuint * > curveVertexBuffersObject
- static GLint MAX_SHADER_CONTROL_POINTS
- static std::map< std::string,
  GlShaderProgram * > curvesShadersMap
- static std::map< std::string,
  GlShaderProgram * > curvesBillboardShadersMap
- static GlShader * curveVertexShaderNormalMain
- static GlShader * curveVertexShaderBillboardMain
- static GlShader * fisheyeDistortionVertexShader

## Constructor & Destructor Documentation

tlp::AbstractGlCurve::AbstractGlCurve | ( | const std::string & | shaderProgramName,
|  | const std::string & | curveSpecificShaderCode
| ) |

tlp::AbstractGlCurve::AbstractGlCurve | ( | const std::string & | shaderProgramName,
|  | const std::string & | curveSpecificShaderCode,
|  | const std::vector< Coord > & | controlPoints,
|  | const Color & | startColor,
|  | const Color & | endColor,
|  | const float | startSize,
|  | const float | endSize,
|  | const unsigned int | nbCurvePoints
| ) |

virtual tlp::AbstractGlCurve::~AbstractGlCurve | ( |  | ) | `[virtual]`

## Member Function Documentation

static void tlp::AbstractGlCurve::buildCurveVertexBuffers | ( | const unsigned int | nbCurvePoints,
|  | bool | vboOk
| ) | `[static, protected]`

virtual void tlp::AbstractGlCurve::cleanupAfterCurveVertexShaderRendering | ( |  | ) | `[inline, protected, virtual]`

| Reimplemented in tlp::GlBezierCurve.

virtual Coord tlp::AbstractGlCurve::computeCurvePointOnCPU | ( | const std::vector< Coord > & | controlPoints,
|  | float | t
| ) | `[protected, pure virtual]`

| Implemented in tlp::GlBezierCurve, tlp::GlCatmullRomCurve, and tlp::GlOpenUniformCubicBSpline.

virtual void tlp::AbstractGlCurve::computeCurvePointsOnCPU | ( | const std::vector< Coord > & | controlPoints,
|  | std::vector< Coord > & | curvePoints,
|  | unsigned int | nbCurvePoints
| ) | `[protected, pure virtual]`

| Implemented in tlp::GlBezierCurve, tlp::GlCatmullRomCurve, and tlp::GlOpenUniformCubicBSpline.

void tlp::AbstractGlCurve::draw | ( | float | lod,
|  | Camera * | camera
| ) | `[virtual]`

| Draw function Implements tlp::GlSimpleEntity.

virtual void tlp::AbstractGlCurve::drawCurve | ( | std::vector< Coord > & | controlPoints,
|  | const Color & | startColor,
|  | const Color & | endColor,
|  | const float | startSize,
|  | const float | endSize,
|  | const unsigned int | nbCurvePoints = `100`
| ) | `[virtual]`

| Reimplemented in tlp::GlBezierCurve, tlp::GlCatmullRomCurve, and tlp::GlOpenUniformCubicBSpline.

void tlp::AbstractGlCurve::getXML | ( | xmlNodePtr | rootNode | ) | `[virtual]`

| Save the entity in Xml Implements tlp::GlSimpleEntity.

void tlp::AbstractGlCurve::initShader | ( | const std::string & | shaderProgramName,
|  | const std::string & | curveSpecificShaderCode
| ) | `[protected]`

virtual void tlp::AbstractGlCurve::setBillboardCurve | ( | const bool | billboardCurve | ) | `[inline, virtual]`

virtual void tlp::AbstractGlCurve::setCurveVertexShaderRenderingSpecificParameters | ( |  | ) | `[inline, protected, virtual]`

| Reimplemented in tlp::GlBezierCurve, tlp::GlCatmullRomCurve, and tlp::GlOpenUniformCubicBSpline.

virtual void tlp::AbstractGlCurve::setLookDir | ( | const Coord & | lookDir | ) | `[inline, virtual]`

virtual void tlp::AbstractGlCurve::setOutlineColor | ( | const Color & | outlineColor | ) | `[inline, virtual]`

virtual void tlp::AbstractGlCurve::setOutlined | ( | const bool | outlined | ) | `[inline, virtual]`

virtual void tlp::AbstractGlCurve::setTexture | ( | const std::string & | texture | ) | `[inline, virtual]`

void tlp::AbstractGlCurve::setWithXML | ( | xmlNodePtr | rootNode | ) | `[virtual]`

| Load entity with Xml Implements tlp::GlSimpleEntity.

void tlp::AbstractGlCurve::translate | ( | const Coord & | move | ) | `[virtual]`

| virtual fucntion : Translate entity Reimplemented from tlp::GlSimpleEntity.

## Member Data Documentation

bool tlp::AbstractGlCurve::billboardCurve `[protected]`

std::vector<Coord> tlp::AbstractGlCurve::controlPoints `[protected]`

std::map<std::string, GlShaderProgram *> tlp::AbstractGlCurve::curvesBillboardShadersMap `[static, protected]`

GlShaderProgram* tlp::AbstractGlCurve::curveShaderProgram `[protected]`

GlShaderProgram* tlp::AbstractGlCurve::curveShaderProgramBillboard `[protected]`

GlShaderProgram* tlp::AbstractGlCurve::curveShaderProgramNormal `[protected]`

std::map<std::string, GlShaderProgram *> tlp::AbstractGlCurve::curvesShadersMap `[static, protected]`

std::map<unsigned int, GLfloat *> tlp::AbstractGlCurve::curveVertexBuffersData `[static, protected]`

std::map<unsigned int, std::vector<GLushort *> > tlp::AbstractGlCurve::curveVertexBuffersIndices `[static, protected]`

std::map<unsigned int, GLuint* > tlp::AbstractGlCurve::curveVertexBuffersObject `[static, protected]`

GlShader* tlp::AbstractGlCurve::curveVertexShaderBillboardMain `[static, protected]`

GlShader* tlp::AbstractGlCurve::curveVertexShaderNormalMain `[static, protected]`

Color tlp::AbstractGlCurve::endColor `[protected]`

float tlp::AbstractGlCurve::endSize `[protected]`

GlShader* tlp::AbstractGlCurve::fisheyeDistortionVertexShader `[static, protected]`

Coord tlp::AbstractGlCurve::lookDir `[protected]`

GLint tlp::AbstractGlCurve::MAX_SHADER_CONTROL_POINTS `[static, protected]`

unsigned int tlp::AbstractGlCurve::nbCurvePoints `[protected]`

Color tlp::AbstractGlCurve::outlineColor `[protected]`

bool tlp::AbstractGlCurve::outlined `[protected]`

std::string tlp::AbstractGlCurve::shaderProgramName `[protected]`

Color tlp::AbstractGlCurve::startColor `[protected]`

float tlp::AbstractGlCurve::startSize `[protected]`

float tlp::AbstractGlCurve::texCoordFactor `[protected]`

std::string tlp::AbstractGlCurve::texture `[protected]`

Tulip Software by LaBRI Visualization Team 2001 - 2010