Developer Documentation
ACG::GLPartialDisk Class Reference
Inheritance diagram for ACG::GLPartialDisk:
ACG::GLPrimitive ACG::GLDisk

Public Member Functions

 GLPartialDisk (int _slices, int _loops, float _innerRadius, float _outerRadius, float _startAngle, float _sweepAngle)
 
void setInnerRadius (float _innerRadius)
 
void setOuterRadius (float _outerRadius)
 
int getNumTriangles () override
 
void draw (GLState &_state, const ACG::Vec3f &_center=ACG::Vec3f(0.0f, 0.0f, 0.0f), ACG::Vec3f _upDir=ACG::Vec3f(0.0f, 0.0f, 1.0f))
 
- 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
 

Protected Member Functions

void updateVBO () override
 
- 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 ()
 

Private Attributes

int slices_
 
int loops_
 
float innerRadius_
 
float outerRadius_
 
float startAngle_
 
float sweepAngle_
 

Additional Inherited Members

- Public Types inherited from ACG::GLPrimitive
enum  NormalOrientation { OUTSIDE , INSIDE }
 
- Protected Attributes inherited from ACG::GLPrimitive
bool vboDataInvalid_
 
NormalOrientation normalOrientation_
 

Detailed Description

Definition at line 225 of file GLPrimitives.hh.

Constructor & Destructor Documentation

◆ GLPartialDisk()

ACG::GLPartialDisk::GLPartialDisk ( int  _slices,
int  _loops,
float  _innerRadius,
float  _outerRadius,
float  _startAngle,
float  _sweepAngle 
)
Parameters
[in]_slicesthe number of slices that subdivide the partial disk has to be at least 2
[in]_loopsthe number of loops that subdivide the slices has to be at least 1
[in]_innerRadiusthe inner radius should not be smaller than zero and greater than the outer radius
[in]_outerRadiusthe outer radius should not be zero or smaller than zero
[in]_startAnglethe angle at which the partial disk starts
[in]_sweepAnglethe angle at which the partial disk ends

Definition at line 737 of file GLPrimitives.cc.

Member Function Documentation

◆ draw()

void ACG::GLPartialDisk::draw ( GLState _state,
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 866 of file GLPrimitives.cc.

◆ getNumTriangles()

int ACG::GLPartialDisk::getNumTriangles ( )
overridevirtual

Implements ACG::GLPrimitive.

Definition at line 766 of file GLPrimitives.cc.

◆ setInnerRadius()

void ACG::GLPartialDisk::setInnerRadius ( float  _innerRadius)

Definition at line 750 of file GLPrimitives.cc.

◆ setOuterRadius()

void ACG::GLPartialDisk::setOuterRadius ( float  _outerRadius)

Definition at line 758 of file GLPrimitives.cc.

◆ updateVBO()

void ACG::GLPartialDisk::updateVBO ( )
overrideprotectedvirtual

Implements ACG::GLPrimitive.

Definition at line 772 of file GLPrimitives.cc.

Member Data Documentation

◆ innerRadius_

float ACG::GLPartialDisk::innerRadius_
private

Definition at line 244 of file GLPrimitives.hh.

◆ loops_

int ACG::GLPartialDisk::loops_
private

Definition at line 243 of file GLPrimitives.hh.

◆ outerRadius_

float ACG::GLPartialDisk::outerRadius_
private

Definition at line 245 of file GLPrimitives.hh.

◆ slices_

int ACG::GLPartialDisk::slices_
private

Definition at line 242 of file GLPrimitives.hh.

◆ startAngle_

float ACG::GLPartialDisk::startAngle_
private

Definition at line 246 of file GLPrimitives.hh.

◆ sweepAngle_

float ACG::GLPartialDisk::sweepAngle_
private

Definition at line 247 of file GLPrimitives.hh.


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