|
pgl
PrimitiveOpenGL3Dprimitivelibrary
|
Basic 3D primitive. More...
#include <primitive.h>


Public Member Functions | |
| Primitive () | |
| Default constructor. More... | |
| virtual void | draw () |
| Draw primitive and its children. | |
Public Member Functions inherited from pgl::Object | |
| Object () | |
| Default constructor. More... | |
Public Member Functions inherited from pgl::Node | |
| template<class T > | |
| T * | attach (T *child) |
| Add child to list of sub-objects. More... | |
Public Attributes | |
| Vector3 | color |
| Primitive color. | |
Public Attributes inherited from pgl::Object | |
| Transform | transform |
| Position and orientation. | |
Public Attributes inherited from pgl::Node | |
| std::vector< Node * > | children |
| Sub-objects. | |
Protected Member Functions | |
| 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 | vertex (const Vector3 &v) |
| Enters vertex into display list. | |
| 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. | |
Protected Attributes | |
| GLuint | list_ |
| OpenGL display list identifier. | |
Basic 3D primitive.
An object that actually draws something. Derived objects generally create a display list upon construction that is drawn by this superclass.
|
inline |
Default constructor.
The default color is white.
Align primitive along axis.
Align a centered z-axis aligned primitive along end-start, starting at start.
|
inlineprotectedvirtual |
Draws a four-sided polygon using two triangles.
Assuming the polygon is in counter-clockwise order, the triangles are as well.
1.8.13