69 MENGE_API
void initShapes();
79 MENGE_API
void glSphere(
int samples );
115 void setColor(
float r,
float g,
float b ) { _r=r; _g=g; _b=b; }
175 void drawGL(
bool select=
false );
190 static void drawCircle(
float radius,
float r,
float g,
float b,
float a, GLenum style=GL_FILL );
195 static void drawUnit();
218 static void newGLContext();
244 Cylinder(
float radius,
float height ):
Shape(), _radius(radius), _height(height){}
254 Cylinder(
float radius,
float height,
float r,
float g,
float b ):
Shape(r,g,b), _radius(radius), _height(height){}
260 void drawGL(
bool select=
false );
274 static void drawCylinder(
float radius,
float height,
float r,
float g,
float b,
float a, GLenum style=GL_FILL );
301 static void newGLContext();
310 #endif // __SHAPES_H__
Cylinder(float radius, float height, float r, float g, float b)
Full constructor. Sets the size and color of the cylinder.
Definition: shapes.h:254
The core namespace. All elements of Menge are contained in this namespace.
Definition: AgentGenerator.cpp:43
static int GL_ID
The identifier for the display list for this primitive.
Definition: shapes.h:306
float _r
The red component of the shape's color.
Definition: shapes.h:128
An abstact class – a generic, scene graph node.
Definition: GLNode.h:66
Sets up the proper compiler directives for platform and dll export/import.
float _radius
The radius of the circle (in world space units).
Definition: shapes.h:208
Type y() const
Get the y-value.
Definition: Vector3.h:115
Cylinder()
Default constructor. Unit size and default shape color.
Definition: shapes.h:236
Shape(float r, float g, float b, GLenum s=GL_FILL)
Constructor with color and drawing style.
Definition: shapes.h:99
float _radius
The radius of the cylinder.
Definition: shapes.h:285
static bool IS_REGISTERED
Determines if the Circle::newGLContext has been registered.
Definition: shapes.h:213
float _height
The height of the cylinder.
Definition: shapes.h:290
void setColor(float r, float g, float b)
Set the shape color from three separate values.
Definition: shapes.h:115
float _g
The green component of the shape's color.
Definition: shapes.h:133
The basic scene graph node. Any object which can be placed into the scene graph is an instance or sub...
Cylinder(float radius, float height)
Size constructor. Sets the size of the cylinder to the specified radius and height and default shape ...
Definition: shapes.h:244
A GLNode for drawing cylinders. The cylinder has unit radius and unit height and the bottom of the cy...
Definition: shapes.h:231
The SceneGraph (SceneGraph) name space, containing all elements to use in a SceneGraph.
GLenum _style
The shape's OpenGL rendering style. Should be one of GL_FILL, GL_LINE, or GL_POINT.
Definition: shapes.h:143
Functionality to make nodes in the scene graph selectable by mouse clicking.
static bool IS_REGISTERED
Reports if the class has been registered with the context manager.
Definition: shapes.h:296
void setColor(const Vector3 &vec)
Set the shape color from a vector.
Definition: shapes.h:106
A GLNode for drawing circles. The circle is drawn around the world space origin, lying on the x-z pla...
Definition: shapes.h:150
Shape()
Default constructor.
Definition: shapes.h:89
void setStyle(GLenum style)
Set the shape's render style.
Definition: shapes.h:122
static int GL_ID
OpenGL display list for drawing a circle.
Definition: shapes.h:223
Type x() const
Get the x-value.
Definition: Vector3.h:108
Type z() const
Get the z-value.
Definition: Vector3.h:122
float _b
The blue component of the shape's color.
Definition: shapes.h:138
Various important pre-compiler directives for the scene graph.
The basic shape class - a selectable GLNode.
Definition: shapes.h:84
Circle()
Default constructor.
Definition: shapes.h:155
Circle(float r, float g, float b)
Constructor with color.
Definition: shapes.h:164
The class interface for selectable objects – objects which can be selectedc in the OpenGL context by...
Definition: Select.h:59