v_sim.ElementRenderer¶
- Subclasses:
Methods¶
- Inherited:
- Structs:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
|
|
|
|
Properties¶
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
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.
- call()¶
A convenience function to run the call method of self.
New in version 3.8.
- callAt(colorizer, data, node)¶
- Parameters:
colorizer (
v_sim.DataColorizerorNone) – av_sim.DataColorizerobject.data (
v_sim.Data) – av_sim.Dataobject.node (
v_sim.Node) – av_sim.Nodebelonging to data.
A convenience function to run the callAt method of self. This will represent node of data with the given colorizer at the coordinates of node.
New in version 3.8.
- colorize(effect)¶
- Parameters:
effect (
v_sim.ElementRendererEffects) – av_sim.ElementRendererEffectsvalue.
Change the current OpenGL color, according to the color of self. An additional effect can be added.
New in version 3.8.
- 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.
- 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.
- getConstGlView()¶
- Returns:
a const
v_sim.GlViewobject.- Return type:
Retrieves the
v_sim.GlViewassociated to self, seev_sim.ElementRenderer.setGlView().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.
- getMaterial()¶
-
Retrieve the #ToolMaterial used by self to represent a
v_sim.Element.New in version 3.8.
- rebuild(view)¶
- Parameters:
view (
v_sim.GlView) – av_sim.GlViewobject.
Rebuild the OpenGL list representing self for view.
New in version 3.8.
- 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.
- do_call() virtual¶
A convenience function to run the call method of element.
New in version 3.8.
- do_callAt(colorizer, data, node) virtual¶
- Parameters:
colorizer (
v_sim.DataColorizerorNone) – av_sim.DataColorizerobject.data (
v_sim.Data) – av_sim.Dataobject.node (
v_sim.Node) – av_sim.Nodebelonging to data.
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.
New in version 3.8.
- do_compile(view) virtual¶
- Parameters:
view (
v_sim.GlView) –
a virtual method to compile an OpenGL list representing the shape for a given
v_sim.Element.
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.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