v_sim.GlExtSet

g GObject.Object GObject.Object v_sim.Gl v_sim.Gl GObject.Object->v_sim.Gl v_sim.GlExtSet v_sim.GlExtSet v_sim.Gl->v_sim.GlExtSet

Subclasses:

v_sim.GlNodeScene

Methods

Inherited:

v_sim.Gl (39), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

add (ext)

draw ()

getAll ()

getBgColor ()

getByName (name)

getFogActive ()

getFogColor ()

getFogFollowsBg ()

getFogSpecificColor ()

getFogStartFull ()

getPixmapData (width, height, hasAlpha)

remove (ext)

setBgColor (rgba, mask)

setFogActive (value)

setFogColor (rgba, mask)

setFogFollowsBg (value)

setFogStartFull (startEnd, mask)

setGlView (view)

Virtual Methods

Inherited:

v_sim.Gl (1), GObject.Object (7)

do_added (ext)

do_removed (ext)

Properties

Inherited:

v_sim.Gl (7)

Name

Type

Flags

Short Description

bg-alpha

float

r/w

background alpha channel

bg-blue

float

r/w

background blue channel

bg-green

float

r/w

background green channel

bg-red

float

r/w

background red channel

dirty

bool

r

one of the object rendering is out of date

fog-active

bool

r/w

Fog is used

fog-alpha

float

r/w

specific fog alpha channel

fog-blue

float

r/w

specific fog blue channel

fog-follows-bg

bool

r/w

Fog color is the bg color

fog-full

float

r/w

depth where fog hides all

fog-green

float

r/w

specific fog green channel

fog-red

float

r/w

specific fog red channel

fog-start

float

r/w

starting fog depth

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

v_sim.Gl

r

priv

v_sim.GlExtSetPrivate

r

Class Details

class v_sim.GlExtSet(**kwargs)
Bases:

v_sim.Gl

Abstract:

No

Structure:

v_sim.GlExtSetClass

Common name to refer to a #_VisuGlExtSet.

classmethod new()
Returns:

a newly created v_sim.GlExtSet object.

Return type:

v_sim.GlExtSet

Create an object to handle a set of v_sim.GlExt objects and draw them together.

New in version 3.8.

add(ext)
Parameters:

ext (v_sim.GlExt) – a v_sim.GlExt object.

Returns:

True if not already existing.

Return type:

bool

Add ext in the list of drawn v_sim.GlExt by self.

New in version 3.8.

draw()

Basic drawing method : it clears the OpenGL area and call all lists stored in self.

New in version 3.8.

getAll()
Returns:

only the container list should be freed after.

Return type:

[v_sim.GlExt]

Retrieve as a GLib.List all the v_sim.GlExt objects drawn by self.

New in version 3.8.

getBgColor()
Returns:

a storage for four values.

Return type:

rgba: [float]

Read the RGBA value of the specific background colour (in [0;1]).

New in version 3.8.

getByName(name)
Parameters:

name (str) – a name to look for.

Returns:

a v_sim.GlExt with name.

Return type:

v_sim.GlExt

Retrieve the v_sim.GlExt object with name that is stored in self. If several v_sim.GlExt objects have the same name, the first one is returned.

New in version 3.8.

getFogActive()
Returns:

True if the fog is rendered, False otherwise.

Return type:

bool

Read if fog is used or not.

New in version 3.8.

getFogColor()
Returns:

a storage for three values.

Return type:

rgba: [float]

Gives the actual fog color, for the specific color, use v_sim.GlExtSet.getFogSpecificColor().

New in version 3.8.

getFogFollowsBg()
Returns:

True if the fog uses its own color or False if it uses the color of the background.

Return type:

bool

Read if fog uses a specific colour or not.

New in version 3.8.

getFogSpecificColor()
Returns:

a storage for three values.

Return type:

rgba: [float]

Gives the specific fog color, for the actual color, use v_sim.GlExtSet.getFogColor().

New in version 3.8.

getFogStartFull()
Returns:

two float location.

Return type:

startFull: [float]

Retrieves the starting and ending value (reduced) of fog extension.

New in version 3.8.

getPixmapData(width, height, hasAlpha)
Parameters:
  • width (int) – the desired width or 0 for current ;

  • height (int) – the desired height or 0 for current ;

  • hasAlpha (bool) – if True, the returned data is RGBA, else only RGB.

Returns:

image data, row by row.

Return type:

[int]

Create an image from the OpenGL area. The size can be changed, using width and height. If these pointers contains positive values, then they are used to set the size for the image. If not, the size of the current v_sim.GlView is used and stored in these pointers.

New in version 3.8.

remove(ext)
Parameters:

ext (v_sim.GlExt) – a v_sim.GlExt object.

Returns:

True if successfully removed.

Return type:

bool

Remove ext in the list of drawn v_sim.GlExt by self.

New in version 3.8.

setBgColor(rgba, mask)
Parameters:
Returns:

True if changed.

Return type:

bool

Method used to change the value of the parameter background_color.

New in version 3.8.

setFogActive(value)
Parameters:

value (bool) – a boolean.

Returns:

True if value is actually changed.

Return type:

bool

Activates the fog rendering, or not.

New in version 3.8.

setFogColor(rgba, mask)
Parameters:
Returns:

True if value is actually changed.

Return type:

bool

Change the fog specific colour. Activate it with v_sim.GlExtSet.setFogFollowsBg().

New in version 3.8.

setFogFollowsBg(value)
Parameters:

value (bool) – a boolean.

Returns:

True if value is actually changed.

Return type:

bool

Specifies if the fog is coloured with the background colour or with its own colour, see v_sim.GlExtSet.setFogColor().

New in version 3.8.

setFogStartFull(startEnd, mask)
Parameters:
Returns:

True if values are actually changed.

Return type:

bool

Change the starting and ending point of fog.

New in version 3.8.

setGlView(view)
Parameters:

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

Returns:

True if the view actually change.

Return type:

bool

Apply the given view on all v_sim.GlExt objects stored in self.

New in version 3.8.

do_added(ext) virtual
Parameters:

ext (v_sim.GlExt) –

executed when ext is added.

do_removed(ext) virtual
Parameters:

ext (v_sim.GlExt) –

executed when ext is removed.

Property Details

v_sim.GlExtSet.props.bg_alpha
Name:

bg-alpha

Type:

float

Default Value:

0.0

Flags:

READABLE, WRITABLE

background alpha channel

v_sim.GlExtSet.props.bg_blue
Name:

bg-blue

Type:

float

Default Value:

0.0

Flags:

READABLE, WRITABLE

background blue channel

v_sim.GlExtSet.props.bg_green
Name:

bg-green

Type:

float

Default Value:

0.0

Flags:

READABLE, WRITABLE

background green channel

v_sim.GlExtSet.props.bg_red
Name:

bg-red

Type:

float

Default Value:

0.0

Flags:

READABLE, WRITABLE

background red channel

v_sim.GlExtSet.props.dirty
Name:

dirty

Type:

bool

Default Value:

False

Flags:

READABLE

one of the object rendering is out of date

v_sim.GlExtSet.props.fog_active
Name:

fog-active

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE

Fog is used

v_sim.GlExtSet.props.fog_alpha
Name:

fog-alpha

Type:

float

Default Value:

1.0

Flags:

READABLE, WRITABLE

specific fog alpha channel

v_sim.GlExtSet.props.fog_blue
Name:

fog-blue

Type:

float

Default Value:

0.0

Flags:

READABLE, WRITABLE

specific fog blue channel

v_sim.GlExtSet.props.fog_follows_bg
Name:

fog-follows-bg

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE

Fog color is the bg color

v_sim.GlExtSet.props.fog_full
Name:

fog-full

Type:

float

Default Value:

0.699999988079071

Flags:

READABLE, WRITABLE

depth where fog hides all

v_sim.GlExtSet.props.fog_green
Name:

fog-green

Type:

float

Default Value:

0.0

Flags:

READABLE, WRITABLE

specific fog green channel

v_sim.GlExtSet.props.fog_red
Name:

fog-red

Type:

float

Default Value:

0.0

Flags:

READABLE, WRITABLE

specific fog red channel

v_sim.GlExtSet.props.fog_start
Name:

fog-start

Type:

float

Default Value:

0.30000001192092896

Flags:

READABLE, WRITABLE

starting fog depth