pgl
PrimitiveOpenGL3Dprimitivelibrary
|
Generalized cylinder Primitive. More...
#include <primitive.h>
Public Member Functions | |
Cylinder (double length, double radius, double endradius=-1) | |
Specifies length, radius, and end radius. More... | |
Cylinder (const Vector3 &start, const Vector3 &end, double radius, double endradius=-1) | |
Specifies start and end coordinates, as well as radius and end radius. More... | |
![]() | |
Primitive () | |
Default constructor. More... | |
virtual void | draw () |
Draw primitive and its children. | |
![]() | |
Object () | |
Default constructor. More... | |
![]() | |
template<class T > | |
T * | attach (T *child) |
Add child to list of sub-objects. More... | |
Protected Member Functions | |
void | make (double length, double radius, double endradius) |
void | vertex (const Vector3 &v) |
Enters vertex into display list. | |
![]() | |
double | align (const Vector3 &start, const Vector3 &end) |
Align primitive along axis. More... | |
virtual void | normal (const Vector3 &v) |
Sets norm for subsequent vertices. | |
virtual void | quad (const Vector3 &v1, const Vector3 &v2, const Vector3 &v3, const Vector3 &v4) |
Draws a four-sided polygon using two triangles. More... | |
virtual void | triangle (const Vector3 &v1, const Vector3 &v2, const Vector3 &v3) |
Draws triangle. | |
Additional Inherited Members | |
![]() | |
Vector3 | color |
Primitive color. | |
![]() | |
Transform | transform |
Position and orientation. | |
![]() | |
std::vector< Node * > | children |
Sub-objects. | |
![]() | |
GLuint | list_ |
OpenGL display list identifier. | |
Generalized cylinder Primitive.
The cylinder can have different start and end radii.
|
inline |
Specifies length, radius, and end radius.
When not specified, the end radius is equal to the radius.
|
inline |
Specifies start and end coordinates, as well as radius and end radius.
When not specified, the end radius is equal to the radius.