objectList

objectList — Gives storage for ids used by OpenGL lists and provides primitive routine for common drawing operations (distances, torus...).

Functions

Types and Values

Description

When using OpenGL list, one must specify ids. This module can return unused ids when needed.

Here are also defined the common primitive for drawing, see visu_gl_drawDistance() for instance.

Functions

visu_gl_objectlist_new ()

int
visu_gl_objectlist_new (int size);

It returns the id that can be used to link glObjectList. This number is also added to the list of glObjectList to be displayed. The size parameter is the number of lists that could be used by the user for this glObjectList. Then the next call to this function will return the last value plus the size plus one.

Parameters

size

the requested size.

 

Returns

an identifier used by OpenGl as a list.


visu_gl_objectlist_init ()

void
visu_gl_objectlist_init (void);

Used to initialise this part of code, don't use it.

[skip]


visu_gl_drawSmoothArrow ()

void
visu_gl_drawSmoothArrow (GLUquadricObj *obj,
                         VisuGlArrowCentering centering,
                         float tailLength,
                         float tailRadius,
                         float tailN,
                         const VisuElementRenderer *tailRenderer,
                         float hatLength,
                         float hatRadius,
                         float hatN,
                         const VisuElementRenderer *hatRenderer);

Draw arrows, using sqaure edges. For rounded arrows, see visu_gl_drawEdgeArrow().

Parameters

obj

.

[type gpointer]

centering

a flag.

 

tailLength

length of tail part.

 

tailRadius

length of edge of tail part.

 

tailN

number of edges in the approximation.

 

tailRenderer

a given VisuElementRenderer to take the rendering properties of.

[allow-none]

hatLength

length of hat part.

 

hatRadius

length of edge of hat part.

 

hatN

number of edges in the approximation.

 

hatRenderer

a given VisuElementRenderer to take the rendering properties of.

[allow-none]

Since: 3.6


visu_gl_drawEdgeArrow ()

void
visu_gl_drawEdgeArrow (VisuGlArrowCentering centering,
                       float tailLength,
                       float tailRadius,
                       const VisuElementRenderer *tailRenderer,
                       float hatLength,
                       float hatRadius,
                       const VisuElementRenderer *hatRenderer);

Draw arrows, using sqaure edges. For rounded arrows, see visu_gl_drawSmoothArrow().

Parameters

centering

a flag.

 

tailLength

length of tail part.

 

tailRadius

length of edge of tail part.

 

tailRenderer

a given VisuElementRenderer to take the rendering properties of.

[allow-none]

hatLength

length of hat part.

 

hatRadius

length of edge of hat part.

 

hatRenderer

a given VisuElementRenderer to take the rendering properties of.

[allow-none]

Since: 3.6


visu_gl_drawEllipsoid ()

void
visu_gl_drawEllipsoid (GLUquadricObj *obj,
                       float aAxis,
                       float bAxis,
                       float n,
                       const VisuElementRenderer *renderer);

Draw an ellipsoid.

Parameters

obj

.

[type gpointer]

aAxis

length of long axis.

 

bAxis

length of short axis.

 

n

number of edges for the sphere approximation.

 

renderer

a given VisuElementRenderer to take the rendering properties of.

[allow-none]

Since: 3.6


visu_gl_drawTorus ()

void
visu_gl_drawTorus (GLUquadricObj *obj,
                   float radius,
                   float ratio,
                   int nA,
                   int nB,
                   const VisuElementRenderer *renderer);

Draw a torus.

Parameters

obj

.

[type gpointer]

radius

global radius.

 

ratio

ratio on internal radius over global radius.

 

nA

number of edges for the global radius.

 

nB

number of edges for the internal radius.

 

renderer

a given VisuElementRenderer to take the rendering properties of.

[allow-none]

Since: 3.5


visu_gl_drawDipole ()

void
visu_gl_drawDipole (GLUquadricObj *obj,
                    gfloat radius,
                    int nA,
                    int nB,
                    const VisuElementRenderer *renderer);

Draw a dipole.

Parameters

obj

.

[type gpointer]

radius

global radius.

 

ratio

ratio on internal radius over global radius.

 

nA

number of edges for the global radius.

 

nB

number of edges for the internal radius.

 

renderer

a given VisuElementRenderer to take the rendering properties of.

[allow-none]

Since: 3.8


visu_gl_drawQuadripole ()

void
visu_gl_drawQuadripole (GLUquadricObj *obj,
                        guint mode,
                        float radius,
                        int nA,
                        int nB,
                        const VisuElementRenderer *renderer);

Draw a dipole.

Parameters

obj

.

[type gpointer]

radius

global radius.

 

ratio

ratio on internal radius over global radius.

 

nA

number of edges for the global radius.

 

nB

number of edges for the internal radius.

 

renderer

a given VisuElementRenderer to take the rendering properties of.

[allow-none]

Since: 3.8


visu_gl_drawDistance ()

void
visu_gl_drawDistance (float xyzRef[3],
                      float xyz[3],
                      gboolean drawLength);

Draw a distance mark between xyzRef and xyz . A distance mark is a colour inverted line and two squared marks on node. drawLength is a flag to display or not the distance value.

Parameters

xyzRef

cartesian coordinates of first ref.

 

xyz

cartesian coordinates of current point.

 

drawLength

a boolean.

 

Since: 3.6


visu_gl_drawAngle ()

void
visu_gl_drawAngle (float xyzRef[3],
                   float xyzRef2[3],
                   float xyz[3],
                   guint id,
                   gboolean drawLength);

Draw an angle mark by to distance marks and a disk taking xyzRef as central point and xyzRef2 and xyz as the two positions. id is a counter to obtain different colours for the disk and drawLength is a flag to display or not the angle value in degrees.

Parameters

xyzRef

cartesian coordinates of first ref.

 

xyzRef2

cartesian coordinates of second ref.

 

xyz

cartesian coordinates of current point.

 

id

a counter.

 

drawLength

a boolean.

 

Since: 3.6

Types and Values

enum VisuGlArrowCentering

The way to draw arrows (see visu_gl_drawSmoothArrow() for instance).

Members

VISU_GL_ARROW_ORIGIN_CENTERED

the arrows are positioned with respect to the point between tail and hat.

 

VISU_GL_ARROW_BOTTOM_CENTERED

the arrows are positioned with respect to the bottom of the arrow ;

 

VISU_GL_ARROW_TAIL_CENTERED

the arrows are positioned with respect to the center of the tail part ;

 

VISU_GL_ARROW_CENTERED

the arrows are centered.