VisuElement

VisuElement — defines methods to create and acccess to VisuElement.

Functions

Properties

gboolean colorizable Read / Write
gboolean maskable Read / Write
gboolean rendered Read / Write

Signals

Object Hierarchy

    GObject
    ╰── ToolDbgObj
        ╰── VisuElement

Description

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().

Functions

visu_element_getAllElements ()

const GList *
visu_element_getAllElements (void);

This method returns a list of all the registered VisuElement. The returned list is read-only.

Returns

the list of all known VisuElement.

[element-type VisuElement][transfer none]


visu_element_retrieveFromName ()

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.

Parameters

name

a string that identify the VisuElement (in UTF8) ;

 

nw

a location to store a boolean.

[out caller-allocates]

Returns

a VisuElement associated to this name .

[transfer none]


visu_element_lookup ()

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().

Parameters

name

a string.

 

Returns

the found VisuElement or NULL.

[transfer none]

Since: 3.6


visu_element_new ()

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.

Parameters

key

the name of the new element to create.

 

Returns

the newly created VisuElement or 0 if something goes wrong in the process (if the name already exist for example).

[transfer none]


visu_element_getRendered ()

gboolean
visu_element_getRendered (const VisuElement *self);

Retrieve wether all VisuNode of self are currently hidden or not.

Parameters

self

a VisuElement object.

 

Returns

TRUE if self is hidden or not.

Since: 3.8


visu_element_setRendered ()

gboolean
visu_element_setRendered (VisuElement *self,
                          gboolean val);

Changes if all VisuNode of type self are hidden or not.

Parameters

self

a VisuElement object.

 

val

a boolean.

 

Returns

TRUE if value is actually changed.

Since: 3.8


visu_element_getMaskable ()

gboolean
visu_element_getMaskable (const VisuElement *self);

Retrieve whether VisuNode of type self can be hidden by planes or any VisuNodeMasker object.

Parameters

self

a VisuElement object.

 

Returns

TRUE if self is maskable.

Since: 3.8


visu_element_setMaskable ()

gboolean
visu_element_setMaskable (VisuElement *self,
                          gboolean val);

Changes if all VisuNode of type self can be affected by a VisuNodeMasker object.

Parameters

self

a VisuElement object.

 

val

a boolean value.

 

Returns

TRUE if value is actually changed.

Since: 3.8


visu_element_getColorizable ()

gboolean
visu_element_getColorizable (const VisuElement *self);

Retrieve whether VisuNode of type self can be colorized by any VisuDataColorizer object.

Parameters

self

a VisuElement object.

 

Returns

TRUE if self is colorizable.

Since: 3.8


visu_element_setColorizable ()

gboolean
visu_element_setColorizable (VisuElement *self,
                             gboolean val);

Changes if all VisuNode of type self can be affected by a VisuDataColorizer object.

Parameters

self

a VisuElement object.

 

val

a boolean value.

 

Returns

TRUE if value is actually changed.

Since: 3.8


visu_element_getName ()

const gchar *
visu_element_getName (const VisuElement *ele);

This routines returns the name of the given ele .

Parameters

ele

a VisuElement object.

 

Returns

a string owned by V_Sim.

Since: 3.7


visu_element_getPhysical ()

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...

Parameters

ele

a VisuElement object.

 

Returns

TRUE if ele is indeed physical.

Since: 3.7


visu_element_pool_finalize ()

void
visu_element_pool_finalize (void);

Destroy the internal list of existing VisuElement.

[skip]

Since: 3.8

Types and Values

Property Details

The “colorizable” property

  “colorizable”              gboolean

if element is colorizable.

Flags: Read / Write

Default value: TRUE


The “maskable” property

  “maskable”                 gboolean

if element is maskable.

Flags: Read / Write

Default value: TRUE


The “rendered” property

  “rendered”                 gboolean

if element is rendered.

Flags: Read / Write

Default value: TRUE

Signal Details

The “ElementNew” signal

void
user_function (VisuElement *element,
               gpointer     user_data)

A new element is available.

Parameters

element

the object emitting the signal.

 

user_data

user data set when the signal handler was connected.

 

Flags: No Recursion

Since: 3.6