GCGlib  0.04.228
GCG Graphics Engine
Primitive drawing

Functions

bool gcgDrawLogo (float scale=0.67)
 Draws the GCG logo on the top right conner of the viewport. More...
 
bool gcgDrawAABox (VECTOR3 bbmin, VECTOR3 bbmax)
 Draws an axis aligned box. Normals are sent and can be used for lighting. All parameters are float values. More...
 
bool gcgDrawAABox (VECTOR3d bbmin, VECTOR3d bbmax)
 Draws an axis aligned box. Normals are sent and can be used for lighting. All parameters are double values. More...
 
bool gcgDrawOBox (VECTOR3 obbangles, VECTOR3 obbcenter, VECTOR3 obbsize)
 Draws an oriented box. Normals are sent and can be used for lighting. All parameters are float values. More...
 
bool gcgDrawOBox (VECTOR3d obbangles, VECTOR3d obbcenter, VECTOR3d obbsize)
 Draws an oriented box. Normals are sent and can be used for lighting. All parameters are double values. More...
 
bool gcgDrawVectorPyramid (float x, float y, float z, VECTOR3 vector, float scale)
 Draws an oriented pyramid (its base is not drawn) which can be used to represent vectors: 4 triangles are drawn using 6 vertices. Normals are sent and can be used for lighting. All parameters are float. More...
 
bool gcgDrawVectorPyramid (float x, float y, float z, VECTOR3d vector, float scale)
 Draws an oriented pyramid (its base is not drawn) which can be used to represent vectors: 4 triangles are drawn using 6 vertices. Normals are sent and can be used for lighting. All parameters are double. More...
 
bool gcgDrawVectorPyramidClosed (float x, float y, float z, VECTOR3 vector, float scale)
 Draws an oriented pyramid (its base is also drawn) which can be used to represent vectors: 6 triangles are drawn using 8 vertices. Normals are sent and can be used for lighting. All parameters are float. More...
 
bool gcgDrawVectorPyramidClosed (float x, float y, float z, VECTOR3d vector, float scale)
 Draws an oriented pyramid (its base is also drawn) which can be used to represent vectors: 6 triangles are drawn using 8 vertices. Normals are sent and can be used for lighting. All parameters are double. More...
 
bool gcgDrawVectorThetrahedron (float x, float y, float z, VECTOR3 vector, float scale)
 Draws an oriented thetahedron (its base is not drawn) which can be used to represent vectors: 3 triangles are drawn using 5 vertices. Normals are sent and can be used for lighting. All parameters are float. More...
 
bool gcgDrawVectorThetrahedron (float x, float y, float z, VECTOR3d vector, float scale)
 Draws an oriented thetrahedron (its base is not drawn) which can be used to represent vectors: 3 triangles are drawn using 5 vertices. Normals are sent and can be used for lighting. All parameters are double. More...
 
bool gcgDrawVectorThetrahedronClosed (float x, float y, float z, VECTOR3 vector, float scale)
 Draws an oriented thetrahedron (its base is also drawn) which can be used to represent vectors: 4 triangles are drawn using 6 vertices. Normals are sent and can be used for lighting. All parameters are float. More...
 
bool gcgDrawVectorThetrahedronClosed (float x, float y, float z, VECTOR3d vector, float scale)
 Draws an oriented thetrahedron (its base is also drawn) which can be used to represent vectors: 4 triangles are drawn using 6 vertices. Normals are sent and can be used for lighting. All parameters are double. More...
 

Detailed Description

This section presents functions and classes for drawing primitives.

Function Documentation

◆ gcgDrawAABox() [1/2]

bool gcgDrawAABox ( VECTOR3  bbmin,
VECTOR3  bbmax 
)

Draws an axis aligned box. Normals are sent and can be used for lighting. All parameters are float values.

Parameters
[in]bbminMinimum x, y and z coordinates of the bounding box.
[in]bbmaxMaximum x, y and z coordinates of the bounding box.
Returns
true if the axis aligned bounding box is correctly drawn.
Since
0.01.0

◆ gcgDrawAABox() [2/2]

bool gcgDrawAABox ( VECTOR3d  bbmin,
VECTOR3d  bbmax 
)

Draws an axis aligned box. Normals are sent and can be used for lighting. All parameters are double values.

Parameters
[in]bbminMinimum x, y and z coordinates of the bounding box.
[in]bbmaxMaximum x, y and z coordinates of the bounding box.
Returns
true if the axis aligned bounding box is correctly drawn.
Since
0.01.0

◆ gcgDrawLogo()

bool gcgDrawLogo ( float  scale = 0.67)

Draws the GCG logo on the top right conner of the viewport.

Parameters
[in]scaleFactor to be used in scaling the GCG logo image which originally has 256 by 64 pixels.
Returns
true if the logo is correctly drawn.
Remarks
Modifies several graphics library features: blending, depth test, texture enabling, matrix mode, shade model and polygon filling.
Since
0.01.0

◆ gcgDrawOBox() [1/2]

bool gcgDrawOBox ( VECTOR3  obbangles,
VECTOR3  obbcenter,
VECTOR3  obbsize 
)

Draws an oriented box. Normals are sent and can be used for lighting. All parameters are float values.

Parameters
[in]obbanglesEuler angles in degrees for box orientation. Euler angles are generally referred as yaw, pitch and roll angles, corresponding to rotations to the x, y and z axis, in this order. Note that GCGlib uses the OpenGL orientation system. See gcgEULERTOQUATERNION() and gcgQUATERNIONTOMATRIX4() to further information on rotations.
[in]obbcenterThe x, y and z coordinates of the box center.
[in]obbsizeThe x, y and z sizes of the box, before its rotation by the Euler angles.
Returns
true if the axis aligned bounding box is correctly drawn.
Since
0.01.0

◆ gcgDrawOBox() [2/2]

bool gcgDrawOBox ( VECTOR3d  obbangles,
VECTOR3d  obbcenter,
VECTOR3d  obbsize 
)

Draws an oriented box. Normals are sent and can be used for lighting. All parameters are double values.

Parameters
[in]obbanglesEuler angles in degrees for box orientation. Euler angles are generally referred as yaw, pitch and roll angles, corresponding to rotations to the x, y and z axis, in this order. Note that GCGlib uses the OpenGL orientation system. See gcgEULERTOQUATERNION() and gcgQUATERNIONTOMATRIX4() to further information on rotations.
[in]obbcenterThe x, y and z coordinates of the box center.
[in]obbsizeThe x, y and z sizes of the box, before its rotation by the Euler angles.
Returns
true if the axis aligned bounding box is correctly drawn.
Since
0.01.0

◆ gcgDrawVectorPyramid() [1/2]

bool gcgDrawVectorPyramid ( float  x,
float  y,
float  z,
VECTOR3  vector,
float  scale 
)

Draws an oriented pyramid (its base is not drawn) which can be used to represent vectors: 4 triangles are drawn using 6 vertices. Normals are sent and can be used for lighting. All parameters are float.

Parameters
[in]xThe x center position of the vector.
[in]yThe y center position of the vector.
[in]zThe z center position of the vector.
[in]vectorThe vector indicating the direction of the pyramid. Its magnitude is ignored. The vector must be non null.
[in]scaleScaling to be applied to the pyramid with unitary height. It is generally the vector magnitude.
Returns
true if the vector is drawn.
Since
0.01.0
See also
gcgDrawVectorPyramidClosed
gcgDrawVectorThetrahedron
gcgDrawVectorThetrahedronClosed

◆ gcgDrawVectorPyramid() [2/2]

bool gcgDrawVectorPyramid ( float  x,
float  y,
float  z,
VECTOR3d  vector,
float  scale 
)

Draws an oriented pyramid (its base is not drawn) which can be used to represent vectors: 4 triangles are drawn using 6 vertices. Normals are sent and can be used for lighting. All parameters are double.

Parameters
[in]xThe x center position of the vector.
[in]yThe y center position of the vector.
[in]zThe z center position of the vector.
[in]vectorThe vector indicating the direction of the pyramid. Its magnitude is ignored. The vector must be non null.
[in]scaleScaling to be applied to the pyramid with unitary height. It is generally the vector magnitude.
Returns
true if the vector is drawn.
Since
0.01.0
See also
gcgDrawVectorPyramidClosed
gcgDrawVectorThetrahedron
gcgDrawVectorThetrahedronClosed

◆ gcgDrawVectorPyramidClosed() [1/2]

bool gcgDrawVectorPyramidClosed ( float  x,
float  y,
float  z,
VECTOR3  vector,
float  scale 
)

Draws an oriented pyramid (its base is also drawn) which can be used to represent vectors: 6 triangles are drawn using 8 vertices. Normals are sent and can be used for lighting. All parameters are float.

Parameters
[in]xThe x center position of the vector.
[in]yThe y center position of the vector.
[in]zThe z center position of the vector.
[in]vectorThe vector indicating the direction of the pyramid. Its magnitude is ignored. The vector must be non null.
[in]scaleScaling to be applied to the pyramid with unitary height. It is generally the vector magnitude.
Returns
true if the vector is drawn.
Since
0.01.62
See also
gcgDrawVectorPyramid
gcgDrawVectorThetrahedron
gcgDrawVectorThetrahedronClosed

◆ gcgDrawVectorPyramidClosed() [2/2]

bool gcgDrawVectorPyramidClosed ( float  x,
float  y,
float  z,
VECTOR3d  vector,
float  scale 
)

Draws an oriented pyramid (its base is also drawn) which can be used to represent vectors: 6 triangles are drawn using 8 vertices. Normals are sent and can be used for lighting. All parameters are double.

Parameters
[in]xThe x center position of the vector.
[in]yThe y center position of the vector.
[in]zThe z center position of the vector.
[in]vectorThe vector indicating the direction of the pyramid. Its magnitude is ignored. The vector must be non null.
[in]scaleScaling to be applied to the pyramid with unitary height. It is generally the vector magnitude.
Returns
true if the vector is drawn.
Since
0.01.62
See also
gcgDrawVectorPyramid
gcgDrawVectorThetrahedron
gcgDrawVectorThetrahedronClosed

◆ gcgDrawVectorThetrahedron() [1/2]

bool gcgDrawVectorThetrahedron ( float  x,
float  y,
float  z,
VECTOR3  vector,
float  scale 
)

Draws an oriented thetahedron (its base is not drawn) which can be used to represent vectors: 3 triangles are drawn using 5 vertices. Normals are sent and can be used for lighting. All parameters are float.

Parameters
[in]xThe x center position of the vector.
[in]yThe y center position of the vector.
[in]zThe z center position of the vector.
[in]vectorThe vector indicating the direction of the thetrahedron. Its magnitude is ignored. The vector must be non null.
[in]scaleScaling to be applied to the thetrahedron with unitary height. It is generally the vector magnitude.
Returns
true if the vector is drawn.
Since
0.01.62
See also
gcgDrawVectorPyramid
gcgDrawVectorPyramidClosed
gcgDrawVectorThetrahedronClosed

◆ gcgDrawVectorThetrahedron() [2/2]

bool gcgDrawVectorThetrahedron ( float  x,
float  y,
float  z,
VECTOR3d  vector,
float  scale 
)

Draws an oriented thetrahedron (its base is not drawn) which can be used to represent vectors: 3 triangles are drawn using 5 vertices. Normals are sent and can be used for lighting. All parameters are double.

Parameters
[in]xThe x center position of the vector.
[in]yThe y center position of the vector.
[in]zThe z center position of the vector.
[in]vectorThe vector indicating the direction of the thetrahedron. Its magnitude is ignored. The vector must be non null.
[in]scaleScaling to be applied to the thetrahedron with unitary height. It is generally the vector magnitude.
Returns
true if the vector is drawn.
Since
0.01.62
See also
gcgDrawVectorPyramid
gcgDrawVectorPyramidClosed
gcgDrawVectorThetrahedronClosed

◆ gcgDrawVectorThetrahedronClosed() [1/2]

bool gcgDrawVectorThetrahedronClosed ( float  x,
float  y,
float  z,
VECTOR3  vector,
float  scale 
)

Draws an oriented thetrahedron (its base is also drawn) which can be used to represent vectors: 4 triangles are drawn using 6 vertices. Normals are sent and can be used for lighting. All parameters are float.

Parameters
[in]xThe x center position of the vector.
[in]yThe y center position of the vector.
[in]zThe z center position of the vector.
[in]vectorThe vector indicating the direction of the thetrahedron. Its magnitude is ignored. The vector must be non null.
[in]scaleScaling to be applied to the thetrahedron with unitary height. It is generally the vector magnitude.
Returns
true if the vector is drawn.
Since
0.01.62
See also
gcgDrawVectorPyramid
gcgDrawVectorPyramidClosed
gcgDrawVectorThetrahedron

◆ gcgDrawVectorThetrahedronClosed() [2/2]

bool gcgDrawVectorThetrahedronClosed ( float  x,
float  y,
float  z,
VECTOR3d  vector,
float  scale 
)

Draws an oriented thetrahedron (its base is also drawn) which can be used to represent vectors: 4 triangles are drawn using 6 vertices. Normals are sent and can be used for lighting. All parameters are double.

Parameters
[in]xThe x center position of the vector.
[in]yThe y center position of the vector.
[in]zThe z center position of the vector.
[in]vectorThe vector indicating the direction of the thetrahedron. Its magnitude is ignored. The vector must be non null.
[in]scaleScaling to be applied to the thetrahedron with unitary height. It is generally the vector magnitude.
Returns
true if the vector is drawn.
Since
0.01.62
See also
gcgDrawVectorPyramid
gcgDrawVectorPyramidClosed
gcgDrawVectorThetrahedron