VisuElementAtomic

VisuElementAtomic — a class implementing rendering for VisuRenderingAtomic method.

Functions

Properties

gfloat elipsoid-angle-phi Read / Write
gfloat elipsoid-angle-theta Read / Write
gfloat elipsoid-ratio Read / Write
gfloat radius Read / Write
guint shape Read / Write
guint units Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── ToolDbgObj
        ╰── VisuElementRenderer
            ╰── VisuElementAtomic
                ╰── VisuElementSpin

Description

This class implements the virtual method of VisuElementRenderer class to display nodes as 0D objects at a given point. The specific shape is defined by VisuElementAtomicShapeId enumeration. The size of the 0D object is given by the "radius" property which is a length with a given "units" property.

visu_element_atomic_getFromPool() is a specific function to associate a unique VisuElementAtomic to a given VisuElement.

Functions

visu_element_atomic_new ()

VisuElementAtomic *
visu_element_atomic_new (VisuElement *element);

Creates a new VisuElementAtomic object used to render element .

Parameters

element

a VisuElement object.

 

Returns

a newly created VisuElementAtomic object.

[transfer full]

Since: 3.8


visu_element_atomic_getFromPool ()

VisuElementAtomic *
visu_element_atomic_getFromPool (VisuElement *element);

Retrieve a VisuElementAtomic representing element . This VisuElementAtomic is unique and its parent properties are bound to the unique VisuElementRenderer for element .

Parameters

element

a VisuElement object.

 

Returns

a VisuElementAtomic for element .

[transfer none]

Since: 3.8


visu_element_atomic_bindToPool ()

void
visu_element_atomic_bindToPool (VisuElementAtomic *atomic);

Bind all properties of atomic to the VisuElementAtomic object corresponding to the same VisuElement from the pool. The binding is bidirectional. This method is usefull to create a pool of objects inheriting from VisuElementAtomic.

Parameters

atomic

a VisuElementAtomic object.

 

Since: 3.8


visu_element_atomic_getRadius ()

gfloat
visu_element_atomic_getRadius (const VisuElementAtomic *self);

Retrieve the radius used to draw self . The unit of the value is given by visu_element_atomic_getUnits().

Parameters

self

a VisuElementAtomic object.

 

Returns

a radius value.

Since: 3.8


visu_element_atomic_setRadius ()

gboolean
visu_element_atomic_setRadius (VisuElementAtomic *self,
                               gfloat val);

Change the radius (or long axe) of the representation of self .

Parameters

self

a VisuElementAtomic object.

 

val

a positive float value.

 

Returns

TRUE if value is actually changed.

Since: 3.8


visu_element_atomic_getUnits ()

ToolUnits
visu_element_atomic_getUnits (const VisuElementAtomic *self);

The units in which the radius value is given.

Parameters

self

a VisuElementAtomic object.

 

Returns

a unit.

Since: 3.8


visu_element_atomic_setUnits ()

gboolean
visu_element_atomic_setUnits (VisuElementAtomic *self,
                              ToolUnits val);

Change the unit in wich the radius is given, see visu_element_atomic_setRadius().

Parameters

self

a VisuElementAtomic object.

 

val

a ToolUnits value.

 

Returns

TRUE if value is actually changed.

Since: 3.8


visu_element_atomic_getShape ()

VisuElementAtomicShapeId
visu_element_atomic_getShape (const VisuElementAtomic *self);

Retrieve the VisuElementAtomicShapeId that self is using for representation.

Parameters

self

a VisuElementAtomic object.

 

Returns

the shape used by self .

Since: 3.8


visu_element_atomic_setShape ()

gboolean
visu_element_atomic_setShape (VisuElementAtomic *self,
                              VisuElementAtomicShapeId val);

Change the representation shape of self .

Parameters

self

a VisuElementAtomic object.

 

val

a VisuElementAtomicShapeId value.

 

Returns

TRUE if value is actually changed.

Since: 3.8


visu_element_atomic_getElipsoidRatio ()

gfloat
visu_element_atomic_getElipsoidRatio (const VisuElementAtomic *self);

When self is used to draw constant elipsoid or torus, this value is used to adjust the ratio between the two angles.

Parameters

self

a VisuElementAtomic object.

 

Returns

a ratio value.

Since: 3.8


visu_element_atomic_setElipsoidRatio ()

gboolean
visu_element_atomic_setElipsoidRatio (VisuElementAtomic *self,
                                      gfloat val);

Change the ratio between the long axe and the short axe of the representation for shapes that are not isotropic.

Parameters

self

a VisuElementAtomic object.

 

val

a positive float value.

 

Returns

TRUE if value is actually changed.

Since: 3.8


visu_element_atomic_getElipsoidPhi ()

gfloat
visu_element_atomic_getElipsoidPhi (const VisuElementAtomic *self);

Retrieve the phi angle used to draw elipsoid shape with this renderer.

Parameters

self

a VisuElementAtomic object.

 

Returns

the phi angle.

Since: 3.8


visu_element_atomic_setElipsoidPhi ()

gboolean
visu_element_atomic_setElipsoidPhi (VisuElementAtomic *self,
                                    gfloat val);

Change the phi angle of the representation for shapes that are not isotropic.

Parameters

self

a VisuElementAtomic object.

 

val

a float value.

 

Returns

TRUE if value is actually changed.

Since: 3.8


visu_element_atomic_getElipsoidTheta ()

gfloat
visu_element_atomic_getElipsoidTheta (const VisuElementAtomic *self);

Retrieve the theta angle used to draw elipsoid shape with this renderer.

Parameters

self

a VisuElementAtomic object.

 

Returns

a theta value.

Since: 3.8


visu_element_atomic_setElipsoidTheta ()

gboolean
visu_element_atomic_setElipsoidTheta (VisuElementAtomic *self,
                                      gfloat val);

Change the theta angle of the representation for shapes that are not isotropic.

Parameters

self

a VisuElementAtomic object.

 

val

a float value.

 

Returns

TRUE if value is actually changed.

Since: 3.8


visu_element_atomic_getShapeNames ()

const gchar **
visu_element_atomic_getShapeNames (gboolean asLabel);

Get the string defining VisuElementAtomicShapeId. If asLabel is TRUE, then the string are translated and stored in UTF8.

Parameters

asLabel

a boolean.

 

Returns

strings representing VisuElementAtomicShapeId.

[transfer none][array zero-terminated=1]

Since: 3.8


visu_element_atomic_pool_finalize ()

void
visu_element_atomic_pool_finalize (void);

Destroy the internal list of known VisuElementAtomic objects, see visu_element_atomic_getFromPool().

[skip]

Since: 3.8

Types and Values

enum VisuElementAtomicShapeId

This enum is used as identifier for shapes managed by the attomic element method.

Members

VISU_ELEMENT_ATOMIC_SPHERE

draw sphere ;

 

VISU_ELEMENT_ATOMIC_CUBE

draw cube ;

 

VISU_ELEMENT_ATOMIC_ELLIPSOID

draw elipsoid ;

 

VISU_ELEMENT_ATOMIC_POINT

draw square dot ;

 

VISU_ELEMENT_ATOMIC_TORUS

draw torus ;

 

VISU_ELEMENT_ATOMIC_DIPOLE

   

VISU_ELEMENT_ATOMIC_QUADRIPOLE_0

   

VISU_ELEMENT_ATOMIC_QUADRIPOLE_1

   

VISU_ELEMENT_ATOMIC_QUADRIPOLE_2

   

VISU_ELEMENT_ATOMIC_N_SHAPES

number of shapes.

 

Property Details

The “elipsoid-angle-phi” property

  “elipsoid-angle-phi”       gfloat

Elipsoid angle phi.

Flags: Read / Write

Allowed values: [0,360]

Default value: 0


The “elipsoid-angle-theta” property

  “elipsoid-angle-theta”     gfloat

Elipsoid angle theta.

Flags: Read / Write

Allowed values: [0,180]

Default value: 90


The “elipsoid-ratio” property

  “elipsoid-ratio”           gfloat

Elipsoid ratio.

Flags: Read / Write

Allowed values: >= 0

Default value: 1


The “radius” property

  “radius”                   gfloat

atomic radius.

Flags: Read / Write

Allowed values: >= 0.001

Default value: 1


The “shape” property

  “shape”                    guint

atomic shape.

Flags: Read / Write

Allowed values: <= 8

Default value: 0


The “units” property

  “units”                    guint

radius units.

Flags: Read / Write

Allowed values: <= 3

Default value: 0