A tool for drawing in 3D space or on object surfaces. The following command creates a Pencil object:
Command |
pencil.Pencil(startColor=viz.RED) |
The following methods are available on the Pencil object:
Method |
Description |
<Pencil>.cycleColor() |
Each time this command is called the next color in the cycle list becomes the drawing color. The cycle list consists of viz.RED, viz.BLUE, viz.GREEN, viz.PURPLE, and viz.YELLOW. |
<Pencil>.setColor(color) |
color: A list of normalized R,G,B values (e.g. [0.1,0.2,0.3], viz.BLUE) |
<Pencil>.draw() |
Draws in mid air. |
<Pencil>.project() |
Projects the drawing onto a surface. |
<Pencil>.clear() |
Clears the drawing. |
<Pencil>.remove() |
Removes the tool. |
<Pencil>.setUpdateFunction(updateFunction) |
Sets the update function that gets called every frame. The update function calls methods on the tool based on the state of input devices. |