![]() |
![]() |
![]() |
V_Sim API - Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Signals |
VisuNodeArrayVisuNodeArray — Defines the elementary structure to store informations about an element in a box. |
struct VisuNode; struct VisuNodeArray; struct VisuNodeArrayClass; void (*VisuNodeArrayElementPropertyInit) (VisuElement *element
,GValue *value
); struct VisuNodeArrayIter; enum VisuNodeArrayIterType; typedef VisuNodeInfo; VisuNodeProperty; void visu_node_array_allocate (VisuNodeArray *array
,GArray *elements
,GArray *nNodes
); void visu_node_array_allocateByNames (VisuNodeArray *array
,GArray *nNodesPerElement
,GArray *elementNames
); void visu_node_array_allocateNodesForElement (VisuNodeArray *array
,guint eleId
,guint nNodes
); gboolean visu_node_array_askForShowHide (VisuNodeArray *array
); gboolean visu_node_array_compareElements (VisuNodeArray *data1
,VisuNodeArray *data2
); void visu_node_array_freeNodes (VisuNodeArray *nodeArray
); void visu_node_array_freeProperty (VisuNodeArray *nodeArray
,const char *key
); VisuNode * visu_node_array_getCopyNode (VisuNodeArray *nodeArray
,VisuNode *node
); VisuElement * visu_node_array_getElement (VisuNodeArray *data
,VisuNode *node
); gint visu_node_array_getElementId (VisuNodeArray *array
,VisuElement *element
); GValueArray * visu_node_array_getElementProperty (VisuNodeArray *data
,const gchar *name
); VisuNode * visu_node_array_getFromId (VisuNodeArray *array
,guint number
); float visu_node_array_getMaxElementSize (VisuNodeArray *nodes
); guint visu_node_array_getNElements (VisuNodeArray *array
,gboolean physical
); guint visu_node_array_getNNodes (VisuNodeArray *array
); VisuNode * visu_node_array_getNewNode (VisuNodeArray *nodeArray
,guint iEle
); gint visu_node_array_getOriginal (VisuNodeArray *nodeArray
,guint nodeId
); VisuNodeProperty * visu_node_array_getProperty (VisuNodeArray *nodeArray
,const char *key
); #define visu_node_array_getPropertyValue (nodeArray, node, key, value) void visu_node_array_iterNew (VisuNodeArray *array
,VisuNodeArrayIter *iter
); void visu_node_array_iterNext (VisuNodeArray *array
,VisuNodeArrayIter *iter
); void visu_node_array_iterNextElement (VisuNodeArray *array
,VisuNodeArrayIter *iter
); void visu_node_array_iterNextList (VisuNodeArray *array
,VisuNodeArrayIter *iter
); void visu_node_array_iterNextNode (VisuNodeArray *array
,VisuNodeArrayIter *iter
); void visu_node_array_iterNextNodeNumber (VisuNodeArray *array
,VisuNodeArrayIter *iter
); void visu_node_array_iterNextNodeOriginal (VisuNodeArray *array
,VisuNodeArrayIter *iter
); void visu_node_array_iterNextVisible (VisuNodeArray *array
,VisuNodeArrayIter *iter
); void visu_node_array_iterRestartNode (VisuNodeArray *array
,VisuNodeArrayIter *iter
); void visu_node_array_iterStart (VisuNodeArray *array
,VisuNodeArrayIter *iter
); void visu_node_array_iterStartList (VisuNodeArray *array
,VisuNodeArrayIter *iter
,GList *lst
); void visu_node_array_iterStartNumber (VisuNodeArray *array
,VisuNodeArrayIter *iter
); void visu_node_array_iterStartVisible (VisuNodeArray *array
,VisuNodeArrayIter *iter
); gboolean visu_node_array_iter_next (VisuNodeArrayIter *iter
); gboolean visu_node_array_iter_next2 (VisuNodeArrayIter *iter1
,VisuNodeArrayIter *iter2
); VisuNodeProperty * visu_node_array_property_newInteger (VisuNodeArray *nodeArray
,const char *key
); VisuNodeProperty * visu_node_array_property_newPointer (VisuNodeArray *nodeArray
,const char *key
,GFunc freeFunc
,GCopyFunc newAndCopyFunc
,gpointer user_data
); gboolean visu_node_array_removeAllDuplicateNodes (VisuNodeArray *nodeArray
); void visu_node_array_removeNodes (VisuNodeArray *nodeArray
,int *nodeNumbers
); void visu_node_array_removeNodesOfElement (VisuNodeArray *nodeArray
,VisuElement *element
); GValueArray * visu_node_array_setElementProperty (VisuNodeArray *data
,const gchar *name
,VisuNodeArrayElementPropertyInit init
); gboolean visu_node_array_setOriginal (VisuNodeArray *nodeArray
,guint nodeId
); gboolean visu_node_array_switchNumber (VisuNodeArray *nodeArray
,guint from
,guint to
); void visu_node_array_traceProperty (VisuNodeArray *array
,const gchar *id
); void visu_node_copy (VisuNode *nodeTo
,VisuNode *nodeFrom
); gboolean visu_node_getVisibility (VisuNode *node
); void visu_node_newValues (VisuNode *node
,float xyz[3]
); GValue * visu_node_property_getValue (VisuNodeProperty *nodeProp
,VisuNode *node
,GValue *value
); void visu_node_property_setValue (VisuNodeProperty *nodeProp
,VisuNode *node
,GValue *value
); gboolean visu_node_setCoordinates (VisuNode *node
,float xyz[3]
); gboolean visu_node_setVisibility (VisuNode *node
,gboolean visibility
); #define visu_node_setpropertyValue (nodeArray, node, key, value)
"AskForShowHide" :No Hooks
"ElementRenderingChanged" :No Hooks
"MaterialChanged" :No Hooks
"PopulationDecrease" :No Hooks
"PopulationDefined" :No Hooks
"PopulationIncrease" :No Hooks
"PositionChanged" :No Hooks
"RenderingChanged" :No Hooks
"VisibilityChanged" :No Hooks
In V_Sim, elements are drawn in a box. The VisuNode structure is used to represent an instance of an element position somewhere in the box. This element can have several characteristics such as its translation or its visibility.
All nodes are stored in a VisuData object in a two dimensional array. The first dimension is indexed by the VisuElement of the node and the second corresponds to the number of this node for this element. When a node is own by a VisuData, the two integers, that control the indexes in this array, are not negative. See the VisuNode structure for further explanations.
The only basic informations own by the VisuNode structure is
basicaly its position. To add further informations (such as
orientation for the spin), define a node property using
visu_node_array_property_newPointer()
.
struct VisuNode { /* coordinates of the node in cartesian coordinates. */ float xyz[3]; /* translation */ float translation[3]; /* Number of this element in the input file. */ guint number; /* Position in the #VisuData structure. */ guint posElement, posNode; /* A boolean to specify if this node is rendered or not. */ gboolean rendered; };
Structure to store primary data of a node.
an array of three floating point values that positions the node in (x, y, z) ;. [in][array fixed-size=3] | |
an array of three floating point values that translates the node to its drawn position from (x, y, z) ;. [in][array fixed-size=3] | |
guint |
an integer that corresponds to its position in the entry file, it references also the node itself in the array 'fromNumberToVisuNode' of the VisuData that contains the node ; |
guint |
an integer that is the position of the VisuElement of the node in the array 'fromIntToVisuElement' of the VisuData object that contains the node ; |
guint |
an integer that is the position of the node itself in the array 'nodes' of the VisuData object that contains the node ; |
gboolean |
a boolean to store if the node is drwn or not. |
struct VisuNodeArrayClass { GObjectClass parent; };
Class structure of VisuNodeArray objects.
GObjectClass |
private. |
void (*VisuNodeArrayElementPropertyInit) (VisuElement *element
,GValue *value
);
Prototype of routine used to initialise an element property.
|
a VisuElement object ; |
|
a GValue. |
Since 3.7
struct VisuNodeArrayIter { VisuNodeArray *array; guint idMax; guint nAllStoredNodes; guint nElements; guint iElement; guint nStoredNodes; VisuNode *node; VisuElement *element; VisuNodeArrayIterType type; gboolean init; GList *lst, *itLst; };
This structure is an iterator over the nodes of a VisuData object.
Create it with visu_node_array_iterNew()
. Then the numbers are allocated and
correspond to the value of the VisuData object. Use visu_node_array_iterStart()
to initialise the iterator for a run over the nodes, visu_node_array_iterNext()
to associate node
and element
to the next node, or NULL if there is no
more node to run over.
VisuNodeArray * |
a pointer the iterator is associated to ; |
guint |
current higher id used to identified nodes. |
guint |
the total number of stored nodes for the associated VisuData ; |
guint |
the number of VisuElement for the associated VisuData ; |
guint |
the index corresponding to element (or -1 if no set); |
guint |
the number of stored nodes for the current element ; |
VisuNode * |
a pointer on a current node ; |
VisuElement * |
a pointer on a current element. |
VisuNodeArrayIterType |
the kind of iterator, see VisuNodeArrayIterType. |
gboolean |
an internal flag. |
GList * |
an internal list. |
GList * |
an internal list iterator. |
typedef enum { ITER_NODES_BY_TYPE, ITER_NODES_BY_NUMBER, ITER_NODES_VISIBLE, ITER_NODES_ORIGINAL, ITER_ELEMENTS } VisuNodeArrayIterType;
The kind of iterator to be used on VisuData objects.
run on nodes, as V_Sim internal storage, fastest. | |
run on nodes as entered in the input file. | |
run on visible nodes only (internal sort). | |
run on original nodes only (internal sort). | |
run on elements only. |
Since 3.6
typedef struct _VisuNodeProperty VisuNodeProperty;
This structure defines a storage for one property for each node of a given
VisuNodeArray. Use visu_node_array_property_newPointer()
or
visu_node_array_property_newInteger()
to create one property.
void visu_node_array_allocate (VisuNodeArray *array
,GArray *elements
,GArray *nNodes
);
Reallocate the internal arrays to match elements
and nNodes
.
|
a VisuNodeArray object. |
|
the size of nNodes. [in][element-type VisuElement*] |
|
an array giving the number of nodes per element. [in][element-type guint] |
void visu_node_array_allocateByNames (VisuNodeArray *array
,GArray *nNodesPerElement
,GArray *elementNames
);
This method allocates the storing part of the given VisuNodeArray structure and store all the VisuNodes.
|
a VisuNodeArray object; |
|
number of VisuNode per VisuElement;. [in][element-type guint] |
|
names of elements;. [in][element-type utf8] |
void visu_node_array_allocateNodesForElement (VisuNodeArray *array
,guint eleId
,guint nNodes
);
This routine is used to allocate space for nNodes
of a
VisuElement. This VisuElement is identified by its internal id,
see visu_node_array_getElementId()
. If this VisuElement has
already enough space in this array
, nothing is done, otherwise
space is reallocated.
|
a VisuNodeArray object ; |
|
an internal VisuElement id ; |
|
a positive number of nodes. |
Since 3.7
gboolean visu_node_array_askForShowHide (VisuNodeArray *array
);
This function emits the "AskForShowHide" signal of array
. This
signal will make all the nodes visible and each hiding objects will
have to switch off nodes.
|
a VisuNodeArray object. |
Returns : |
TRUE if "VisibilityChanged" signal should be emitted. |
Since 3.7
gboolean visu_node_array_compareElements (VisuNodeArray *data1
,VisuNodeArray *data2
);
This method is used to compare the composition of the given two VisuData objects. The test is only done on VisuElement lists.
|
a VisuData object ; |
|
an other VisuData object. |
Returns : |
TRUE if the two objects contains exactly the same VisuElement objects (not one more or one less or one different), FALSE otherwise. |
void visu_node_array_freeNodes (VisuNodeArray *nodeArray
);
Deallocate all nodes of the object and related properties but keep the object alive.
|
a VisuNodeArray object. |
void visu_node_array_freeProperty (VisuNodeArray *nodeArray
,const char *key
);
This method free the given property and all associated data.
|
a VisuNodeArray object. |
|
the name of the property to be removed. |
VisuNode * visu_node_array_getCopyNode (VisuNodeArray *nodeArray
,VisuNode *node
);
Return the location of an unstored node that is the deep copy of the given node. The returned node is then added in the list of used nodes.
|
a VisuNodeArray object ; |
|
a node of the given VisuNodeArray. |
Returns : |
the location of a newly used node. [transfer none] |
VisuElement * visu_node_array_getElement (VisuNodeArray *data
,VisuNode *node
);
This routine gets the VisuElement the node
belongs to.
|
a VisuNodeArray object ; |
|
a VisuNode of this array. |
Returns : |
a VisuElement, owned by V_Sim. [transfer none] |
Since 3.7
gint visu_node_array_getElementId (VisuNodeArray *array
,VisuElement *element
);
This routines returns the internal id used to represent element
,
or -1 if not found.
|
a VisuNodeArray object ; |
|
a VisuElement object. |
Returns : |
a positive number or -1 if not found. |
Since 3.7
GValueArray * visu_node_array_getElementProperty (VisuNodeArray *data
,const gchar *name
);
This routine is used to retrieve an array of GValue for each
element of the data
array.
|
a VisuNodeArray object ; |
|
an identifier string. |
Returns : |
an array of GValue, indexed by the id of
each VisuElement of data . [transfer none]
|
Since 3.7
VisuNode * visu_node_array_getFromId (VisuNodeArray *array
,guint number
);
This methods retrieves the VisuNode identified by the integer number
.
The number must be strictly positive. No error is raised if no node corresponds
to the given number.
|
a VisuNodeArray structure which stores the nodes. |
|
an integer. |
Returns : |
the found VisuNode or NULL if none corresponds to number. [transfer none] |
float visu_node_array_getMaxElementSize (VisuNodeArray *nodes
);
Calculate the maximum size of all VisuElement used in these
nodes
.
|
a VisuNodeArray object. |
Returns : |
a positive size. |
guint visu_node_array_getNElements (VisuNodeArray *array
,gboolean physical
);
The parameter array
stores several VisuNode of VisuElement. This
routine is used to get the number of VisuElement that are used by
this array
. Depending on physical
value, the number of
VisuElement representing physical element or not is retrieved. The
actual returned number of VisuElement take into account only
elements with a positive number of nodes.
|
a VisuNodeArray object ; |
|
a boolean. |
Returns : |
a positive number. |
Since 3.7
guint visu_node_array_getNNodes (VisuNodeArray *array
);
This routines returns the number of VisuNode stored in array
.
|
a VisuNodeArray object. |
Returns : |
a positive number. |
Since 3.7
VisuNode * visu_node_array_getNewNode (VisuNodeArray *nodeArray
,guint iEle
);
Return the location of an unstored node for the given VisuElement. The returned node is then added in the list of used nodes.
|
a VisuNodeArray object ; |
|
an integer between 0 and nodeArray->priv->elements->lens - 1. |
Returns : |
the location of a newly used node. [transfer none] |
gint visu_node_array_getOriginal (VisuNodeArray *nodeArray
,guint nodeId
);
Test if the given nodeId
is an original or a replica for the
periodisation.
|
a VisuNodeArray object. |
|
a node id. |
Returns : |
TRUE for an original node. |
VisuNodeProperty * visu_node_array_getProperty (VisuNodeArray *nodeArray
,const char *key
);
This method is used to retrieve the node property associated to the given key
.
|
a VisuNodeArray object ; |
|
a string. |
Returns : |
a VisuNodeProperty. [transfer none] |
#define visu_node_array_getPropertyValue(nodeArray, node, key, value)
This method is used to retrieve some data associated to
the specified node
, stored in the given data
. These return data
should not be freed after used. The read value is stored in the given
GValue pointer. This GValue must be of the right type, depending on the
creation of the VisuNodeProperty.
|
a VisuNodeArray object ; |
|
a VisuNode object ; |
|
a string ; |
|
an initialise GValue location. |
Returns : |
some data associated to the key, stored the given GValue location. |
void visu_node_array_iterNew (VisuNodeArray *array
,VisuNodeArrayIter *iter
);
Set values to a VisuNodeArrayIter object to iterate over nodes. Its contain is initialised with the array size (number of elements, number of nodes per element...).
|
a VisuNodeArray object ; |
|
an alocated iterator. [out caller-allocates][transfer full] |
void visu_node_array_iterNext (VisuNodeArray *array
,VisuNodeArrayIter *iter
);
Modify node and element internal pointers to the next node, or NULL if none remains.
|
a VisuNodeArray object ; |
|
a VisuNodeArrayIter object. |
void visu_node_array_iterNextElement (VisuNodeArray *array
,VisuNodeArrayIter *iter
);
Modify element internal pointer to the next element and set node to the first one, or NULL if none remains.
|
a VisuNodeArray object ; |
|
a VisuNodeArrayIter object. |
void visu_node_array_iterNextList (VisuNodeArray *array
,VisuNodeArrayIter *iter
);
Modify node and element internal pointers to the next node from the starting list, or NULL if none remains.
|
a VisuNodeArray object ; |
|
a VisuNodeArrayIter object. |
Since 3.7
void visu_node_array_iterNextNode (VisuNodeArray *array
,VisuNodeArrayIter *iter
);
Modify node internal pointer to the next node, or NULL if
none remains. Contrary to visu_node_array_iterNext()
it does not go to the
next element if one exists.
|
a VisuNodeArray object ; |
|
a VisuNodeArrayIter object. |
void visu_node_array_iterNextNodeNumber (VisuNodeArray *array
,VisuNodeArrayIter *iter
);
Modify node internal pointer to the next node, increasing the id of the current node. The element internal pointer is also updated accordingly. If no more nodes exist after the given one, node and element internal pointers are set to NULL.
|
a VisuNodeArray object ; |
|
a VisuNodeArrayIter object. |
void visu_node_array_iterNextNodeOriginal (VisuNodeArray *array
,VisuNodeArrayIter *iter
);
Modify node internal pointer to the next original node, or NULL if
none remains. Contrary to visu_node_array_iterNext()
it does not go to the
next element if one exists.
|
a VisuNodeArray object ; |
|
a VisuNodeArrayIter object. |
Since 3.6
void visu_node_array_iterNextVisible (VisuNodeArray *array
,VisuNodeArrayIter *iter
);
Go to the next rendered node (changing element if required).
|
a VisuNodeArray object ; |
|
a VisuNodeArrayIter object. |
void visu_node_array_iterRestartNode (VisuNodeArray *array
,VisuNodeArrayIter *iter
);
The element internal pointer must be associated. Then, it returns the node pointer to the first node for this element.
|
a VisuNodeArray object ; |
|
a VisuNodeArrayIter object. |
void visu_node_array_iterStart (VisuNodeArray *array
,VisuNodeArrayIter *iter
);
Initialise the node and element internal pointers for a run over the nodes.
|
a VisuNodeArray object ; |
|
a VisuNodeArrayIter object. |
void visu_node_array_iterStartList (VisuNodeArray *array
,VisuNodeArrayIter *iter
,GList *lst
);
Set values to a VisuNodeArrayIter object to iterate over nodes of the given list.
|
a VisuNodeArray object ; |
|
an alocated iterator. [out caller-allocates][transfer full] |
|
a list of node ids to iterate on. [element-type guint][transfer full] |
Since 3.7
void visu_node_array_iterStartNumber (VisuNodeArray *array
,VisuNodeArrayIter *iter
);
Initialise the node and element internal pointers for a run following the node oder.
|
a VisuNodeArray object ; |
|
a VisuNodeArrayIter object. |
void visu_node_array_iterStartVisible (VisuNodeArray *array
,VisuNodeArrayIter *iter
);
Initialise the node and element internal pointers for a run over the visible nodes (see visu_node_array_iterNextVisible).
|
a VisuNodeArray object ; |
|
a VisuNodeArrayIter object. |
gboolean visu_node_array_iter_next (VisuNodeArrayIter *iter
);
Run the iterator to go to next item.
|
a VisuNodeArrayIter object. |
Returns : |
TRUE if any item is found, FALSE otherwise. |
Since 3.6
gboolean visu_node_array_iter_next2 (VisuNodeArrayIter *iter1
,VisuNodeArrayIter *iter2
);
Iterator to run on a pair of different nodes.
|
a VisuNodeArrayIter object. |
|
a VisuNodeArrayIter object. |
Returns : |
TRUE if any item is found, FALSE otherwise. |
Since 3.6
VisuNodeProperty * visu_node_array_property_newInteger (VisuNodeArray *nodeArray
,const char *key
);
This method creates and allocates a new area to store nodes associated integer
values. This is the same than visu_node_array_property_newPointer()
but for static
integers instead of pointers as data.
|
a VisuNodeArray object ; |
|
a string. |
Returns : |
the newly created VisuNodeProperty object. [transfer none] |
VisuNodeProperty * visu_node_array_property_newPointer (VisuNodeArray *nodeArray
,const char *key
,GFunc freeFunc
,GCopyFunc newAndCopyFunc
,gpointer user_data
);
This method creates and allocates a new area to store nodes associated data that
can be retrieve with the key
. These data are pointers on allocated memory
locations. When the property is removed with the visu_node_freePropertry (or the
associated VisuNodeArray is free) the area is free and freeFunc
is called for
each token (or g_free()
if freeFunc
is NULL).
The method newAndCopyFunc
is used when the number of nodes is increased,
if the const gpointer of the GCopyFunc is not NULL, then we require a copy,
if it is NULL, then the routine must create a new token with
default values.
If the property already exists, it is returned.
|
a VisuNodeArray object ; |
|
a string ; |
|
a method to free each token (can be NULL). [allow-none][scope call] |
|
a method to create or copy each token. [scope call] |
|
a user defined pointer that will be given to the free and copy routine. [closure] |
Returns : |
the newly created VisuNodeProperty object or the existing one. [transfer none] |
gboolean visu_node_array_removeAllDuplicateNodes
(VisuNodeArray *nodeArray
);
Remove all nodes that are not original in the box.
|
a VisuNodeArray object. |
Returns : |
TRUE if some nodes have been removed. |
void visu_node_array_removeNodes (VisuNodeArray *nodeArray
,int *nodeNumbers
);
Remove the given VisuNode from the nodeArray
. The properties
are also updated.
|
a VisuNodeArray object. |
|
an array of integers (negative terminated). [in][array] |
void visu_node_array_removeNodesOfElement (VisuNodeArray *nodeArray
,VisuElement *element
);
Remove all the VisuNode from the element element
. The properties
are also updated.
|
a VisuNodeArray object. |
|
a VisuElement object. |
Since 3.7
GValueArray * visu_node_array_setElementProperty (VisuNodeArray *data
,const gchar *name
,VisuNodeArrayElementPropertyInit init
);
Create a new array to stores properties related to elements. If the
property name
already exists the previous one is destroyed. The
init
routine is called for each VisuElement of the data
.
|
a VisuNodeArray object. |
|
a string to identify the property. |
|
an init routine. [scope call] |
Returns : |
a newly allocated array. [transfer none] |
Since 3.7
gboolean visu_node_array_setOriginal (VisuNodeArray *nodeArray
,guint nodeId
);
Test if the given nodeId
is an original or a replica for the
periodisation.
|
a VisuNodeArray object. |
|
a node id. |
Returns : |
TRUE for an original node. |
gboolean visu_node_array_switchNumber (VisuNodeArray *nodeArray
,guint from
,guint to
);
Two nodes of nodeArray
switches their number.
|
a VisuNodeArray object. |
|
a node id. |
|
another node id. |
Returns : |
TRUE if number is switched. |
Since 3.6
void visu_node_array_traceProperty (VisuNodeArray *array
,const gchar *id
);
This is a debug method. It outputs on stderr the values for all
nodes of the property id
.
|
a VisuNodeArray object ; |
|
a property name. |
void visu_node_copy (VisuNode *nodeTo
,VisuNode *nodeFrom
);
Copy all attributes of the object nodeFrom
to nodeTo
.
gboolean visu_node_getVisibility (VisuNode *node
);
This method is used get the status of the drawing state of a node.
|
a VisuNode object. |
Returns : |
true if the node is rendered, false otherwise. |
void visu_node_newValues (VisuNode *node
,float xyz[3]
);
Set the coordinates and set all other values to default.
|
an allocated VisuNode object ; |
|
the coordinates to set. [in][array fixed-size=3] |
GValue * visu_node_property_getValue (VisuNodeProperty *nodeProp
,VisuNode *node
,GValue *value
);
This method is used to retrieve some data associated to
the specified node
, stored in the given data
. These return data
should not be freed after used. The read value is stored in the given
GValue pointer. This GValue must be of the right type, depending on the
creation of the VisuNodeProperty.
|
a VisuNodeArray object ; |
|
a VisuNode object ; |
|
an initialise GValue location. |
Returns : |
some data associated to the key, stored the given GValue location. |
void visu_node_property_setValue (VisuNodeProperty *nodeProp
,VisuNode *node
,GValue *value
);
This method is used to store some values associated with
the given node
of the given nodeArray
. These values can be pointers to
anything allocated (will be free automatically when the property is deleted) or
they can be static values. This depends on the construction of the node property.
These values can be retrieved with the visu_node_property_getValue()
method.
See visu_node_array_getProperty()
to get a property by its name.
|
a VisuNodeProperty object ; |
|
a VisuNode object ; |
|
A GValue pointer this the value to be stored. |
gboolean visu_node_setCoordinates (VisuNode *node
,float xyz[3]
);
This method is used to change coordinates of node
.
|
a VisuNode object ; |
|
new cartesian coordinates. [array fixed-size=3] |
Returns : |
TRUE if the calling method should emit "PositionChanged" signal. |
Since 3.7
gboolean visu_node_setVisibility (VisuNode *node
,gboolean visibility
);
This method is used to turn on or off the drawing of the specified node.
|
a VisuNode object ; |
|
a boolean. |
Returns : |
true if the calling method should emit the VisuNodeArray::VisibilityChanged signal. |
#define visu_node_setpropertyValue(nodeArray, node, key, value)
This method is used to store some values associated with
the given node
of the given nodeArray
. These values can be pointers to
anything allocated (will be free automatically when the property is deleted) or
they can be static values. This depends on the construction of the node property.
These values are described by the key
, and can be retrieved with the
visu_node_array_getPropertyValue()
method.
See visu_node_property_setValue()
to directly set a value associated to a node.
|
a VisuNodeArray object ; |
|
a VisuNode object ; |
|
a string ; |
|
A GValue pointer this the value to be stored. |
"AskForShowHide"
signalvoid user_function (VisuNodeArray *nodes,
gpointer redraw,
gpointer user_data) : No Hooks
Gets emitted when external modules should recompute their masking
effect on nodes. Location pointed by redraw
must be set to TRUE
if the visibility of at least one node is changed.
|
the object which received the signal ; |
|
a location on a boolean. [out caller-allocates][type gboolean] |
|
user data set when the signal handler was connected. |
Since 3.2
"ElementRenderingChanged"
signalvoid user_function (VisuNodeArray *nodes,
GObject *ele,
gpointer user_data) : No Hooks
Gets emitted when the rendering characteristic of elements are changed, like their shape or specific colour.
|
the object which received the signal ; |
|
the VisuElement nodes have changed or NULL for all elements. [allow-none] |
|
user data set when the signal handler was connected. |
Since 3.7
"MaterialChanged"
signalvoid user_function (VisuNodeArray *nodes,
gpointer user_data) : No Hooks
Gets emitted when one or more nodes have changed of color or material.
|
the object which received the signal ; |
|
user data set when the signal handler was connected. |
Since 3.6
"PopulationDecrease"
signalvoid user_function (VisuNodeArray *nodes,
gpointer ids,
gpointer user_data) : No Hooks
Gets emitted when the number of nodes has changed,
decreasing. ids
contains all removed ids and is -1 terminated.
When emitted, nodes have already been removed, so no external
routines should keep pointers on these nodes.
|
the object which received the signal ; |
|
an array of VisuNode ids. [element-type gint][array] |
|
user data set when the signal handler was connected. |
Since 3.4
"PopulationDefined"
signalvoid user_function (VisuNodeArray *nodes,
guint nEle,
gpointer user_data) : No Hooks
Gets emitted when the population of nodes is created or destroyed. It is possible then to associate new VisuNodeProperty for instance.
|
the object which received the signal ; |
|
the actual allocated number of VisuElement of nodes . |
|
user data set when the signal handler was connected. |
Since 3.5
"PopulationIncrease"
signalvoid user_function (VisuNodeArray *nodes,
gpointer ids,
gpointer user_data) : No Hooks
Gets emitted when the number of nodes has changed,
increasing. ids
contains all new ids and is -1 terminated.
|
the object which received the signal ; |
|
an array of VisuNode ids. [element-type gint][array] |
|
user data set when the signal handler was connected. |
Since 3.4
"PositionChanged"
signalvoid user_function (VisuNodeArray *nodes,
GObject *ele,
gpointer user_data) : No Hooks
Gets emitted when one or more nodes have moved, because of translations or because the user has moved them manually.
|
the object which received the signal ; |
|
the VisuElement nodes have moved or NULL for all elements. [allow-none] |
|
user data set when the signal handler was connected. |
Since 3.2
"RenderingChanged"
signalvoid user_function (VisuNodeArray *nodes,
GObject *ele,
gpointer user_data) : No Hooks
Gets emitted when the rendering characteristic of nodes are changed, like their shape or specific colour. For a signal on generic colours (like the inherited element colour), listen to VisuNodeArray::MaterialChanged signal instead.
|
the object which received the signal ; |
|
the VisuElement nodes have changed or NULL for all elements. [allow-none] |
|
user data set when the signal handler was connected. |
Since 3.7
"VisibilityChanged"
signalvoid user_function (VisuNodeArray *nodes,
gpointer user_data) : No Hooks
Gets emitted when one or more nodes have changed of visibility. Some may have appeared, some may have disappeared.
|
the object which received the signal ; |
|
user data set when the signal handler was connected. |
Since 3.2