58 #ifndef ACG_GLPRIMITIVES_HH 59 #define ACG_GLPRIMITIVES_HH 65 #include <ACG/Config/ACGDefines.hh> 66 #include <ACG/GL/GLState.hh> 67 #include <ACG/Math/VectorT.hh> 68 #include <ACG/GL/VertexDeclaration.hh> 84 void draw_primitive();
93 virtual int getNumTriangles() = 0;
94 virtual int getNumLines() {
return 0;}
97 unsigned int getVBO();
101 enum NormalOrientation {OUTSIDE, INSIDE};
106 virtual void updateVBO() = 0;
117 bool vboDataInvalid_;
119 NormalOrientation normalOrientation_;
123 void updateVBOData();
147 int getNumTriangles();
153 void addTriangle(
int sl0,
int st0,
int sl1,
int st1,
int sl2,
int st2);
155 ACG::Vec3f positionOnSphere(
int _sliceNumber,
int _stackNumber);
156 ACG::Vec2f texCoordOnSphere(
int _sliceNumber,
int _stackNumber);
170 GLCone(
int _slices,
int _stacks,
float _bottomRadius,
float _topRadius,
bool _bottomCap_,
bool _topCap);
184 float _radiusScale = 1.0f);
186 int getNumTriangles();
189 void setBottomRadius(
float _bottomRadius);
190 void setTopRadius(
float _topRadius);
191 void setNormalOrientation(NormalOrientation orienation);
195 void addTriangle(
int sl0,
int st0,
int sl1,
int st1,
int sl2,
int st2);
197 ACG::Vec3f positionOnCone(
int _sliceNumber,
int _stackNumber);
198 ACG::Vec2f texCoordOnCone(
int _sliceNumber,
int _stackNumber);
199 ACG::Vec3f normalOnCone(
int _sliceNumber,
int _stackNumber);
218 GLCylinder(
int _slices,
int _stacks,
float _radius,
bool _bottomCap,
bool _topCap);
225 GLPartialDisk(
int _slices,
int _loops,
float _innerRadius,
float _outerRadius,
float _startAngle,
float _sweepAngle);
227 void setInnerRadius(
float _innerRadius);
228 void setOuterRadius(
float _outerRadius);
229 int getNumTriangles();
252 GLDisk(
int _slices,
int _loops,
float _innerRadius,
float _outerRadius);
264 int getNumTriangles();
280 int getNumTriangles();
293 #endif // ACG_GLPRIMITIVES_HH defined
Class to define the vertex input layout.
Namespace providing different geometric functions concerning angles.
Interface class between scenegraph and renderer.