Top | ![]() |
![]() |
![]() |
![]() |
VisuElementRendererVisuElementRenderer — a virtual class to render VisuElement. |
This class is virtual and doesn't provide any rendering method itself. It just gathers the basics generic to all VisuElement rendering classes. It provides in addition two properties, the color and the material.
visu_element_renderer_getFromPool()
is a specific function to
associate a unique VisuElementRenderer to a given VisuElement.
VisuElement *
visu_element_renderer_getElement (VisuElementRenderer *element
);
Retrieve the VisuElement that is represented by element
. See
visu_element_renderer_getConstElement()
if the returned value
should not be modified.
Since: 3.8
const VisuElement *
visu_element_renderer_getConstElement (const VisuElementRenderer *element
);
Retrieve the VisuElement represented by element
. See
visu_element_renderer_getElement()
if the return value should be modified.
Since: 3.8
const ToolColor *
visu_element_renderer_getColor (const VisuElementRenderer *element
);
Retrieve the ToolColor used by element
to represent a VisuElement.
Since: 3.8
gboolean visu_element_renderer_setColor (VisuElementRenderer *ele
,const ToolColor *color
);
Changes the representation of ele
to use color
.
Since: 3.8
gboolean visu_element_renderer_setRGBAValue (VisuElementRenderer *ele
,gfloat value
,guint id
);
Change one of the RGBA channel of the representation of ele
.
Since: 3.8
const gfloat *
visu_element_renderer_getMaterial (const VisuElementRenderer *element
);
Retrieve the ToolMaterial used by element
to represent a VisuElement.
Since: 3.8
gboolean visu_element_renderer_setMaterial (VisuElementRenderer *ele
,gfloat material[TOOL_MATERIAL_N_VALUES]
);
Changes all the material channel of ele
.
ele |
a VisuElementRenderer object. |
|
material |
an array of float values in [0;1]. |
[type ToolMaterial] |
Since: 3.8
gboolean visu_element_renderer_setMaterialValue (VisuElementRenderer *ele
,gfloat value
,ToolMaterialIds id
);
Changes the material channel id
with value
.
Since: 3.8
void visu_element_renderer_colorize (const VisuElementRenderer *element
,VisuElementRendererEffects effect
);
Change the current OpenGL color, according to the color of
element
. An additional effect
can be added.
Since: 3.8
void visu_element_renderer_setGlView (VisuElementRenderer *element
,VisuGlView *view
);
Associates view
to element
, so any changes to the rendering
precision happening in view
can imply a rebuild of the
representation of element
.
Since: 3.8
const VisuGlView *
visu_element_renderer_getConstGlView (const VisuElementRenderer *element
);
Retrieves the VisuGlView associated to element
, see
visu_element_renderer_setGlView()
.
Since: 3.8
void visu_element_renderer_rebuild (VisuElementRenderer *element
,const VisuGlView *view
);
Rebuild the OpenGL list representing element
for view
.
Since: 3.8
void
visu_element_renderer_call (const VisuElementRenderer *element
);
A convenience function to run the call method of element
.
Since: 3.8
void visu_element_renderer_callAt (const VisuElementRenderer *element
,const VisuDataColorizer *colorizer
,const VisuData *data
,const VisuNode *node
);
A convenience function to run the callAt method of element
. This
will represent node
of data
with the given colorizer
at the
coordinates of node
.
element |
a VisuElementRenderer object. |
|
colorizer |
a VisuDataColorizer object. |
[allow-none] |
data |
a VisuData object. |
|
node |
a VisuNode belonging to |
Since: 3.8
gfloat
visu_element_renderer_getExtent (const VisuElementRenderer *element
);
Retrives the radius of a sphere containing the representation of element
.
Since: 3.8
gboolean
visu_element_renderer_featureMaterialCache
(const VisuElementRenderer *element
);
Inquires if the given element
renderer can use Gl list to store
its material representation.
Since: 3.8
VisuElementRenderer *
visu_element_renderer_getFromPool (VisuElement *element
);
Retrieve a VisuElementRenderer representing element
. This
VisuElementRenderer is unique.
Since: 3.8
void
visu_element_renderer_bindToPool (VisuElementRenderer *element
);
Bind element
to the corresponding VisuElementRenderer of the
pool. This allows to have VisuElement renderers that follow the
same color or maskable properties for instance of a given VisuElement.
Since: 3.8
void
visu_element_renderer_pool_finalize (void
);
Destroy the list of known VisuElementRenderer, see
visu_element_renderer_getFromPool()
.
[skip]
Since: 3.8
The rendering done by VisuGlExtNodes can alter the color and material of rendered nodes.
no effect (apply pristine element color and material). |
||
invert colour. |
||
highlight colour (same material). |
||
semi-transparent highlight colour with neutral material. |
||
desaturate colour. |
||
saturate colour. |
||
darken colour. |
||
lighten colour. |
||
render darker without light efect. |
||
render without light efect. |
||
render lighter without light efect. |
Since: 3.7
“cache-material”
property“cache-material” gboolean
can put material in cache.
Flags: Read
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
“size-changed”
signalvoid user_function (VisuElementRenderer *obj, gfloat size, gpointer user_data)
Emitted when the size of a element is changed.
obj |
the object emitting the signal. |
|
size |
the new size. |
|
user_data |
user data set when the signal handler was connected. |
Flags: No Recursion
Since: 3.8