Developer Documentation
ACG::GLCone Class Reference
Inheritance diagram for ACG::GLCone:
ACG::GLPrimitive ACG::GLCylinder

Public Member Functions

 GLCone (int _slices, int _stacks, float _bottomRadius, float _topRadius, bool _bottomCap_, bool _topCap)
 
void draw (GLState &_state, float _height, const ACG::Vec3f &_center=ACG::Vec3f(0.0f, 0.0f, 0.0f), ACG::Vec3f _upDir=ACG::Vec3f(0.0f, 0.0f, 1.0f))
 
void addToRenderer (class IRenderer *_renderer, const struct RenderObject *_base, float _height, const ACG::Vec3f &_center=ACG::Vec3f(0.0f, 0.0f, 0.0f), ACG::Vec3f _upDir=ACG::Vec3f(0.0f, 0.0f, 1.0f), float _radiusScale=1.0f)
 
int getNumTriangles () override
 
void updateVBO () override
 
void setBottomRadius (float _bottomRadius)
 
void setTopRadius (float _topRadius)
 
void setNormalOrientation (NormalOrientation orienation)
 
- Public Member Functions inherited from ACG::GLPrimitive
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
 

Private Member Functions

void addTriangle (int sl0, int st0, int sl1, int st1, int sl2, int st2)
 
ACG::Vec3f positionOnCone (int _sliceNumber, int _stackNumber)
 
ACG::Vec2f texCoordOnCone (int _sliceNumber, int _stackNumber)
 
ACG::Vec3f normalOnCone (int _sliceNumber, int _stackNumber)
 

Private Attributes

int slices_
 
int stacks_
 
float bottomRadius_
 
float topRadius_
 
bool bottomCap_
 
bool topCap_
 

Additional Inherited Members

- Public Types inherited from ACG::GLPrimitive
enum  NormalOrientation { OUTSIDE , INSIDE }
 
- Protected Member Functions inherited from ACG::GLPrimitive
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 inherited from ACG::GLPrimitive
bool vboDataInvalid_
 
NormalOrientation normalOrientation_
 

Detailed Description

Definition at line 169 of file GLPrimitives.hh.

Constructor & Destructor Documentation

◆ GLCone()

ACG::GLCone::GLCone ( int  _slices,
int  _stacks,
float  _bottomRadius,
float  _topRadius,
bool  _bottomCap_,
bool  _topCap 
)

Definition at line 423 of file GLPrimitives.cc.

◆ ~GLCone()

ACG::GLCone::~GLCone ( )

Definition at line 436 of file GLPrimitives.cc.

Member Function Documentation

◆ addToRenderer()

void ACG::GLCone::addToRenderer ( class IRenderer _renderer,
const struct RenderObject _base,
float  _height,
const ACG::Vec3f _center = ACG::Vec3f(0.0f, 0.0f, 0.0f),
ACG::Vec3f  _upDir = ACG::Vec3f(0.0f, 0.0f, 1.0f),
float  _radiusScale = 1.0f 
)

Definition at line 517 of file GLPrimitives.cc.

◆ addTriangle()

void ACG::GLCone::addTriangle ( int  sl0,
int  st0,
int  sl1,
int  st1,
int  sl2,
int  st2 
)
private

Definition at line 624 of file GLPrimitives.cc.

◆ draw()

void ACG::GLCone::draw ( GLState _state,
float  _height,
const ACG::Vec3f _center = ACG::Vec3f(0.0f, 0.0f, 0.0f),
ACG::Vec3f  _upDir = ACG::Vec3f(0.0f, 0.0f, 1.0f) 
)

Definition at line 467 of file GLPrimitives.cc.

◆ getNumTriangles()

int ACG::GLCone::getNumTriangles ( )
overridevirtual

Implements ACG::GLPrimitive.

Definition at line 564 of file GLPrimitives.cc.

◆ normalOnCone()

ACG::Vec3f ACG::GLCone::normalOnCone ( int  _sliceNumber,
int  _stackNumber 
)
private

Definition at line 607 of file GLPrimitives.cc.

◆ positionOnCone()

ACG::Vec3f ACG::GLCone::positionOnCone ( int  _sliceNumber,
int  _stackNumber 
)
private

Definition at line 578 of file GLPrimitives.cc.

◆ setBottomRadius()

void ACG::GLCone::setBottomRadius ( float  _bottomRadius)

Definition at line 443 of file GLPrimitives.cc.

◆ setNormalOrientation()

void ACG::GLCone::setNormalOrientation ( NormalOrientation  orienation)

Definition at line 459 of file GLPrimitives.cc.

◆ setTopRadius()

void ACG::GLCone::setTopRadius ( float  _topRadius)

Definition at line 451 of file GLPrimitives.cc.

◆ texCoordOnCone()

ACG::Vec2f ACG::GLCone::texCoordOnCone ( int  _sliceNumber,
int  _stackNumber 
)
private

Definition at line 595 of file GLPrimitives.cc.

◆ updateVBO()

void ACG::GLCone::updateVBO ( )
overridevirtual

Implements ACG::GLPrimitive.

Definition at line 651 of file GLPrimitives.cc.

Member Data Documentation

◆ bottomCap_

bool ACG::GLCone::bottomCap_
private

Definition at line 211 of file GLPrimitives.hh.

◆ bottomRadius_

float ACG::GLCone::bottomRadius_
private

Definition at line 208 of file GLPrimitives.hh.

◆ slices_

int ACG::GLCone::slices_
private

Definition at line 205 of file GLPrimitives.hh.

◆ stacks_

int ACG::GLCone::stacks_
private

Definition at line 206 of file GLPrimitives.hh.

◆ topCap_

bool ACG::GLCone::topCap_
private

Definition at line 212 of file GLPrimitives.hh.

◆ topRadius_

float ACG::GLCone::topRadius_
private

Definition at line 209 of file GLPrimitives.hh.


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