52 #ifndef ACG_GLPRIMITIVES_HH 53 #define ACG_GLPRIMITIVES_HH 59 #include <ACG/Config/ACGDefines.hh> 60 #include <ACG/GL/GLState.hh> 61 #include <ACG/Math/VectorT.hh> 62 #include <ACG/GL/VertexDeclaration.hh> 79 void draw_primitive();
95 virtual int getNumTriangles() = 0;
96 virtual int getNumLines() {
return 0;}
99 unsigned int getVBO();
103 enum NormalOrientation {OUTSIDE, INSIDE};
108 virtual void updateVBO() = 0;
119 bool vboDataInvalid_;
121 NormalOrientation normalOrientation_;
125 void updateVBOData();
149 int getNumTriangles();
155 void addTriangle(
int sl0,
int st0,
int sl1,
int st1,
int sl2,
int st2);
157 ACG::Vec3f positionOnSphere(
int _sliceNumber,
int _stackNumber);
158 ACG::Vec2f texCoordOnSphere(
int _sliceNumber,
int _stackNumber);
172 GLCone(
int _slices,
int _stacks,
float _bottomRadius,
float _topRadius,
bool _bottomCap_,
bool _topCap);
186 float _radiusScale = 1.0f);
188 int getNumTriangles();
191 void setBottomRadius(
float _bottomRadius);
192 void setTopRadius(
float _topRadius);
193 void setNormalOrientation(NormalOrientation orienation);
197 void addTriangle(
int sl0,
int st0,
int sl1,
int st1,
int sl2,
int st2);
199 ACG::Vec3f positionOnCone(
int _sliceNumber,
int _stackNumber);
200 ACG::Vec2f texCoordOnCone(
int _sliceNumber,
int _stackNumber);
201 ACG::Vec3f normalOnCone(
int _sliceNumber,
int _stackNumber);
220 GLCylinder(
int _slices,
int _stacks,
float _radius,
bool _bottomCap,
bool _topCap);
227 GLPartialDisk(
int _slices,
int _loops,
float _innerRadius,
float _outerRadius,
float _startAngle,
float _sweepAngle);
229 void setInnerRadius(
float _innerRadius);
230 void setOuterRadius(
float _outerRadius);
231 int getNumTriangles();
254 GLDisk(
int _slices,
int _loops,
float _innerRadius,
float _outerRadius);
266 int getNumTriangles();
282 int getNumTriangles();
299 int getNumTriangles();
315 int getNumTriangles();
331 int getNumTriangles();
347 int getNumTriangles();
361 GLdouble outerRadius,
362 GLint nsides, GLint rings);
365 int getNumTriangles();
382 #endif // ACG_GLPRIMITIVES_HH defined Namespace providing different geometric functions concerning angles.
Class to define the vertex input layout.
Interface class between scenegraph and renderer.