A GLNode for drawing cylinders. The cylinder has unit radius and unit height and the bottom of the cylinder sits on the origin. The height is along the y-axis.
More...
#include <shapes.h>
|
| Cylinder () |
| Default constructor. Unit size and default shape color.
|
|
| Cylinder (float radius, float height) |
| Size constructor. Sets the size of the cylinder to the specified radius and height and default shape color. More...
|
|
| Cylinder (float radius, float height, float r, float g, float b) |
| Full constructor. Sets the size and color of the cylinder. More...
|
|
void | drawGL (bool select=false) |
| The method for drawing the cylinder instance. More...
|
|
| Shape () |
| Default constructor.
|
|
| Shape (float r, float g, float b, GLenum s=GL_FILL) |
| Constructor with color and drawing style. More...
|
|
void | setColor (const Vector3 &vec) |
| Set the shape color from a vector. More...
|
|
void | setColor (float r, float g, float b) |
| Set the shape color from three separate values. More...
|
|
void | setStyle (GLenum style) |
| Set the shape's render style. More...
|
|
| GLNode (GLDagNode *parent=0x0) |
| Constructor. More...
|
|
virtual | ~GLNode () |
| Virtual destructor.
|
|
void | setVisible (bool state) |
| Sets the visible state of the node. More...
|
|
virtual void | newContext () |
| Allows the node to recreate any unique OpenGL objects based on the acquisition of a new OpenGL context. More...
|
|
GLDagNode * | getParent () |
| Returns a pointer to the node's parent (possibly NULL). More...
|
|
| Selectable () |
| Constructor.
|
|
void | loadSelectName () const |
| Performs the OpenGL task to make this object selectable.
|
|
unsigned int | getID () const |
| Returns this object's globally unique selection id. More...
|
|
virtual void | dummy () |
| A dummy function that makes Selectable polymorphic. It enables the use of dynamic_cast. Otherwise, it is a no-op.
|
|
|
static void | newGLContext () |
| Called when the context changes.
|
|
|
float | _radius |
| The radius of the cylinder.
|
|
float | _height |
| The height of the cylinder.
|
|
float | _r |
| The red component of the shape's color.
|
|
float | _g |
| The green component of the shape's color.
|
|
float | _b |
| The blue component of the shape's color.
|
|
GLenum | _style |
| The shape's OpenGL rendering style. Should be one of GL_FILL, GL_LINE, or GL_POINT.
|
|
GLDagNode * | _parent |
| The GLDagNode that serves as this node's parent.
|
|
bool | _visible |
| The visibility state of this node. If visible (true) the node and its children will be drawn into the scene, if invisible (false) it will not be drawn.
|
|
unsigned int | _id |
| Globally unique OpenGL name for selection.
|
|
bool | _selected |
| Reports if this node is selcted. More...
|
|
|
static bool | IS_REGISTERED = false |
| Reports if the class has been registered with the context manager.
|
|
static int | GL_ID = 0 |
| The identifier for the display list for this primitive.
|
|
A GLNode for drawing cylinders. The cylinder has unit radius and unit height and the bottom of the cylinder sits on the origin. The height is along the y-axis.
Menge::SceneGraph::Cylinder::Cylinder |
( |
float |
radius, |
|
|
float |
height |
|
) |
| |
|
inline |
Size constructor. Sets the size of the cylinder to the specified radius and height and default shape color.
- Parameters
-
radius | The radius of the cylinder. |
height | The height of the cylinder. |
Menge::SceneGraph::Cylinder::Cylinder |
( |
float |
radius, |
|
|
float |
height, |
|
|
float |
r, |
|
|
float |
g, |
|
|
float |
b |
|
) |
| |
|
inline |
Full constructor. Sets the size and color of the cylinder.
- Parameters
-
radius | The radius of the cylinder. |
height | The height of the cylinder. |
r | The red component of the color (in the range [0,1] ). |
g | The green component of the color (in the range [0,1] ). |
b | The blue component of the color (in the range [0,1] ). |
void Menge::SceneGraph::Cylinder::drawCylinder |
( |
float |
radius, |
|
|
float |
height, |
|
|
float |
r, |
|
|
float |
g, |
|
|
float |
b, |
|
|
float |
a, |
|
|
GLenum |
style = GL_FILL |
|
) |
| |
|
static |
Draw a cylinder without access to an instance.
- Parameters
-
radius | The radius of the cylinder. |
height | The height of the cylinder. |
r | The red component of the color (in the range [0,1] ). |
g | The green component of the color (in the range [0,1] ). |
b | The blue component of the color (in the range [0,1] ). |
a | The alpha component of the color (in the range [0,1] ). |
style | The draw style of the shape - enumerations consistent with glPolygonMode are acceptable arguments. |
void Menge::SceneGraph::Cylinder::drawGL |
( |
bool |
select = false | ) |
|
|
virtual |
The method for drawing the cylinder instance.
- Parameters
-
select | Determines if the cylinder is being drawn in selection mode. |
Implements Menge::SceneGraph::GLNode.
The documentation for this class was generated from the following files:
- src/menge/MengeCore/SceneGraph/shapes.h
- src/menge/MengeCore/SceneGraph/shapes.cpp