| Top |
VisuPairLinkVisuPairLink — An object to store rendering properties of a VisuPair for a given distance criterion. |
| enum | VisuPairLinkDistances |
| struct | VisuPairLink |
| struct | VisuPairLinkClass |
| struct | VisuPairLinkIter |
VisuPair describes pairs between two VisuElement. Such a pair can have several VisuPairLink, depending on a distance criterion. Each link then has several rendering parameters, such as its color, its rendering method (wire or cylinder), if it is drawn...
VisuPairLink * visu_pair_link_new (VisuElement *ele1,VisuElement *ele2,const float minMax[2]);
A link between two elements is characterized by its boundary distances.
ele1 |
a VisuElement object ; |
|
ele2 |
a VisuElement object ; |
|
minMax |
the two min and max distances. |
[array fixed-size=2] |
the VisuPairLink object associated to the given two elements and distances. If none exists it is created. The returned value should not be freed.
[transfer none]
VisuElement *
visu_pair_link_getFirstElement (VisuPairLink *data);
Retrieve one of the VisuElement data
is linking.
Since: 3.8
VisuElement *
visu_pair_link_getSecondElement (VisuPairLink *data);
Retrieve one of the VisuElement data
is linking.
Since: 3.8
gboolean visu_pair_link_setDrawn (VisuPairLink *data,gboolean drawn);
A pair can or cannot be drawn, use this method to tune it.
gboolean
visu_pair_link_getDrawn (const VisuPairLink *data);
A pair can or cannot be drawn, use this method to retrieve its state.
gboolean visu_pair_link_setColor (VisuPairLink *data,const ToolColor *destColor);
Set the color of the given pair.
ToolColor *
visu_pair_link_getColor (const VisuPairLink *data);
Look for the properties of the pair data
to find if a colour has
been defined. If none, the default colour is returned instead.
gboolean visu_pair_link_setPrintLength (VisuPairLink *data,gboolean status);
Set the attribute that controls if the length of pairs are drawn near pairs.
gboolean
visu_pair_link_getPrintLength (const VisuPairLink *data);
Get the print length parameter of a pair. This parameter is used to tell if length should be drawn near pairs of this kind.
gboolean visu_pair_link_setDistance (VisuPairLink *data,float val,VisuPairLinkDistances minOrMax);
Set the minimum or the maximum length for the given pair.
float visu_pair_link_getDistance (const VisuPairLink *data,VisuPairLinkDistances minOrMax);
A pair between ele1
and ele2
is drawn only if its length is between
a minimum and a maximum value. This method can get these values.
gboolean visu_pair_link_setUnits (VisuPairLink *data,ToolUnits units);
Define the unit used to store the distances.
Since: 3.8
ToolUnits
visu_pair_link_getUnits (const VisuPairLink *data);
Get the units of distance definition of data
.
gboolean visu_pair_link_match (const VisuPairLink *data,const float minMax[2]);
Returns if data
is a link with distance criterions defined by minMax
.
Since: 3.8
gboolean
visu_pair_link_isDrawn (const VisuPairLink *data);
A link is used or not depending on a distance criterion and a flag,
see visu_pair_link_setDrawn() and visu_pair_link_setDistance().
Since: 3.7
gboolean visu_pair_link_iter_new (VisuPairLink *link,VisuData *data,VisuPairLinkIter *iter,gboolean usePeriodicty);
Initialise a new VisuPairLinkIter structure to iterate over links
defined by link
in data
. If usePeriodicty
is TRUE, all links
between two nodes are kept if their smallest vector, using the
periodicty, is within the link
distance criterion.
link |
a VisuPairLink object. |
|
data |
a VisuData object. |
|
iter |
a pointer to a VisuPairLinkIter structure. |
[out caller-allocates] |
usePeriodicty |
a boolean. |
Since: 3.8
gboolean
visu_pair_link_iter_next (VisuPairLinkIter *iter);
Iterate to the next VisuNode - VisuNode pair.
Since: 3.8
This is useful with the visu_pair_link_getDistance() and the
visu_pair_link_setDistance() methods.
Since: 3.8
struct VisuPairLinkClass {
VisuObjectClass parent;
};
A short way to identify _VisuPairLinkClass structure.
struct VisuPairLinkIter {
VisuPairLink *parent;
VisuData *data;
VisuNodeArrayIter iter1, iter2;
float buffer;
float l2[2], l2_buffered[2];
VisuBox *box;
gboolean periodic;
float xyz1[3], xyz2[3], dxyz[3];
float d2, coeff;
};
An iterator used to generate pairs with the characteristics given
by parent
, over the node in data
.
VisuPairLink * |
the VisuPairLink this iterator is inheriting his properties. |
|
VisuData * |
the VisuData this iterator have to work on. |
|
VisuNodeArrayIter |
||
VisuNodeArrayIter |
a second VisuNodeArrayIter. |
|
the length of the buffer around links, in percents. |
||
the current link length, squared. |
||
like |
||
VisuBox * |
a given box to apply periodicity if needed. |
[allow-none] |
gboolean |
a boolean specifying if periodicity is to be taken into account when computing the vector linking two nodes. |
|
the current coordinates of the starting node in the link. |
||
the current coordinates of the ending node in the link. |
||
the current vector (within periodicity) linking node1 to node2. |
||
the length of the link, squared. |
||
|
a value used to characterised link length with respect to buffer (1. means that length is within link characteristics, while
|
Since: 3.8
“display-length” property“display-length” gboolean
link displays its length or not.
Flags: Read / Write
Default value: FALSE
“drawn” property“drawn” gboolean
link is displayed or not.
Flags: Read / Write
Default value: TRUE
“max” property“max” gfloat
maximal distance.
Flags: Read / Write
Allowed values: >= 0
Default value: 0
“min” property“min” gfloat
minimal distance.
Flags: Read / Write
Allowed values: >= 0
Default value: 0
“units” property“units” guint
Units of dimensions.
Flags: Read / Write
Allowed values: <= 3
Default value: 0