v_sim.GlExtScale

g GObject.GInterface GObject.GInterface v_sim.GlExtLined v_sim.GlExtLined GObject.GInterface->v_sim.GlExtLined GObject.Object GObject.Object v_sim.GlExt v_sim.GlExt GObject.Object->v_sim.GlExt v_sim.GlExtScale v_sim.GlExtScale v_sim.GlExt->v_sim.GlExtScale v_sim.GlExtLined->v_sim.GlExtScale

Subclasses:

None

Methods

Inherited:

v_sim.GlExt (16), GObject.Object (37), v_sim.GlExtLined (6)

Structs:

GObject.ObjectClass (5)

class

new (name)

add (origin, orientation, length, legend)

getLegend (i)

getLength (i)

getNArrows ()

getOrientation (i)

getOrigin (i)

setLegend (i, value)

setLength (i, lg)

setOrientation (i, xyz, mask)

setOrigin (i, xyz, mask)

Virtual Methods

Inherited:

v_sim.GlExt (3), GObject.Object (7), v_sim.GlExtLined (6)

Properties

Inherited:

v_sim.GlExt (9), v_sim.GlExtLined (3)

Name

Type

Flags

Short Description

current

int

r/w

id of the current arrow

current-label

str

r/w

label of the current arrow

current-length

float

r/w

length of the current arrow

current-orientation-x

float

r/w

orientation of the current arrow

current-orientation-y

float

r/w

orientation of the current arrow

current-orientation-z

float

r/w

orientation of the current arrow

current-origin-x

float

r/w

origin of the current arrow

current-origin-y

float

r/w

origin of the current arrow

current-origin-z

float

r/w

origin of the current arrow

n-arrows

int

r

number of stored arrows

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

v_sim.GlExt

r

Class Details

class v_sim.GlExtScale(**kwargs)
Bases:

v_sim.GlExt, v_sim.GlExtLined

Abstract:

No

Structure:

v_sim.GlExtScaleClass

All fields are private, use the access routines.

New in version 3.3.

classmethod new(name)
Parameters:

name (str or None) – a name for the v_sim.GlExt.

Returns:

a newly created v_sim.GlExtScale object.

Return type:

v_sim.GlExtScale

Create a new arrow set without any elements. Add arrows with v_sim.GlExtScale.add().

New in version 3.3.

add(origin, orientation, length, legend)
Parameters:
  • origin ([float]) – the origin ;

  • orientation ([float]) – the orientation in cartesian coordinates ;

  • length (float) – the length of the arrow ;

  • legend (str or None) – the text going with the arrow (can be None).

Returns:

the id of the newly added arrow.

Return type:

int

Create a new arrow pointing somewhere in the box with a label. If legend is None, then the label will be the value of the length.

New in version 3.7.

getLegend(i)
Parameters:

i (int) – the ith arrow.

Returns:

a string (private, do not free it).

Return type:

str or None

A v_sim.GlExtScale can have a legend. This is not actualy the string printed on screen but the one used to generate it.

New in version 3.3.

getLength(i)
Parameters:

i (int) – the ith arrow.

Returns:

a positive floating point value or a negative value if i is not in the arrow list.

Return type:

float

A v_sim.GlExtScale is characterised by its length.

New in version 3.3.

getNArrows()
Returns:

the number of stored arrows.

Return type:

int

A v_sim.GlExtScale is characterised by a set of arrows.

New in version 3.7.

getOrientation(i)
Parameters:

i (int) – the ith arrow.

Returns:

three floating point values.

Return type:

[float] or None

A v_sim.GlExtScale is characterised by its orientation in cartesian coordinates.

New in version 3.3.

getOrigin(i)
Parameters:

i (int) – the ith arrow.

Returns:

three floating point values.

Return type:

[float] or None

A v_sim.GlExtScale is characterised by its origin in cartesian coordinates.

New in version 3.3.

setLegend(i, value)
Parameters:
  • i (int) – the ith arrow ;

  • value (str or None) – a string (can be None).

Returns:

True if the legend was actually changed.

Return type:

bool

Routine that changes the legend of the scale. If value is None then the length of the scale is printed.

New in version 3.3.

setLength(i, lg)
Parameters:
  • i (int) – the ith arrow ;

  • lg (float) – a positive length.

Returns:

True if the length was actually changed.

Return type:

bool

Routine that changes the length of the scale. If i is zero and self has currently no arrow, a default one is created.

New in version 3.3.

setOrientation(i, xyz, mask)
Parameters:
  • i (int) – the ith arrow ;

  • xyz ([float]) – a vector in cartesian coordinates ;

  • mask (int) – relevant values in xyz, see v_sim.XYZ_MASK_X

Returns:

True if the orientation was actually changed.

Return type:

bool

Routine that changes the direction of the scale.

New in version 3.3.

setOrigin(i, xyz, mask)
Parameters:
  • i (int) – the ith arrow ;

  • xyz ([float]) – a vector in cartesian coordinates ;

  • mask (int) – relevant values in xyz, see v_sim.XYZ_MASK_X

Returns:

True if the origin was actually changed.

Return type:

bool

Routine that changes the origin of the scale.

New in version 3.3.

Property Details

v_sim.GlExtScale.props.current
Name:

current

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

id of the current arrow

v_sim.GlExtScale.props.current_label
Name:

current-label

Type:

str

Default Value:

''

Flags:

READABLE, WRITABLE

label of the current arrow

v_sim.GlExtScale.props.current_length
Name:

current-length

Type:

float

Default Value:

0.0

Flags:

READABLE, WRITABLE

length of the current arrow

v_sim.GlExtScale.props.current_orientation_x
Name:

current-orientation-x

Type:

float

Default Value:

0.0

Flags:

READABLE, WRITABLE

orientation of the current arrow

v_sim.GlExtScale.props.current_orientation_y
Name:

current-orientation-y

Type:

float

Default Value:

0.0

Flags:

READABLE, WRITABLE

orientation of the current arrow

v_sim.GlExtScale.props.current_orientation_z
Name:

current-orientation-z

Type:

float

Default Value:

0.0

Flags:

READABLE, WRITABLE

orientation of the current arrow

v_sim.GlExtScale.props.current_origin_x
Name:

current-origin-x

Type:

float

Default Value:

0.0

Flags:

READABLE, WRITABLE

origin of the current arrow

v_sim.GlExtScale.props.current_origin_y
Name:

current-origin-y

Type:

float

Default Value:

0.0

Flags:

READABLE, WRITABLE

origin of the current arrow

v_sim.GlExtScale.props.current_origin_z
Name:

current-origin-z

Type:

float

Default Value:

0.0

Flags:

READABLE, WRITABLE

origin of the current arrow

v_sim.GlExtScale.props.n_arrows
Name:

n-arrows

Type:

int

Default Value:

0

Flags:

READABLE

number of stored arrows