![]() |
![]() |
![]() |
V_Sim API - Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
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
);
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.
VisuPairExtension* initPairsWire ();
This method is used by V_Sim on startup, don't use it on your own.
Returns : |
the wire pair extension. |
VisuPairExtension* wireGet_static ();
Internal function to access the VisuPairExtension wire.
Returns : |
the VisuPairExtension wire. |
Since 3.6
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.
|
a positive integer. |
Returns : |
1 if the calling method should call the visu_pair_build() method, 0 if not.
|
int wireGet_generalWidth ();
Get the default width for wire pairs (see wireSet_generalWidth()
to set this value).
Returns : |
the default 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.
|
a VisuPairData object ; |
|
a positive integer. |
Returns : |
1 if the calling method should call the visu_pair_build() method, 0 if not.
|
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.
|
a VisuPairData object. |
Returns : |
the width of the given pair. |
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.
|
a Shade object (can be NULL). |
Returns : |
TRUE if shade is changed. |
Since 3.6
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
gboolean wireSet_stipple (VisuPairData *data
,guint16 stipple
);
Change the line pattern of data
.
|
a VisuPairData object ; |
|
a pattern. |
Returns : |
TRUE if the value is different from previous, then call
the visu_pair_build() method.
|
guint16 wireGet_stipple (VisuPairData *data
);
Get the line pattern of data
.
|
a VisuPairData object. |
Returns : |
a line pattern (default is 65535). |