v_sim.ElementRenderer¶
- Subclasses:
Methods¶
- Inherited:
- Structs:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
Properties¶
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
r/w/co |
number of vertice buffers. |
||
r |
can put material in cache. |
||
r/w |
element color |
||
r/w/co |
element |
||
r/w |
if element is maskable |
||
r/w |
element material |
||
r/w |
if element is rendered |
Signals¶
- Inherited:
Name |
Short Description |
|---|---|
Emitted when the size of a element is changed. |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
|---|---|---|---|
parent |
r |
Class Details¶
- class v_sim.ElementRenderer(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Structure used to define
v_sim.ElementRendererobjects.New in version 3.8.
- bindToPool()¶
Bind self to the corresponding
v_sim.ElementRendererof the pool. This allows to havev_sim.Elementrenderers that follow the same color or maskable properties for instance of a givenv_sim.Element.New in version 3.8.
- copyMaterial()¶
- Returns:
a location to store the material values.
- Return type:
material:
float
Copy the #ToolMaterial used by self to represent a
v_sim.Element.New in version 3.9.
- featureMaterialCache()¶
-
Inquires if the given self renderer can use Gl list to store its material representation.
New in version 3.8.
- getColor()¶
- Returns:
a
v_sim.ColororNone.- Return type:
v_sim.ColororNone
Retrieve the
v_sim.Colorused by self to represent av_sim.Element.New in version 3.8.
- getColorization(effect)¶
- Parameters:
effect (
v_sim.ElementRendererEffects) – av_sim.ElementRendererEffectsvalue.- Returns:
- rgba:
storage for a color.
- material:
storage for material data.
- Return type:
Compute the self color. An additional effect can be added.
New in version 3.9.
- getConstElement()¶
- Returns:
a const
v_sim.Element.- Return type:
Retrieve the
v_sim.Elementrepresented by self. Seev_sim.ElementRenderer.getElement() if the return value should be modified.New in version 3.8.
- getElement()¶
- Returns:
the
v_sim.Elementrepresented by self.- Return type:
Retrieve the
v_sim.Elementthat is represented by self. Seev_sim.ElementRenderer.getConstElement() if the returned value should not be modified.New in version 3.8.
- getExtent()¶
- Returns:
a positive float value.
- Return type:
Retrives the radius of a sphere containing the representation of self.
New in version 3.8.
- getGlView()¶
- Returns:
a const
v_sim.GlViewobject.- Return type:
Retrieves the
v_sim.GlViewassociated to self, seev_sim.ElementRenderer.setGlView().New in version 3.8.
- getMaterial()¶
-
Retrieve the #ToolMaterial used by self to represent a
v_sim.Element.New in version 3.8.
- getVerticeBufferDim()¶
- Returns:
the number of vertice buffers.
- Return type:
Retrieve the number of vertice buffers used by this renderer to display a node.
New in version 3.9.
- getVerticeLayout(id)¶
- Parameters:
id (
int) – a buffer id.- Returns:
- packing:
a location to store the packing.
- primitive:
a location to store the drawing primitive.
- Return type:
(packing:
v_sim.GlExtPackingModels, primitive:v_sim.GlExtPrimitives)
Retrieve data layout and the drawing primitive used by the vertice buffer id.
New in version 3.9.
- setColor(color)¶
- Parameters:
color (
v_sim.Color) – av_sim.Colorobject.- Returns:
Trueif value is actually changed.- Return type:
Changes the representation of self to use color.
New in version 3.8.
- setGlView(view)¶
- Parameters:
view (
v_sim.GlView) – av_sim.GlViewobject.
Associates view to self, so any changes to the rendering precision happening in view can imply a rebuild of the representation of self.
New in version 3.8.
- setMaterialValue(value, id)¶
- Parameters:
value (
float) – a float in [0;1].id (
v_sim.MaterialIds) – av_sim.MaterialIdsvalue.
- Returns:
Trueif value is actually changed.- Return type:
Changes the material channel id with value.
New in version 3.8.
- setRGBAValue(value, id)¶
- Parameters:
- Returns:
Trueif value is actually changed.- Return type:
Change one of the RGBA channel of the representation of self.
New in version 3.8.
- useDefaultColor()¶
-
Use the default colour associated to this element.
New in version 3.9.
- do_getExtent() virtual¶
- Returns:
a positive float value.
- Return type:
Retrives the radius of a sphere containing the representation of element.
New in version 3.8.
- do_getLayout(id, packing, primitive) virtual¶
- Parameters:
id (
int) –packing (
v_sim.GlExtPackingModels) –primitive (
v_sim.GlExtPrimitives) –
Signal Details¶
- v_sim.ElementRenderer.signals.size_changed(element_renderer, size)¶
- Signal Name:
size-changed- Flags:
- Parameters:
element_renderer (
v_sim.ElementRenderer) – The object which received the signalsize (
float) – the new size.
Emitted when the size of a element is changed.
New in version 3.8.
Property Details¶
- v_sim.ElementRenderer.props.buffer_dimension¶
- Name:
buffer-dimension- Type:
- Default Value:
1- Flags:
number of vertice buffers.
- v_sim.ElementRenderer.props.cache_material¶
-
can put material in cache.
- v_sim.ElementRenderer.props.color¶
- Name:
color- Type:
- Default Value:
- Flags:
element color
- v_sim.ElementRenderer.props.element¶
- Name:
element- Type:
- Default Value:
- Flags:
element
- v_sim.ElementRenderer.props.maskable¶
-
if element is maskable
- v_sim.ElementRenderer.props.material¶
-
element material