eXperiment robotics framework

3D objects drawing functions
[OpenGL utilities]

Collaboration diagram for 3D objects drawing functions:
Contains functions draw 3d objects. More...
void drawCircle (GLfloat radius=1)
 draw a circle.
void drawEllipse (float xradius, float yradius, uint step=1)
 draw an ellipse.
void drawGridPolar (GLint increment=1, GLint count=8)
 draw a polar grid
void drawGridEuclidean (GLint increment=1, GLint count=100)
 draw an euclidean grid.
void drawReferential (GLfloat scale=1)
 draw a referential x,y,z.
void drawTarget (const Object3D &obj)
 draw a target in 3d given a Object3D
void drawTarget2d (const Vec3 &v)
 draw a 2d (x,y,yaw/angle) target given a vector.
void drawArrow (float length=1.0f, float radius=-1.0f, int nbSubdivisions=12)
void drawArrow (const Vec3 &from, const Vec3 &to, float radius=-1.0f, int nbSubdivisions=12)
void drawAxis (float length=1.0f)

Detailed Description

Contains functions draw 3d objects.

Author:
smogzer_at_gmail.com

Function Documentation

void drawArrow ( const Vec3 from,
const Vec3 to,
float  radius = -1.0f,
int  nbSubdivisions = 12 
)

Draws a 3D arrow between the 3D point from and the 3D point to, both defined in current ModelView coordinates system.

void drawArrow ( float  length = 1.0f,
float  radius = -1.0f,
int  nbSubdivisions = 12 
)

Draws a 3D arrow along the positive Z axis.

length, radius and nbSub subdivisions define its geometry. If radius is negative (default), it is set to 0.05 * length.

Change the modelView to place the arrow in 3D (see Frame::matrix() or drawArrow(const Vec3& from, const Vec3& to, float radius, int nbSubdivisions)).

Uses current color and does not modify the OpenGL state.

void drawAxis ( float  length = 1.0f  ) 

Draws an XYZ axis, with a given size (default is 1.0).

The axis position and orientation depends on the current modelView matrix state. /

Parameters:
length the length of the arrows.

void drawCircle ( GLfloat  radius = 1  ) 

draw a circle.

Parameters:
radius the radius of the circle.

void drawEllipse ( float  xradius,
float  yradius,
uint  step = 1 
)

draw an ellipse.

Parameters:
xradius the x radius of the ellipse.
yradius the y radius of the ellipse.
step the number of steps, higher means more detailed.

void drawGridEuclidean ( GLint  increment = 1,
GLint  count = 100 
)

draw an euclidean grid.

Parameters:
increment interval in meters between lines.
count number of lines in x in y plane.

void drawGridPolar ( GLint  increment = 1,
GLint  count = 8 
)

draw a polar grid

Parameters:
increment interval in meters between circles.
count number of circles.

void drawReferential ( GLfloat  scale = 1  ) 

draw a referential x,y,z.

Parameters:
scale the lenght of the arrows.

void drawTarget ( const Object3D obj  ) 

draw a target in 3d given a Object3D

Parameters:
obj draws a target in the coordinates of the object.

void drawTarget2d ( const Vec3 v  ) 

draw a 2d (x,y,yaw/angle) target given a vector.

Parameters:
v vector of coordinates (x,y,yaw) where the target will be drawn.


The miarn project - written by Joao Xavier