v_sim.GlExt

g GObject.Object GObject.Object v_sim.GlExt v_sim.GlExt GObject.Object->v_sim.GlExt

Subclasses:

v_sim.GlExtAxes, v_sim.GlExtBg, v_sim.GlExtBox, v_sim.GlExtFrame, v_sim.GlExtInfos, v_sim.GlExtMaps, v_sim.GlExtMarks, v_sim.GlExtNodeVectors, v_sim.GlExtNodes, v_sim.GlExtPairs, v_sim.GlExtPaths, v_sim.GlExtPlanes, v_sim.GlExtScale, v_sim.GlExtSurfaces

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

call (lastOnly)

completeDrawing ()

getActive ()

getGlContext ()

getGlList ()

getName ()

getPreferedRenderingMode ()

getPriority ()

rebuild ()

setActive (value)

setDirty (status)

setGlContext (gl)

setGlView (view)

setPreferedRenderingMode (value)

setTranslation (trans)

startDrawing ()

Virtual Methods

Inherited:

GObject.Object (7)

do_draw ()

do_rebuild ()

do_setGlView (view)

Properties

Name

Type

Flags

Short Description

active

bool

r/w

extension is used or not

description

str

r/w

description of extension

dirty

bool

r/w

object rendering is out of date

label

str

r/w/c

label (translated) of extension

nGlObj

int

r/w/co

number of GL lists dealt with

name

str

r/w/co

name (id) of extension

priority

int

r/w/c

drawing priority of extension

rendering-mode

int

r/w

specific rendering mode for the extension

saveState

bool

r/w/c

save OpenGL state

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

priv

v_sim.GlExtPrivate

r

Class Details

class v_sim.GlExt(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

v_sim.GlExtClass

Common name to refer to a #_VisuGlExt.

call(lastOnly)
Parameters:

lastOnly (bool) – a boolean.

Select the v_sim.GlExt matching the given name and call it. The call is indeed done only if the extension is used. If lastOnly is True, the list is called only if it has a v_sim.GL_EXT_PRIORITY_LAST priority. On the contrary the list is called only if its priority is lower than v_sim.GL_EXT_PRIORITY_LAST.

completeDrawing()

A method to be called after calling v_sim.GlExt.startDrawing(), when the drawing primitives have all been called. It also reset the dirty flag for this extension.

New in version 3.8.

getActive()
Returns:

True if used, False otherwise.

Return type:

bool

Get if the extension is used or not. If not its ObjectList is not rendered.

getGlContext()
Returns:

the v_sim.Gl object this extension draws to.

Return type:

v_sim.Gl or None

The v_sim.Gl object this extension draws to.

New in version 3.8.

getGlList()
Returns:

an OpenGL identifier id for self.

Return type:

int

All v_sim.GlExt objects have a master OpenGL list to draw to. This routine gets the identifier of this list.

New in version 3.7.

getName()
Returns:

the name of the extension.

Return type:

str

Retrieve the name of the extension.

New in version 3.8.

getPreferedRenderingMode()
Returns:

the prefered rendering mode of this self.

Return type:

v_sim.GlRenderingMode

Each v_sim.GlExt method can draw in a mode different from the global one, see v_sim.GlRenderingMode. See also v_sim.GlExt.setPreferedRenderingMode().

New in version 3.7.

getPriority()
Returns:

the v_sim.GlExt priority.

Return type:

int

Inquire the priority of self.

New in version 3.8.

rebuild()

This routine does not sort the extension on their priority and should be used only to draw some selected extensions. This method is called automatically for all extensions in a v_sim.GlExtSet when required.

setActive(value)
Parameters:

value (bool) – the new value.

Return type:

bool

Set if an extension is actually used or not.

setDirty(status)
Parameters:

status (bool) – a boolean.

Returns:

True is status is actually changed.

Return type:

bool

Set an internal flag to mark that self should be redrawn before next OpenGL frame view.

New in version 3.8.

setGlContext(gl)
Parameters:

gl (v_sim.Gl) – a v_sim.Gl object.

Returns:

True if the value is actually changed.

Return type:

bool

Associate gl to self.

New in version 3.8.

setGlView(view)
Parameters:

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

Returns:

True if the view is changed.

Return type:

bool

Attach a view to the self extension.

New in version 3.8.

setPreferedRenderingMode(value)
Parameters:

value (v_sim.GlRenderingMode) – see v_sim.GlRenderingMode to choose one.

Returns:

True if value is actually changed.

Return type:

bool

This method is used to specify the rendering mode that the extension should use to be drawn. If the value is set to v_sim.GlRenderingMode.FOLLOW, the extension follows the global setting for rendering mode.

setTranslation(trans)
Parameters:

trans ([float]) – a translation vector in real space.

Returns:

True if the translations are indeed changed.

Return type:

bool

Change the translation the extension is drawn at.

New in version 3.8.

startDrawing()

Method to be called in the draw function to start compiling the list. Wghen drawing primitives are all done, call v_sim.GlExt.completeDrawing().

New in version 3.8.

do_draw() virtual

a draw method for this extension.

do_rebuild() virtual

This routine does not sort the extension on their priority and should be used only to draw some selected extensions. This method is called automatically for all extensions in a v_sim.GlExtSet when required.

do_setGlView(view) virtual
Parameters:

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

Returns:

True if the view is changed.

Return type:

bool

Attach a view to the self extension.

New in version 3.8.

Property Details

v_sim.GlExt.props.active
Name:

active

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

extension is used or not

v_sim.GlExt.props.description
Name:

description

Type:

str

Default Value:

''

Flags:

READABLE, WRITABLE

description of extension

v_sim.GlExt.props.dirty
Name:

dirty

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

object rendering is out of date

v_sim.GlExt.props.label
Name:

label

Type:

str

Default Value:

''

Flags:

READABLE, WRITABLE, CONSTRUCT

label (translated) of extension

v_sim.GlExt.props.nGlObj
Name:

nGlObj

Type:

int

Default Value:

1

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

number of GL lists dealt with

v_sim.GlExt.props.name
Name:

name

Type:

str

Default Value:

''

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

name (id) of extension

v_sim.GlExt.props.priority
Name:

priority

Type:

int

Default Value:

50

Flags:

READABLE, WRITABLE, CONSTRUCT

drawing priority of extension

v_sim.GlExt.props.rendering_mode
Name:

rendering-mode

Type:

int

Default Value:

5

Flags:

READABLE, WRITABLE

specific rendering mode for the extension

v_sim.GlExt.props.saveState
Name:

saveState

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT

save OpenGL state