v_sim.GlExtAxes

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.GlExtAxes v_sim.GlExtAxes v_sim.GlExt->v_sim.GlExtAxes v_sim.GlExtLined->v_sim.GlExtAxes

Subclasses:

None

Methods

Inherited:

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

Structs:

GObject.ObjectClass (5)

class

new (name)

getLengthFactor ()

getPosition ()

setBasis (matrix)

setBasisFromBox (box)

setLabel (lbl, dir)

setLengthFactor (factor)

setOrientationTop (top, dir)

setPosition (xpos, ypos)

useOrientation (use)

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

basis

v_sim.Box

r/w

provides the basis-set to draw the axes

display-orientation

bool

r/w

display orientation information

orientation-omega

float

r/w

omega defining top

orientation-phi

float

r/w

phi defining top

orientation-theta

float

r/w

theta defining top

size

float

r/w

portion of the screen for the axis

view

v_sim.GlView

r/w

rendering view for the axes

x-label

str

r/w

label for the x axis

x-pos

float

r/w

position along x axis

y-label

str

r/w

label for the y axis

y-pos

float

r/w

position along y axis

z-label

str

r/w

label for the z axis

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

v_sim.GlExt

r

Class Details

class v_sim.GlExtAxes(**kwargs)
Bases:

v_sim.GlExt, v_sim.GlExtLined

Abstract:

No

Structure:

v_sim.GlExtAxesClass

An opaque structure.

New in version 3.7.

classmethod new(name)
Parameters:

name (str or None) – the name to give to the extension (default is v_sim.GL_EXT_AXES_ID).

Returns:

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

Return type:

v_sim.GlExtAxes

Creates a new v_sim.GlExt to draw axes.

New in version 3.7.

getLengthFactor()
Returns:

the scaling factor.

Return type:

float

Retrieve the scaling factor used to draw axis.

New in version 3.8.

getPosition()
Returns:

xpos:

a location to store the x position.

ypos:

a location to store the y position.

Return type:

(xpos: float, ypos: float)

Inquire the position of the representation of tha axes.

New in version 3.7.

setBasis(matrix)
Parameters:

matrix (float) – the definition of the three basis axis.

Returns:

True if the basis is actually changed.

Return type:

bool

The self can represent an arbitrary basis-set, provided by matrix. matrix[{0,1,2}] represents the {x,y,z} axis vector in a cartesian basis-set. See v_sim.GlExtAxes.setBasisFromBox() if the basis-set should follow the one of a given v_sim.Box.

New in version 3.7.

setBasisFromBox(box)
Parameters:

box (v_sim.Box or None) – the v_sim.Box to use as basis-set.

Returns:

True if the basis is actually changed.

Return type:

bool

The self can follow the basis-set defined by box. If None is passed, then the orthorombic default basis-set is used.

New in version 3.7.

setLabel(lbl, dir)
Parameters:
Returns:

True if the label is modified.

Return type:

bool

Set the label lbl for the given axis dir.

New in version 3.8.

setLengthFactor(factor)
Parameters:

factor (float) – a floating point value between 0. and 10.

Returns:

True if value is indeed changed.

Return type:

bool

Change the scaling factor to draw the axis.

New in version 3.8.

setOrientationTop(top, dir)
Parameters:
  • top ([float]) – a camera orientation.

  • dir (int) – flags used to specify which angles to set.

Returns:

True if value is actually changed.

Return type:

bool

Define the camera orientation of the top orientation when self are used to display orientation information.

New in version 3.8.

setPosition(xpos, ypos)
Parameters:
  • xpos (float) – the reduced x position (1 to the right).

  • ypos (float) – the reduced y position (1 to the bottom).

Returns:

True if the position is actually changed.

Return type:

bool

Change the position of the axes representation.

New in version 3.7.

useOrientation(use)
Parameters:

use (bool) – a boolean.

Returns:

True if value is actually changed.

Return type:

bool

If True, self also draws a coloured cone to display orientation information.

New in version 3.8.

Property Details

v_sim.GlExtAxes.props.basis
Name:

basis

Type:

v_sim.Box

Default Value:

None

Flags:

READABLE, WRITABLE

provides the basis-set to draw the axes

v_sim.GlExtAxes.props.display_orientation
Name:

display-orientation

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

display orientation information

v_sim.GlExtAxes.props.orientation_omega
Name:

orientation-omega

Type:

float

Default Value:

0.0

Flags:

READABLE, WRITABLE

omega defining top

v_sim.GlExtAxes.props.orientation_phi
Name:

orientation-phi

Type:

float

Default Value:

0.0

Flags:

READABLE, WRITABLE

phi defining top

v_sim.GlExtAxes.props.orientation_theta
Name:

orientation-theta

Type:

float

Default Value:

0.0

Flags:

READABLE, WRITABLE

theta defining top

v_sim.GlExtAxes.props.size
Name:

size

Type:

float

Default Value:

0.1599999964237213

Flags:

READABLE, WRITABLE

portion of the screen for the axis

v_sim.GlExtAxes.props.view
Name:

view

Type:

v_sim.GlView

Default Value:

None

Flags:

READABLE, WRITABLE

rendering view for the axes

v_sim.GlExtAxes.props.x_label
Name:

x-label

Type:

str

Default Value:

'x'

Flags:

READABLE, WRITABLE

label for the x axis

v_sim.GlExtAxes.props.x_pos
Name:

x-pos

Type:

float

Default Value:

1.0

Flags:

READABLE, WRITABLE

position along x axis

v_sim.GlExtAxes.props.y_label
Name:

y-label

Type:

str

Default Value:

'y'

Flags:

READABLE, WRITABLE

label for the y axis

v_sim.GlExtAxes.props.y_pos
Name:

y-pos

Type:

float

Default Value:

1.0

Flags:

READABLE, WRITABLE

position along y axis

v_sim.GlExtAxes.props.z_label
Name:

z-label

Type:

str

Default Value:

'z'

Flags:

READABLE, WRITABLE

label for the z axis