16. marks — OpenGL marks for annotating 3D actors.

OpenGL marks for annotating 3D actors.

class marks.Mark(pos)

A 2D drawing inserted at a 3D position of the scene.

The minimum attributes and methods are:
pos : 3D point where the mark will be drawn draw() : function to draw the mark

Mark objects have the following methods:

class marks.AxesMark(pos, color=None)

Two viewport axes drawn at a 3D position.

AxesMark objects have the following methods:

drawGL(mode='wireframe', color=None)
class marks.TextMark(pos, text, color=None, font=None, size=None)

A text drawn at a 3D position.

TextMark objects have the following methods:

drawGL(mode=None, color=None)
use_list()
class marks.MarkList(pos, val, color=(0.0, 0.0, 0.0), font='sans', size=18, leader='')

A list of numbers drawn at 3D positions.

Create a number list.

pos is an (N,3) array of positions. val is an (N,) array of marks to be plot at those positions.

While intended to plot integer numbers, val can be any object that allows index operations for the required length N and allows its items to be formatted as a string.

MarkList objects have the following methods:

draw(mode=None, color=None)
drawpick()
This functions mimicks the drawing of a number list for picking.

Documentation

Previous topic

15. decors — 2D decorations for the OpenGL canvas.

Next topic

17. gluttext — 2D text decorations using GLUT fonts

This Page