wire

wire — Gives methods to draw lines as OpenGl objects pairing two elements.

Synopsis

VisuPairExtension*  initPairsWire                       ();
VisuPairExtension*  wireGet_static                      ();
int                 wireSet_generalWidth                (int val);
int                 wireGet_generalWidth                ();
int                 wireSet_width                       (VisuPairData *data,
                                                         int val);
int                 wireGet_width                       (VisuPairData *data);
gboolean            wireSet_shade                       (Shade *shade);
Shade*              wireGet_shade                       ();
gboolean            wireSet_stipple                     (VisuPairData *data,
                                                         guint16 stipple);
guint16             wireGet_stipple                     (VisuPairData *data);

Description

The wire pair module is the simplest way to draw pairs between elements : using lines. The size of lines can be chosen but is limited by OpenGL implementation that usually only allow line width of 10 pixels as maximum size.

Details

initPairsWire ()

VisuPairExtension*  initPairsWire                       ();

This method is used by V_Sim on startup, don't use it on your own.

Returns :

the wire pair extension.

wireGet_static ()

VisuPairExtension*  wireGet_static                      ();

Internal function to access the VisuPairExtension wire.

Returns :

the VisuPairExtension wire.

Since 3.6


wireSet_generalWidth ()

int                 wireSet_generalWidth                (int val);

The width of line between elements can be chosen by kinds of pairs, but can use a default value for all kinds of pairs when no individual value is available. Use this method to set the default width.

val :

a positive integer.

Returns :

1 if the calling method should call the visu_pair_build() method, 0 if not.

wireGet_generalWidth ()

int                 wireGet_generalWidth                ();

Get the default width for wire pairs (see wireSet_generalWidth() to set this value).

Returns :

the default width.

wireSet_width ()

int                 wireSet_width                       (VisuPairData *data,
                                                         int val);

This method allows to change the width of line for a specific pair. When a pair is rendered via with a line, it first checks if that pairs has a specific width value set by this method. If not, it uses the default value. If the specific value is indeed changed, the pairs OpenGl list is not recreated automatically and the calling method should call the visu_pair_build() method according to the return value.

data :

a VisuPairData object ;

val :

a positive integer.

Returns :

1 if the calling method should call the visu_pair_build() method, 0 if not.

wireGet_width ()

int                 wireGet_width                       (VisuPairData *data);

Get the width of the given pair data. If the given pair has no specific width, the defaul value is returned.

data :

a VisuPairData object.

Returns :

the width of the given pair.

wireSet_shade ()

gboolean            wireSet_shade                       (Shade *shade);

If shade is not NULL, make the colour of each pair varies with its length according to shade colour scheme.

shade :

a Shade object (can be NULL).

Returns :

TRUE if shade is changed.

Since 3.6


wireGet_shade ()

Shade*              wireGet_shade                       ();

Colour of wires can depend on length, following a Shade scheme.

Returns :

the Shade scheme if used, or NULL.

Since 3.6


wireSet_stipple ()

gboolean            wireSet_stipple                     (VisuPairData *data,
                                                         guint16 stipple);

Change the line pattern of data.

data :

a VisuPairData object ;

stipple :

a pattern.

Returns :

TRUE if the value is different from previous, then call the visu_pair_build() method.

wireGet_stipple ()

guint16             wireGet_stipple                     (VisuPairData *data);

Get the line pattern of data.

data :

a VisuPairData object.

Returns :

a line pattern (default is 65535).