v_sim.ElementRenderer

g GObject.Object GObject.Object v_sim.ElementRenderer v_sim.ElementRenderer GObject.Object->v_sim.ElementRenderer

Subclasses:

v_sim.ElementAtomic

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

bindToPool ()

call ()

callAt (colorizer, data, node)

colorize (effect)

featureMaterialCache ()

getColor ()

getConstElement ()

getConstGlView ()

getElement ()

getExtent ()

getMaterial ()

rebuild (view)

setColor (color)

setGlView (view)

setMaterialValue (value, id)

setRGBAValue (value, id)

Virtual Methods

Inherited:

GObject.Object (7)

do_call ()

do_callAt (colorizer, data, node)

do_compile (view)

do_getExtent ()

Properties

Name

Type

Flags

Short Description

cache-material

bool

r

can put material in cache.

color

v_sim.Color

r/w

element color

element

v_sim.Element

r/w/co

element

maskable

bool

r/w

if element is maskable

material

r/w

element material

rendered

bool

r/w

if element is rendered

Signals

Inherited:

GObject.Object (1)

Name

Short Description

size-changed

Emitted when the size of a element is changed.

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

Class Details

class v_sim.ElementRenderer(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

v_sim.ElementRendererClass

Structure used to define v_sim.ElementRenderer objects.

New in version 3.8.

bindToPool()

Bind self to the corresponding v_sim.ElementRenderer of the pool. This allows to have v_sim.Element renderers that follow the same color or maskable properties for instance of a given v_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:

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) – a v_sim.ElementRendererEffects value.

Change the current OpenGL color, according to the color of self. An additional effect can be added.

New in version 3.8.

featureMaterialCache()
Returns:

True if material representation can be stored in a Gl list.

Return type:

bool

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.Color or None.

Return type:

v_sim.Color or None

Retrieve the v_sim.Color used by self to represent a v_sim.Element.

New in version 3.8.

getConstElement()
Returns:

a const v_sim.Element.

Return type:

v_sim.Element

Retrieve the v_sim.Element represented by self. See v_sim.ElementRenderer.getElement() if the return value should be modified.

New in version 3.8.

getConstGlView()
Returns:

a const v_sim.GlView object.

Return type:

v_sim.GlView

Retrieves the v_sim.GlView associated to self, see v_sim.ElementRenderer.setGlView().

New in version 3.8.

getElement()
Returns:

the v_sim.Element represented by self.

Return type:

v_sim.Element

Retrieve the v_sim.Element that is represented by self. See v_sim.ElementRenderer.getConstElement() if the returned value should not be modified.

New in version 3.8.

getExtent()
Returns:

a positive float value.

Return type:

float

Retrives the radius of a sphere containing the representation of self.

New in version 3.8.

getMaterial()
Returns:

a #ToolMaterial or None.

Return type:

float or None

Retrieve the #ToolMaterial used by self to represent a v_sim.Element.

New in version 3.8.

rebuild(view)
Parameters:

view (v_sim.GlView) – a v_sim.GlView object.

Rebuild the OpenGL list representing self for view.

New in version 3.8.

setColor(color)
Parameters:

color (v_sim.Color) – a v_sim.Color object.

Returns:

True if value is actually changed.

Return type:

bool

Changes the representation of self to use color.

New in version 3.8.

setGlView(view)
Parameters:

view (v_sim.GlView) – a v_sim.GlView object.

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:
Returns:

True if value is actually changed.

Return type:

bool

Changes the material channel id with value.

New in version 3.8.

setRGBAValue(value, id)
Parameters:
  • value (float) – a float vlaue in [0;1].

  • id (int) – an value in [0;3].

Returns:

True if value is actually changed.

Return type:

bool

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:

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.

do_getExtent() virtual
Returns:

a positive float value.

Return type:

float

Retrives the radius of a sphere containing the representation of element.

New in version 3.8.

Signal Details

v_sim.ElementRenderer.signals.size_changed(element_renderer, size)
Signal Name:

size-changed

Flags:

RUN_LAST, NO_RECURSE

Parameters:

Emitted when the size of a element is changed.

New in version 3.8.

Property Details

v_sim.ElementRenderer.props.cache_material
Name:

cache-material

Type:

bool

Default Value:

True

Flags:

READABLE

can put material in cache.

v_sim.ElementRenderer.props.color
Name:

color

Type:

v_sim.Color

Default Value:

None

Flags:

READABLE, WRITABLE

element color

v_sim.ElementRenderer.props.element
Name:

element

Type:

v_sim.Element

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

element

v_sim.ElementRenderer.props.maskable
Name:

maskable

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE

if element is maskable

v_sim.ElementRenderer.props.material
Name:

material

Type:

Default Value:

None

Flags:

READABLE, WRITABLE

element material

v_sim.ElementRenderer.props.rendered
Name:

rendered

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE

if element is rendered