Top | ![]() |
![]() |
![]() |
![]() |
VisuElementVisuElement — defines methods to create and acccess to VisuElement. |
V_Sim is used to rendered at given position several object of the same kind. The VisuElement object is used to control that kind. Typically, it corresponds to chemical element. It can represent the silicon, the iron...
VisuElement are defined by their name and have some
characteristic like their color or if they are rendered or not. The
color characteristic is defined by an RGBA array and different
value for the behavior of the light, as defined in OpenGL :
diffusivity, shiningness, emissivity, specular and ambient. These
values can be controlled with the following methods :
visu_element_setAllColorValues()
, visu_element_setAllRGBValues()
,
visu_element_setRGBValue()
, visu_element_setAllMaterialValues()
and
visu_element_setMaterialValue()
.
If the OpenGL representation of one element is not dependent
of its position, it is recommended to use the OpenGL list
associated to each VisuElement that can be accessed by a call to
visu_element_getMaterialId()
.
const GList *
visu_element_getAllElements (void
);
This method returns a list of all the registered VisuElement. The returned list is read-only.
VisuElement * visu_element_retrieveFromName (const gchar *name
,gboolean *nw
);
Try to find a VisuElement already associated to that name
or
create a new one if none has been found. If nw
is not NULL it is
set to FALSE if name
was found.
name |
a string that identify the VisuElement (in UTF8) ; |
|
nw |
a location to store a boolean. |
[out caller-allocates] |
VisuElement *
visu_element_lookup (const gchar *name
);
Lookup for element name
in the base. Do not create it if not
found. To do this, use visu_element_retrieveFromName()
.
Since: 3.6
VisuElement *
visu_element_new (const char *key
);
Allocate a new visuElement with the specified name. Remember that names must be unique since they identify the element.
gboolean
visu_element_getRendered (const VisuElement *self
);
Retrieve wether all VisuNode of self
are currently hidden or not.
Since: 3.8
gboolean visu_element_setRendered (VisuElement *self
,gboolean val
);
Changes if all VisuNode of type self
are hidden or not.
Since: 3.8
gboolean
visu_element_getMaskable (const VisuElement *self
);
Retrieve whether VisuNode of type self
can be hidden by planes or any
VisuNodeMasker object.
Since: 3.8
gboolean visu_element_setMaskable (VisuElement *self
,gboolean val
);
Changes if all VisuNode of type self
can be affected by a
VisuNodeMasker object.
Since: 3.8
gboolean
visu_element_getColorizable (const VisuElement *self
);
Retrieve whether VisuNode of type self
can be colorized by any
VisuDataColorizer object.
Since: 3.8
gboolean visu_element_setColorizable (VisuElement *self
,gboolean val
);
Changes if all VisuNode of type self
can be affected by a
VisuDataColorizer object.
Since: 3.8
const gchar *
visu_element_getName (const VisuElement *ele
);
This routines returns the name of the given ele
.
Since: 3.7
gboolean
visu_element_getPhysical (VisuElement *ele
);
This routine gets if ele
is physical or not. A not physical
element can be used for instance to represent specific points...
Since: 3.7
void
visu_element_pool_finalize (void
);
Destroy the internal list of existing VisuElement.
[skip]
Since: 3.8
“colorizable”
property“colorizable” gboolean
if element is colorizable.
Flags: Read / Write
Default value: TRUE
“maskable”
property“maskable” gboolean
if element is maskable.
Flags: Read / Write
Default value: TRUE
“rendered”
property“rendered” gboolean
if element is rendered.
Flags: Read / Write
Default value: TRUE
“ElementNew”
signalvoid user_function (VisuElement *element, gpointer user_data)
A new element is available.
element |
the object emitting the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: No Recursion
Since: 3.6