v_sim.GlExtNodeVectors

g GObject.GInterface GObject.GInterface v_sim.Sourceable v_sim.Sourceable GObject.GInterface->v_sim.Sourceable GObject.Object GObject.Object v_sim.GlExt v_sim.GlExt GObject.Object->v_sim.GlExt v_sim.GlExtNodeVectors v_sim.GlExtNodeVectors v_sim.GlExt->v_sim.GlExtNodeVectors v_sim.Sourceable->v_sim.GlExtNodeVectors

Subclasses:

v_sim.GlExtForces, v_sim.GlExtGeodiff, v_sim.GlExtVibrations

Methods

Inherited:

v_sim.GlExt (16), GObject.Object (37), v_sim.Sourceable (8)

Structs:

GObject.ObjectClass (5)

class

new (name)

getNormalisation ()

setAddLength (addLength)

setArrow (tailLength, tailRadius, tailN, headLength, headRadius, headN)

setCentering (centering)

setColor (scheme)

setLabelThreshold (val)

setNodeRenderer (renderer)

setNormalisation (norm)

setRenderedSize (scale)

setTranslation (trans)

setVectorThreshold (val)

Virtual Methods

Inherited:

v_sim.GlExt (3), GObject.Object (7), v_sim.Sourceable (1)

Properties

Inherited:

v_sim.GlExt (9), v_sim.Sourceable (2)

Name

Type

Flags

Short Description

normalisation

float

r/w

normalisation factor

rendering-size

float

r/w

rendering size

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

v_sim.GlExt

r

priv

v_sim.GlExtNodeVectorsPrivate

r

Class Details

class v_sim.GlExtNodeVectors(**kwargs)
Bases:

v_sim.GlExt, v_sim.Sourceable

Abstract:

No

Structure:

v_sim.GlExtNodeVectorsClass

An opaque structure.

New in version 3.7.

classmethod new(name)
Parameters:

name (str or None) – the name to give to the extension.

Returns:

a pointer to the v_sim.GlExt it created or None otherwise.

Return type:

v_sim.GlExtNodeVectors

Creates a new v_sim.GlExt to draw a box.

New in version 3.7.

getNormalisation()
Returns:

the normalisation factor used by vact.

Return type:

float

Gets the normalisation factor, see v_sim.GlExtNodeVectors.setNormalisation().

New in version 3.7.

setAddLength(addLength)
Parameters:

addLength (float) – a positive value.

Returns:

True if settings has been changed.

Return type:

bool

Change the additional length that is used to draw the tail.

New in version 3.8.

setArrow(tailLength, tailRadius, tailN, headLength, headRadius, headN)
Parameters:
  • tailLength (float) – the length for the tail part of the vector.

  • tailRadius (float) – the radius for the tail part of the vector.

  • tailN (int) – the number of polygons to draw the tail part of the vector.

  • headLength (float) – the length for the head part of the vector.

  • headRadius (float) – the radius for the head part of the vector.

  • headN (int) – the number of polygons to draw the head part of the vector.

Returns:

True if setting has been changed.

Return type:

bool

Defines the profile of the arrows representing the vectors.

New in version 3.7.

setCentering(centering)
Parameters:

centering (v_sim.GlArrowCentering) – a v_sim.GlArrowCentering id.

Returns:

True if setting has been changed.

Return type:

bool

Change how vectors are position with respect to to center of each node.

New in version 3.7.

setColor(scheme)
Parameters:

scheme (v_sim.GlExtNodeVectorsColorScheme) – a value.

Returns:

True if setting has been changed.

Return type:

bool

If scheme is v_sim.GlExtNodeVectorsColorScheme.ELEMENT, the vectors are drawn with the color of the currently drawn v_sim.Element. If scheme is v_sim.GlExtNodeVectorsColorScheme.BRIGHT, they are drawn with a highlighted color. If scheme is v_sim.GlExtNodeVectorsColorScheme.ORIENTATION, they are drawn with a hue depending onn orientation.

New in version 3.7.

setLabelThreshold(val)
Parameters:

val (float) – a value.

Returns:

True if setting has been changed.

Return type:

bool

Vector norms can be drawn if a threshold value is reach. If val is strictly positive, the norm of each vector is compared to val. If val is negative, the normalised [0;1] norm is compared to -val.

New in version 3.7.

setNodeRenderer(renderer)
Parameters:

renderer (v_sim.NodeArrayRenderer) – a v_sim.NodeArrayRenderer object.

Returns:

True if changed.

Return type:

bool

Use the v_sim.ElementRenderer properties from renderer to display vector properties.

New in version 3.8.

setNormalisation(norm)
Parameters:

norm (float) – a floating point value.

Returns:

True if setting has been changed.

Return type:

bool

norm governs how the input node vector field is normalised. With a positive value, all node vectors will be normalised by norm. With a negative value, all node vectors are normalised with respect to the biggest one.

New in version 3.7.

setRenderedSize(scale)
Parameters:

scale (float) – a floating point value.

Returns:

True if setting has been changed.

Return type:

bool

scale governs how large the node vectors are drawn. For a positive value, a vector with a normalised size of 1 (see v_sim.GlExtNodeVectors.setNormalisation()) will be drawn with the size of scale. For a negative value, a vector of normalised size of 1 will be drawn with a size of -scale times the maximum element size (see v_sim.NodeArrayRenderer.getMaxElementSize()).

New in version 3.7.

setTranslation(trans)
Parameters:

trans (float) – a positive floating point value.

Returns:

True if setting has been changed.

Return type:

bool

Defines a translation with respect to the center of each node. The vector is shifted outwards, following the vector direction by an amount given by the product of trans and the element size currently drawn.

New in version 3.7.

setVectorThreshold(val)
Parameters:

val (float) – a value.

Returns:

True if setting has been changed.

Return type:

bool

Vectors are indeed drawn if a threshold value is reach. If val is strictly positive, the norm of each vector is compared to val. If val is negative, the normalised [0;1] norm is compared to -val.

New in version 3.7.

Property Details

v_sim.GlExtNodeVectors.props.normalisation
Name:

normalisation

Type:

float

Default Value:

0.0

Flags:

READABLE, WRITABLE

normalisation factor

v_sim.GlExtNodeVectors.props.rendering_size
Name:

rendering-size

Type:

float

Default Value:

-2.0

Flags:

READABLE, WRITABLE

rendering size