OpenGL actors for populating the 3D scene.
Classes defined in module actors
An Actor is anything that can be drawn in an OpenGL 3D Scene.
The visualisation of the Scene Actors is dependent on camera position and angles, clipping planes, rendering mode and lighting.
An Actor subclass should minimally reimplement the following methods:
The interactive picking functionality requires the following methods, for which we porvide do-nothing defaults here:
Methods
Default implementation for bbox().
An Actor translated to another position.
Methods
An Actor rotated to another position.
Methods
An OpenGL actor with cubic shape and 6 colored sides.
Methods
Draw the cube.
An OpenGL actor representing a sphere.
Methods
Draw the cube.
Draws a bbox.
Methods
Always draws a wireframe model of the bbox.
An actor showing the three axes of a CoordinateSystem.
If no CoordinateSystem is specified, the global coordinate system is drawn.
The default actor consists of three colored lines of unit length along the unit vectors of the axes and three colored triangles representing the coordinate planes. This can be modified by the following parameters:
size: scale factor for the unit vectors. color: a set of three colors to use for x,y,z axes. colored_axes = False: draw black axes. draw_planes = False: do not draw the coordinate planes.
Methods
Draw the axes.
An OpenGL actor representing a triade of global axes.
By default, this draws three unit length axes at the origin, and three colored triangles representing the coordinate planes. The size and position of the axes can be changed.
colored_axes = False draws black axes. draw_planes = False suppress the drawing of the coordinate planes.
Methods
Draw the triade.
Draws a (set of) grid(s) in one of the coordinate planes.
Methods
Draw the grid.
Draws a set of 3 coordinate planes.
Methods
Draw the grid.
A plane in a 3D scene.
Methods
Draw the grid.
An OpenGL actor representing a geometrical model.
The model can either be in Formex or Mesh format.
Methods
Return the vertives as a 2-dim array.
Set the color of the Actor.
Set the backside color of the Actor.
Set the Actors alpha value.
Draw the geometry on the specified canvas.
The drawing parameters not provided by the Actor itself, are derived from the canvas defaults.
mode and color can be overridden for the sole purpose of allowing the recursive use for modes ending on ‘wire’ (‘smoothwire’ or ‘flatwire’). In these cases, two drawing operations are done: one with mode=’wireframe’ and color=black, and one with mode=mode[:-4].
Allow picking of parts of the actor.
mode can be ‘element’, ‘edge’ or ‘point’
Return a GeomActor with a selection of this actor’s elements
Currently, the resulting Actor will not inherit the properties of its parent, but the eltype will be retained.
Functions defined in module actors