|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectEventSource
artofillusion.ui.Compound3DManipulator
public class Compound3DManipulator
This class displays a set of curves and handles around a selection in a ViewerCanvas. It processes mouse clicks on them, and translates them into higher level events which are dispatched for further processing, most often by an EditingTool. It presents a composite user interface for performing moving, scaling, and rotating operations.
Nested Class Summary | |
---|---|
static class |
Compound3DManipulator.Axis
Instances of this class represent coordinate axes. |
class |
Compound3DManipulator.HandleDraggedEvent
This is the event class generated when the user drags on a handle. |
class |
Compound3DManipulator.HandleEvent
This is the superclass of the various events generated by the manipulator. |
class |
Compound3DManipulator.HandlePressedEvent
This is the event class generated when the user clicks on a handle. |
class |
Compound3DManipulator.HandleReleasedEvent
This is the event class generated when the user releases on a handle. |
static class |
Compound3DManipulator.HandleType
Instances of this class represent handle types. |
static class |
Compound3DManipulator.ViewMode
Instances of this class represent the different view modes for the manipulator. |
Field Summary | |
---|---|
static Compound3DManipulator.Axis |
ALL
|
static short |
CENTER_INDEX
|
static Compound3DManipulator.HandleType |
MOVE
|
static Compound3DManipulator.Axis |
N
|
static Compound3DManipulator.ViewMode |
NPQ_MODE
|
static Compound3DManipulator.Axis |
P
|
static Compound3DManipulator.Axis |
Q
|
static Compound3DManipulator.HandleType |
ROTATE
|
static short |
ROTATE_INDEX
|
static Compound3DManipulator.HandleType |
SCALE
|
static short |
TOOL_HANDLE
|
static Compound3DManipulator.Axis |
U
|
static Compound3DManipulator.Axis |
UV
|
static short |
UV_EXTRA_INDEX
|
static Compound3DManipulator.ViewMode |
UV_MODE
|
static Compound3DManipulator.Axis |
V
|
static Compound3DManipulator.Axis |
W
|
static Compound3DManipulator.Axis |
X
|
static short |
X_MOVE_INDEX
|
static short |
X_SCALE_INDEX
|
static Compound3DManipulator.ViewMode |
XYZ_MODE
|
static Compound3DManipulator.Axis |
Y
|
static short |
Y_MOVE_INDEX
|
static short |
Y_SCALE_INDEX
|
static Compound3DManipulator.Axis |
Z
|
static short |
Z_MOVE_INDEX
|
static short |
Z_SCALE_INDEX
|
Constructor Summary | |
---|---|
Compound3DManipulator()
Create a new manipulator. |
Method Summary | |
---|---|
void |
draw(ViewerCanvas view,
BoundingBox selectionBounds)
Draw the handles onto a ViewerCanvas. |
java.awt.Rectangle |
findScreenBounds(BoundingBox b,
Camera cam)
Given a bounding box in view coordinates, find the corresponding rectangle in screen coordinates. |
Vec3 |
getAxisDirection(Compound3DManipulator.Axis axis,
ViewerCanvas view)
Get the direction of a particular axis. |
Compound3DManipulator.HandleType |
getHandleTypeAtLocation(java.awt.Point location,
ViewerCanvas view,
BoundingBox selectionBounds)
Get the type of handle which is displayed at a location. |
boolean |
getRotateAroundSelectionCenter()
Get whether rotations should be performed around the select center or around the origin. |
Compound3DManipulator.ViewMode |
getViewMode()
Get the current view mode. |
void |
mouseDragged(WidgetMouseEvent ev,
ViewerCanvas view)
Respond to mouse drags in the canvas. |
boolean |
mousePressed(WidgetMouseEvent ev,
ViewerCanvas view,
BoundingBox selectionBounds)
Respond to mouse presses in the canvas. |
void |
mousePressedOnHandle(WidgetMouseEvent ev,
ViewerCanvas view,
BoundingBox selectionBounds,
Vec3 handleLocation)
|
void |
mouseReleased(WidgetMouseEvent ev,
ViewerCanvas view)
Respond to mouse releases in the canvas. |
void |
setNPQAxes(Vec3 nDir,
Vec3 pDir,
Vec3 qDir)
Set the axis directions to be used in NPQ mode. |
void |
setRotateAroundSelectionCenter(boolean rotateAroundSelectionCenter)
Set whether rotations should be performed around the select center or around the origin. |
void |
setViewMode(Compound3DManipulator.ViewMode mode)
Set the view mode. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Compound3DManipulator.ViewMode XYZ_MODE
public static final Compound3DManipulator.ViewMode UV_MODE
public static final Compound3DManipulator.ViewMode NPQ_MODE
public static final short X_MOVE_INDEX
public static final short X_SCALE_INDEX
public static final short Y_MOVE_INDEX
public static final short Y_SCALE_INDEX
public static final short Z_MOVE_INDEX
public static final short Z_SCALE_INDEX
public static final short CENTER_INDEX
public static final short ROTATE_INDEX
public static final short TOOL_HANDLE
public static final short UV_EXTRA_INDEX
public static final Compound3DManipulator.Axis X
public static final Compound3DManipulator.Axis Y
public static final Compound3DManipulator.Axis Z
public static final Compound3DManipulator.Axis U
public static final Compound3DManipulator.Axis V
public static final Compound3DManipulator.Axis W
public static final Compound3DManipulator.Axis UV
public static final Compound3DManipulator.Axis N
public static final Compound3DManipulator.Axis P
public static final Compound3DManipulator.Axis Q
public static final Compound3DManipulator.Axis ALL
public static final Compound3DManipulator.HandleType MOVE
public static final Compound3DManipulator.HandleType ROTATE
public static final Compound3DManipulator.HandleType SCALE
Constructor Detail |
---|
public Compound3DManipulator()
Method Detail |
---|
public Compound3DManipulator.ViewMode getViewMode()
public void setViewMode(Compound3DManipulator.ViewMode mode)
public boolean getRotateAroundSelectionCenter()
public void setRotateAroundSelectionCenter(boolean rotateAroundSelectionCenter)
public void setNPQAxes(Vec3 nDir, Vec3 pDir, Vec3 qDir)
public Vec3 getAxisDirection(Compound3DManipulator.Axis axis, ViewerCanvas view)
public Compound3DManipulator.HandleType getHandleTypeAtLocation(java.awt.Point location, ViewerCanvas view, BoundingBox selectionBounds)
public void draw(ViewerCanvas view, BoundingBox selectionBounds)
draw
in interface Manipulator
view
- the canvas onto which to draw the handlesselectionBounds
- a BoundingBox enclosing whatever is selected in the canvaspublic boolean mousePressed(WidgetMouseEvent ev, ViewerCanvas view, BoundingBox selectionBounds)
Manipulator
mousePressed
in interface Manipulator
ev
- the event which has occurredview
- the canvas this manipulator is displayed inselectionBounds
- a bounding box containing everything that is selected in the canvas
public void mousePressedOnHandle(WidgetMouseEvent ev, ViewerCanvas view, BoundingBox selectionBounds, Vec3 handleLocation)
public void mouseDragged(WidgetMouseEvent ev, ViewerCanvas view)
Manipulator
mouseDragged
in interface Manipulator
ev
- the event which has occurredview
- the canvas this manipulator is displayed inpublic void mouseReleased(WidgetMouseEvent ev, ViewerCanvas view)
Manipulator
mouseReleased
in interface Manipulator
ev
- the event which has occurredview
- the canvas this manipulator is displayed inpublic java.awt.Rectangle findScreenBounds(BoundingBox b, Camera cam)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |