A GLNode for drawing circles. The circle is drawn around the world space origin, lying on the x-z plane.
More...
#include <shapes.h>
|
| Circle () |
| Default constructor.
|
|
| Circle (float r, float g, float b) |
| Constructor with color. More...
|
|
void | drawGL (bool select=false) |
| Function for drawing a circle into the context. 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 () |
| The function to call when an OpenGL context has changed.
|
|
|
float | _radius |
| The radius of the circle (in world space units).
|
|
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...
|
|
A GLNode for drawing circles. The circle is drawn around the world space origin, lying on the x-z plane.
Menge::SceneGraph::Circle::Circle |
( |
float |
r, |
|
|
float |
g, |
|
|
float |
b |
|
) |
| |
|
inline |
Constructor with color.
- Parameters
-
r | The red component of the circle's color (in the range [0, 1]). |
g | The green component of the circle's color (in the range [0, 1]). |
b | The blue component of the circle's color (in the range [0, 1]). |
void Menge::SceneGraph::Circle::drawCircle |
( |
float |
radius, |
|
|
float |
r, |
|
|
float |
g, |
|
|
float |
b, |
|
|
float |
a, |
|
|
GLenum |
style = GL_FILL |
|
) |
| |
|
static |
Static function for drawing circles in the context with out instances.
The circle is drawn on the x-z OpenGL plane, centered on the origin. To change position or orientation, the draw call should be preceeded by appropriate transforms.
- Parameters
-
radius | The radius of the circle. |
r | The red component of the shape's color (in the range [0, 1]). |
g | The green component of the shape's color (in the range [0, 1]). |
b | The blue component of the shape's color (in the range [0, 1]). |
a | The alpha componet of the shape's color (in the range [0, 1]). |
style | OpenGL render style: GL_FILL, GL_LINE, or GL_POINT. |
void Menge::SceneGraph::Circle::drawGL |
( |
bool |
select = false | ) |
|
|
virtual |
Function for drawing a circle into the context.
The circle is drawn on the x-z OpenGL plane, centered on the origin. To change position or orientation, the draw call should be preceeded by appropriate transforms.
- Parameters
-
select | True if the circle is being drawn for selection purposes, false otherwise. |
Implements Menge::SceneGraph::GLNode.
void Menge::SceneGraph::Circle::init |
( |
| ) |
|
|
static |
Initializes the OpenGL primitives for drawing the circle.
A call to this function has been added to initShapes.
The documentation for this class was generated from the following files:
- src/menge/MengeCore/SceneGraph/shapes.h
- src/menge/MengeCore/SceneGraph/shapes.cpp