shape Namespace Reference
Define a set of shape to be drawn using OpenGL.
More...
Functions |
void | cube (const Point3d ¢er, const Point3d &axis1, const Point3d &axis2, double size) |
| Draw a cube.
|
void | cylinder (const Point3d &base_center, const Point3d &axis, double radius_base, double radius_top, double length, int slices, int stacks, bool closed=true) |
| Draw a cylinder.
|
void | disk (const Point3d ¢er, const Point3d &normal, double inner_radius, double outer_radius, int slices, int loops) |
| Draw a disk.
|
void | parallelepiped (const Point3d &corner, const Point3d &edge1, const Point3d &edge2, const Point3d &edge3) |
| Draw a parallelepiped.
|
void | sphere (const Point3d ¢er, double radius, int slices, int stacks) |
| Draw a sphere.
|
Detailed Description
Define a set of shape to be drawn using OpenGL.
Function Documentation
Draw a cube.
- Parameters:
-
| center | Center of the cube |
| axis1 | Direction of a set of edges |
| axis2 | The plane formed by (axis1,axis2) contains a set of faces |
| size | Length of an edge |
void shape::cylinder |
( |
const Point3d & |
base_center, |
|
|
const Point3d & |
axis, |
|
|
double |
radius_base, |
|
|
double |
radius_top, |
|
|
double |
length, |
|
|
int |
slices, |
|
|
int |
stacks, |
|
|
bool |
closed = true | |
|
) |
| | |
Draw a cylinder.
- Parameters:
-
| base_center | Position of the center of the base of the cylinder |
| axis | Direction of the main axis of the cylinder |
| radius_base | Radius of the base of the cylinder |
| radius_top | Radius at the top of the cylinder |
| length | Length of the cylinder |
| slices | Number of slices used to draw the cylinder |
| stacks | Number of stacks used to draw the cylinder |
| closed | If true, two disks are drawn at the base and top of the cylinder |
void shape::disk |
( |
const Point3d & |
center, |
|
|
const Point3d & |
normal, |
|
|
double |
inner_radius, |
|
|
double |
outer_radius, |
|
|
int |
slices, |
|
|
int |
loops | |
|
) |
| | |
Draw a disk.
- Parameters:
-
| center | Center of the disk |
| normal | Vector normal to the surface of the disk |
| inner_radius | Radius to start the disk, 0 for a full disk |
| outer_radius | Radius of the disk |
| slices | Number of slices used to draw the disk |
| loops | Number of loops used to draw the disk |
Draw a parallelepiped.
- Parameters:
-
| corner | Position of one of the corner |
| edge1 | Vector describing a set of edges (length and direction) |
| edge2 | Vector describing a set of edges (length and direction) |
| edge3 | Vector describing a set of edges (length and direction) |
void shape::sphere |
( |
const Point3d & |
center, |
|
|
double |
radius, |
|
|
int |
slices, |
|
|
int |
stacks | |
|
) |
| | |
Draw a sphere.
- Parameters:
-
| center | Center of the sphere |
| radius | Radius of the sphere |
| slices | Number of slices used to create the sphere |
| stacks | Number of stacks used to create the sphere |