Shapes 3D  3.0
 All Classes Functions Variables Pages
shapes3d.utils.ShapeInspector Class Reference
Inheritance diagram for shapes3d.utils.ShapeInspector:

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)
 

Detailed Description

An instance of this class can be used to inspect some parts of the shapes internal state

Author
Peter Lager

Constructor & Destructor Documentation

shapes3d.utils.ShapeInspector.ShapeInspector ( PApplet  papp,
float  x,
float  y 
)

Create a ShapeInspector instance at the given posin.

Parameters
pappthe PApplet object to hook into for key events
xhorizontal position of top-left corner of the interface
yvertical position of top-left corner of the interface

Member Function Documentation

void shapes3d.utils.ShapeInspector.draw ( PGraphics  pg)

Only display the inspector if it linked to a shape and the user has made it visible.

Parameters
pgthe graphics context
boolean shapes3d.utils.ShapeInspector.isVisible ( )
Returns
true if visible
void shapes3d.utils.ShapeInspector.keyEvent ( KeyEvent  event)

Handle key event passed from Processing

Parameters
eventkey event from Processing
void shapes3d.utils.ShapeInspector.move ( float  x,
float  y 
)

Move the inspector to another position

Parameters
xnew horizontal position
ynew vertical position
void shapes3d.utils.ShapeInspector.observeShape ( Shape3D  shape)

Sets the shape to be linked to this inspector. It will start with part 0.

Parameters
shapethe 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.

Parameters
shapethe 3D shape
partNothe 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

Parameters
visibletrue to make it visible else false

The documentation for this class was generated from the following file: