v_sim.PlaneSet

g GObject.GInterface GObject.GInterface v_sim.Animatable v_sim.Animatable GObject.GInterface->v_sim.Animatable v_sim.Boxed v_sim.Boxed GObject.GInterface->v_sim.Boxed v_sim.NodeMasker v_sim.NodeMasker GObject.GInterface->v_sim.NodeMasker GObject.Object GObject.Object v_sim.PlaneSet v_sim.PlaneSet GObject.Object->v_sim.PlaneSet v_sim.Animatable->v_sim.PlaneSet v_sim.Boxed->v_sim.PlaneSet v_sim.NodeMasker->v_sim.PlaneSet

Subclasses:

None

Methods

Inherited:

GObject.Object (37), v_sim.Animatable (6), v_sim.Boxed (2), v_sim.NodeMasker (3)

Structs:

GObject.ObjectClass (5)

class

new ()

class

newFull (newItem, freeItem, *data)

add (plane)

exportXMLFile (filename)

getAt (i)

getHiddingStatus ()

getIntersection (pointA, pointB, inter, inside)

getVisibility (point)

iter_new ()

parseXMLFile (filename)

remove (plane)

removeAll ()

setHiddingMode (mode)

Virtual Methods

Inherited:

GObject.Object (7), v_sim.Boxed (1), v_sim.NodeMasker (2)

Properties

Inherited:

v_sim.Boxed (2)

Name

Type

Flags

Short Description

hidding-mode

int

r/w

how to hide from multiple planes

masking

bool

r/w

masking property

n-planes

int

r

number of planes

Signals

Inherited:

GObject.Object (1), v_sim.Animatable (1), v_sim.Boxed (1), v_sim.NodeMasker (1)

Name

Short Description

added

This signal is emitted each time a plane is added to the set.

removed

This signal is emitted each time a plane is removed from the set.

Fields

Inherited:

GObject.Object (1), v_sim.Animatable (1), v_sim.Boxed (1), v_sim.NodeMasker (1)

Name

Type

Access

Description

parent

GObject.Object

r

priv

v_sim.PlaneSetPrivate

r

Class Details

class v_sim.PlaneSet(**kwargs)
Bases:

GObject.Object, v_sim.Animatable, v_sim.Boxed, v_sim.NodeMasker

Abstract:

No

Structure:

v_sim.PlaneSetClass

Common name to refer to a #_VisuPlaneSet.

classmethod new()
Returns:

the newly created object.

Return type:

v_sim.PlaneSet

Creates an object to store several planes and do hiding operations with them.

New in version 3.8.

classmethod newFull(newItem, freeItem, *data)
Parameters:
Return type:

v_sim.PlaneSet

Creates an object to store several planes and do hiding operations with them.

New in version 3.8.

add(plane)
Parameters:

plane (v_sim.Plane) – a v_sim.Plane object.

Returns:

False if plane was already registered.

Return type:

bool

Adds a plane to the list of stored planes.

New in version 3.8.

exportXMLFile(filename)
Parameters:

filename (str) – the file to export to ;

Raises:

GLib.Error

Returns:

True if everything goes right, if not and error (if not None) is set and contains the message of the error.

Return type:

bool

Export in XML format the given list of planes to the given file.

New in version 3.8.

getAt(i)
Parameters:

i (int) – an index.

Returns:

a v_sim.Plane object or None index is out of bounds.

Return type:

v_sim.Plane or None

Retrieve the plane stored at index i.

New in version 3.8.

getHiddingStatus()
Returns:

True if self has any masking planes.

Return type:

bool

Inquire if the self has any masking planes.

New in version 3.8.

getIntersection(pointA, pointB, inter, inside)
Parameters:
  • pointA (float) – three cartesian coordinates.

  • pointB (float) – three cartesian coordinates.

  • inter (float) – a location to store the intersection point.

  • inside (bool) – a boolean.

Returns:

True if there is an intersection.

Return type:

bool

Compute the location of the intersection point of segment AB with list of planes self. If there are several intersections, the closest to point A is returned. If inside is True, then the intersection point must be within the line [AB].

New in version 3.8.

getVisibility(point)
Parameters:

point (float) – three cartesian coordinates.

Returns:

True if the point is not masked.

Return type:

bool

Compute the visibility of the given point, following the masking scheme of the given plane list.

New in version 3.8.

iter_new()
Returns:

True if iterator is valid (i.e. there are planes in self).

iter:

the iterator to create.

Return type:

(bool, iter: v_sim.PlaneSetIter)

Creates an iterator on the internal storage of v_sim.Plane objects.

New in version 3.8.

parseXMLFile(filename)
Parameters:

filename (str) – the file to parse ;

Raises:

GLib.Error

Returns:

True if everything goes right, if not and error (if not None) is set and contains the message of the error.

Return type:

bool

Read the given file (syntax in XML) and create a list of planes.

New in version 3.8.

remove(plane)
Parameters:

plane (v_sim.Plane) – a v_sim.Plane object.

Returns:

True if plane was found and removed.

Return type:

bool

Remove plane from the list of stored planes.

New in version 3.8.

removeAll()
Returns:

True if some planes were actually removed.

Return type:

bool

Remove all stored planes.

New in version 3.8.

setHiddingMode(mode)
Parameters:

mode (v_sim.PlaneSetHiddingEnum) – a value related to the hiding mode (look at the enum v_sim.PlaneSetHiddingEnum).

Returns:

True if status changed.

Return type:

bool

This method is used to set the hiding mode flag. In union mode, elements are not drawn if they are hidden by one plane at least. In intersection mode, elements are only hidden if masked by all planes.

New in version 3.8.

Signal Details

v_sim.PlaneSet.signals.added(plane_set, plane)
Signal Name:

added

Flags:

RUN_LAST, NO_RECURSE, NO_HOOKS

Parameters:

This signal is emitted each time a plane is added to the set.

New in version 3.8.

v_sim.PlaneSet.signals.removed(plane_set, plane)
Signal Name:

removed

Flags:

RUN_LAST, NO_RECURSE, NO_HOOKS

Parameters:

This signal is emitted each time a plane is removed from the set.

New in version 3.8.

Property Details

v_sim.PlaneSet.props.hidding_mode
Name:

hidding-mode

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

how to hide from multiple planes

v_sim.PlaneSet.props.masking
Name:

masking

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

masking property

v_sim.PlaneSet.props.n_planes
Name:

n-planes

Type:

int

Default Value:

0

Flags:

READABLE

number of planes