OpenGL actors for populating the 3D scene.
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
Actor objects have the following methods:
An Actor translated to another position.
Methods
TranslatedActor objects have the following methods:
An Actor rotated to another position.
Methods
Created a new rotated actor.
If rot is an array with shape (3,), the rotation is specified by the direction of the local 0 axis of the actor. If rot is an array with shape (4,4), the rotation is specified by the direction of the local 0, 1 and 2 axes of the actor.
Methods
RotatedActor objects have the following methods:
An OpenGL actor with cubic shape and 6 colored sides.
Methods
CubeActor objects have the following methods:
Draws a bbox.
Methods
BboxActor objects have the following methods:
An OpenGL actor representing a triade of global axes.
Methods
TriadeActor objects have the following methods:
Draws a (set of) grid(s) in one of the coordinate planes.
Methods
GridActor objects have the following methods:
Draws a set of 3 coordinate planes.
Methods
CoordPlaneActor objects have the following methods:
A plane in a 3D scene.
Methods
A plane perpendicular to the x-axis at the origin.
Methods
PlaneActor objects have the following methods:
An OpenGL actor representing a geometrical model.
The model can either be in Formex or Mesh format.
Methods
Create a geometry actor.
The geometry is either in Formex model: a coordinate block with shape (nelems,nplex,3), or in Mesh format: a coordinate block with shape (npoints,3) and an elems block with shape (nelems,nplex).
In both cases, an eltype may be specified if the default is not suitable. Default eltypes are Point for plexitude 1, Line for plexitude 2 and Triangle for plexitude 3 and Polygon for all higher plexitudes. Actually, Triangle is just a special case of Polygon.
Here is a list of possible eltype values (which should match the corresponding plexitude):
plexitude | eltype | element type |
---|---|---|
1 | point3d | a 3D cube with 6 differently colored faces
is drawn at each point
|
4 | tet4 | a tetrahedron |
6 | wedge6 | a wedge (triangular prism) |
8 | hex8 | a hexahedron |
The colors argument specifies a list of OpenGL colors for each of the property values in the Formex. If the list has less values than the PropSet, it is wrapped around. It can also be a single OpenGL color, which will be used for all elements. For surface type elements, a bkcolor color can be given for the backside (inside) of the surface. Default will be the same as the front color. The user can specify a linewidth to be used when drawing in wireframe mode.
Methods
GeomActor objects have the following methods:
Set the mark size.
The mark size is currently only used with plex-1 Formices.
Draw the formex.
if color is None, it is drawn with the color specified on creation. if color == ‘prop’ and a colormap was installed, props define color. else, color should be an array of RGB values, either with shape (3,) for a single color, or (nelems,3) for differently colored elements
if mode ends with wire (smoothwire or flatwire), two drawing operations are done: one with wireframe and color black, and one with mode[:-4] and self.color.
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.