Cylinder.h
1 |
#ifndef CYLINDER_H
|
---|---|
2 |
#define CYLINDER_H
|
3 |
|
4 |
#include <ICLGeom/SceneObject.h> |
5 |
|
6 |
using namespace icl; |
7 |
|
8 |
class CylinderObject : public SceneObject { |
9 |
public:
|
10 |
CylinderObject(); |
11 |
~CylinderObject() {} |
12 |
|
13 |
// creates the vertex, colors and normal arrays according to number of subdivision steps,
|
14 |
// fills them with zeroed data, creates primitives
|
15 |
void setupGeometry(int _steps); |
16 |
// sets the actual vertex, color and normal data dynamically according to specified
|
17 |
// height and radius parameters
|
18 |
void updateGeometry(float height, float radius, GeomColor color = GeomColor(0,100,200,255)); |
19 |
|
20 |
private:
|
21 |
int steps;
|
22 |
}; |
23 |
|
24 |
#endif
|