Shapes 3D
3.0
|
Public Member Functions | |
ShapeInspector (PApplet papp, float x, float y) | |
void | keyEvent (KeyEvent event) |
void | pre () |
void | observeShape (Shape3D shape) |
void | observeShape (Shape3D shape, int partNo) |
void | visible (boolean visible) |
boolean | isVisible () |
void | move (float x, float y) |
void | draw (PGraphics pg) |
An instance of this class can be used to inspect some parts of the shapes internal state
shapes3d.utils.ShapeInspector.ShapeInspector | ( | PApplet | papp, |
float | x, | ||
float | y | ||
) |
Create a ShapeInspector instance at the given posin.
papp | the PApplet object to hook into for key events |
x | horizontal position of top-left corner of the interface |
y | vertical position of top-left corner of the interface |
void shapes3d.utils.ShapeInspector.draw | ( | PGraphics | pg | ) |
Only display the inspector if it linked to a shape and the user has made it visible.
pg | the graphics context |
boolean shapes3d.utils.ShapeInspector.isVisible | ( | ) |
void shapes3d.utils.ShapeInspector.keyEvent | ( | KeyEvent | event | ) |
Handle key event passed from Processing
event | key event from Processing |
void shapes3d.utils.ShapeInspector.move | ( | float | x, |
float | y | ||
) |
Move the inspector to another position
x | new horizontal position |
y | new vertical position |
void shapes3d.utils.ShapeInspector.observeShape | ( | Shape3D | shape | ) |
Sets the shape to be linked to this inspector. It will start with part 0.
shape | the shape to inspect |
void shapes3d.utils.ShapeInspector.observeShape | ( | Shape3D | shape, |
int | partNo | ||
) |
Set the shape and part number to be displayed in the inspector. The partNo will be constrained to a valid value.
shape | the 3D shape |
partNo | the part to examine |
void shapes3d.utils.ShapeInspector.pre | ( | ) |
Do not call directly. This method is called once per frame by Processing and updates the inspector.
void shapes3d.utils.ShapeInspector.visible | ( | boolean | visible | ) |
Show / hide the inspector
visible | true to make it visible else false |