Developer Documentation
ACG::GLPrimitive Class Referenceabstract
Inheritance diagram for ACG::GLPrimitive:
ACG::GLBox ACG::GLCone ACG::GLDodecahedron ACG::GLIcosahedron ACG::GLLineBox ACG::GLOctahedron ACG::GLPartialDisk ACG::GLSphere ACG::GLTetrahedron ACG::GLTorus

Public Types

enum  NormalOrientation { OUTSIDE , INSIDE }
 

Public Member Functions

void draw_primitive ()
 
void draw_primitive (GLSL::Program *_program)
 
void addToRenderer_primitive (class IRenderer *_renderer, struct RenderObject *_ro)
 
virtual int getNumTriangles ()=0
 
virtual int getNumLines ()
 
unsigned int getVBO ()
 
const VertexDeclarationgetVertexDecl () const
 

Protected Member Functions

virtual void updateVBO ()=0
 
void addTriangleToVBO (const ACG::Vec3f *_p, const ACG::Vec3f *_n, const ACG::Vec2f *_tex)
 
void addLineToVBO (const ACG::Vec3f *_p, const ACG::Vec3f *_n, const ACG::Vec2f *_tex)
 
void bindVBO ()
 
bool checkVBO ()
 
void unBindVBO ()
 

Protected Attributes

bool vboDataInvalid_
 
NormalOrientation normalOrientation_
 

Private Member Functions

void updateVBOData ()
 

Private Attributes

int numTris_
 
int numLines_
 
float * vboData_
 
int curTriPtr_
 
VertexDeclaration vertexDecl_
 
unsigned int vbo_
 

Detailed Description

Definition at line 72 of file GLPrimitives.hh.

Member Enumeration Documentation

◆ NormalOrientation

enum ACG::GLPrimitive::NormalOrientation

Definition at line 103 of file GLPrimitives.hh.

Constructor & Destructor Documentation

◆ GLPrimitive()

ACG::GLPrimitive::GLPrimitive ( )

Definition at line 54 of file GLPrimitives.cc.

◆ ~GLPrimitive()

ACG::GLPrimitive::~GLPrimitive ( )
virtual

Definition at line 71 of file GLPrimitives.cc.

Member Function Documentation

◆ addLineToVBO()

void ACG::GLPrimitive::addLineToVBO ( const ACG::Vec3f _p,
const ACG::Vec3f _n,
const ACG::Vec2f _tex 
)
protected

Definition at line 114 of file GLPrimitives.cc.

◆ addToRenderer_primitive()

void ACG::GLPrimitive::addToRenderer_primitive ( class IRenderer _renderer,
struct RenderObject _ro 
)

Definition at line 251 of file GLPrimitives.cc.

◆ addTriangleToVBO()

void ACG::GLPrimitive::addTriangleToVBO ( const ACG::Vec3f _p,
const ACG::Vec3f _n,
const ACG::Vec2f _tex 
)
protected

Definition at line 81 of file GLPrimitives.cc.

◆ bindVBO()

void ACG::GLPrimitive::bindVBO ( )
protected

Definition at line 148 of file GLPrimitives.cc.

◆ checkVBO()

bool ACG::GLPrimitive::checkVBO ( )
protected

Definition at line 172 of file GLPrimitives.cc.

◆ draw_primitive() [1/2]

void ACG::GLPrimitive::draw_primitive ( )

Definition at line 218 of file GLPrimitives.cc.

◆ draw_primitive() [2/2]

void ACG::GLPrimitive::draw_primitive ( GLSL::Program _program)

Definition at line 232 of file GLPrimitives.cc.

◆ getNumLines()

virtual int ACG::GLPrimitive::getNumLines ( )
inlinevirtual

Definition at line 96 of file GLPrimitives.hh.

◆ getVBO()

unsigned int ACG::GLPrimitive::getVBO ( )

Definition at line 282 of file GLPrimitives.cc.

◆ getVertexDecl()

const VertexDeclaration * ACG::GLPrimitive::getVertexDecl ( ) const

Definition at line 287 of file GLPrimitives.cc.

◆ unBindVBO()

void ACG::GLPrimitive::unBindVBO ( )
protected

Definition at line 205 of file GLPrimitives.cc.

◆ updateVBOData()

void ACG::GLPrimitive::updateVBOData ( )
private

Definition at line 269 of file GLPrimitives.cc.

Member Data Documentation

◆ curTriPtr_

int ACG::GLPrimitive::curTriPtr_
private

Definition at line 130 of file GLPrimitives.hh.

◆ normalOrientation_

NormalOrientation ACG::GLPrimitive::normalOrientation_
protected

Definition at line 121 of file GLPrimitives.hh.

◆ numLines_

int ACG::GLPrimitive::numLines_
private

Definition at line 128 of file GLPrimitives.hh.

◆ numTris_

int ACG::GLPrimitive::numTris_
private

Definition at line 127 of file GLPrimitives.hh.

◆ vbo_

unsigned int ACG::GLPrimitive::vbo_
private

Definition at line 134 of file GLPrimitives.hh.

◆ vboData_

float* ACG::GLPrimitive::vboData_
private

Definition at line 129 of file GLPrimitives.hh.

◆ vboDataInvalid_

bool ACG::GLPrimitive::vboDataInvalid_
protected

Definition at line 119 of file GLPrimitives.hh.

◆ vertexDecl_

VertexDeclaration ACG::GLPrimitive::vertexDecl_
private

Definition at line 132 of file GLPrimitives.hh.


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