Manipulator Class Reference
[GUI]

Abstract base class for an item that manipulates other items. More...

#include <Manipulator.hpp>

Inheritance diagram for Manipulator:
Identifiable

List of all members.

Public Member Functions

 Manipulator (char axis, int command, string filename, float bias=1.0, const string &warning="May not be able to use manipulator.")
virtual ~Manipulator ()
virtual void draw (Transformable *transformable, Canvas *canvas) const
virtual Vector getAxis () const
virtual int getCommand () const
virtual bool isEnabled () const
virtual void setEnabled (bool enabled)
virtual void setDelegate (Delegate *delegate)
virtual void use (const Vector &movement, GLuint shapeID, Canvas *canvas)

Static Public Member Functions

static float findPixelFactor (Canvas *canvas, GLuint shapeID)

Protected Attributes

bool enabled
float bias
int command
Delegatedelegate
Scenewidget
Traversertraverser
Vector axis
Vector offset
Canvascanvas

Detailed Description

Abstract base class for an item that manipulates other items.


Constructor & Destructor Documentation

Manipulator ( char  axis,
int  command,
string  filename,
float  bias = 1.0,
const string &  warning = "May not be able to use manipulator." 
)

Creates a manipulator that cannot send commands yet.

Parameters:
axis Either 'x', 'y', or 'z'.
command Command to run.
filename Path in data directory containing widget geometry.
bias Multiplier to the default movement amount.
warning Text to print if cannot find widget file.
~Manipulator (  )  [virtual]

Cleans up the widget.


Member Function Documentation

void draw ( Transformable transformable,
Canvas canvas 
) const [virtual]

Draws the manipulator around transformable in canvas.

float findPixelFactor ( Canvas canvas,
GLuint  shapeID 
) [static]

Calculates how a pixel compares to a global unit.

Parameters:
canvas Canvas to take camera position from.
shapeID ID of the shape to use for the depth component.
Vector getAxis (  )  const [inline, virtual]
Returns:
Direction the manipulator is oriented in.
int getCommand (  )  const [inline, virtual]
Returns:
Enumerated command to run when the user drags the manipulator.
bool isEnabled (  )  const [inline, virtual]
Returns:
True if the manipulator should be drawn.
void setDelegate ( Delegate i  )  [inline, virtual]

Changes the object to send commands to.

void setEnabled ( bool  enabled  )  [inline, virtual]

Determines if the manipulator should be drawn.

void use ( const Vector movement,
GLuint  shapeID,
Canvas canvas 
) [virtual]

Use the manipulator.

Parameters:
movement Difference between current and last cursor positions.
shapeID ID of the shape the manipulator is attached to.
canvas Canvas to take camera position from.

The documentation for this class was generated from the following files:
Generated on Wed Jun 9 01:36:36 2010 for Gander by  doxygen 1.6.3