|
Back to Table of contents |
General information |
type: class
inherits: GlowViewTransform
module: glowViewTransformGlowViewManipulator is an interactive 3D manipulator component based on the arcball algorithm developed by Ken Shoemake. It supports arcball rotation, translation along the XY plane, and logarithmic scaling.
GLOW programs that render 3D scenes may find GlowViewManipulator useful for allowing user manipulation of the scene transform.
Constants |
State
enum GlowViewManipulator::State idleState
The manipulator is not being moved.enum GlowViewManipulator::State rotatingState
The manipulator is being rotated.enum GlowViewManipulator::State translatingState
The manipulator is being translated.enum GlowViewManipulator::State scalingState
The manipulator is is being scaled.
Methods |
Constructors and destructor
GlowViewManipulator(GlowComponent* parent, const GlowViewManipulatorParams& params)
Creates a new GlowViewManipulator using the given params, and locates it underneath parent in the component hierarchy.GlowViewManipulator(void)
Creates a new GlowViewManipulator but does not initialize it. A component created in this way may not be used until its Init() method is called.void Init(GlowComponent* parent, const GlowViewManipulatorParams& params)
Initializes a new GlowViewManipulator using the given params, and locates it underneath parent in the component hierarchy.virtual ~GlowViewManipulator(void)
The destructor for GlowViewManipulator also recursively deletes the components's children in the hierarchy.Control
void BeginTranslationDrag(GLfloat xn, GLfloat yn) const
Begins translation dragging. Generally you should call this in response to a mouse down event. xn and yn denote the mouse coordinates in OpenGL coordinates (i.e. -1.0 to 1.0, with y increasing moving up).void BeginRotationDrag(GLfloat xn, GLfloat yn) const
Begins rotation dragging. Generally you should call this in response to a mouse down event. xn and yn denote the mouse coordinates in OpenGL coordinates (i.e. -1.0 to 1.0, with y increasing moving up).void BeginScaleDrag(GLfloat xn, GLfloat yn) const
Begins scale dragging. Generally you should call this in response to a mouse down event. xn and yn denote the mouse coordinates in OpenGL coordinates (i.e. -1.0 to 1.0, with y increasing moving up).void InDrag(GLfloat xn, GLfloat yn) const
Continues dragging. Generally you should call this in response to a mouse drag event. xn and yn denote the mouse coordinates in OpenGL coordinates (i.e. -1.0 to 1.0, with y increasing moving up).void EndDrag(GLfloat xn, GLfloat yn) const
Ends dragging. Generally you should call this in response to a mouse up event. xn and yn denote the mouse coordinates in OpenGL coordinates (i.e. -1.0 to 1.0, with y increasing moving up).State and settings
GlowViewManipulator::State GetState(void) const
Returns the current state of the manipulator.bool IsDragging(void) const
Returns true if the manipulator is being dragged. Equivalent to State() != idleState.GlowColor GetColor(void) const
Returns the color used for arc drawing.void SetColor(GlowColor color)
Sets the color used for arc drawing.bool IsDrawing(void) const
Returns true if drawing is active.void SetDrawing(bool draw)
Sets drawing active or inactive.bool IsSpinnable(void) const
Returns true if the manipulator is spinnable.void SetSpinnable(bool spinnable)
Sets the manipulator spinnable or not spinnable.float GetTranslationThrottle(void) const
Returns the current translation throttle.void SetTranslationThrottle(float throttle)
Sets the translation throttle.float GetRotationThrottle(void) const
Returns the current rotation throttle.void SetRotationThrottle(float throttle)
Sets the rotation throttle.float GetScaleThrottle(void) const
Returns the current scale throttle.void SetScaleThrottle(float throttle)
Sets the scale throttle.bool IsAxisConstraintsActive(void) const
Returns true if the manipulator is constrained to certain axes.void SetAxisConstraintsActive(bool active)
Sets the axis constrain option.std::vector<Vec3f>& AxisConstraints(void)
Returns a reference to the current axis constraints list.const std::vector<Vec3f>& AxisConstraints(void) const
Returns a reference to the current axis constraints list.Inherited methods
These methods are inherited from GlowViewTransform.void Set(const Vec3f& trans, const Quatf& rot, GLfloat scale)
void SetTranslation(const Vec3f& trans)
void SetRotation(const Quatf& rot)
void SetScale(GLfloat scale)
void SetIdentity(void)
void AddTranslation(const Vec3f& trans)
void AddRotation(const Quatf& rot)
void AddScale(GLfloat scale)
const Vec3f& GetTranslation(void) const
const Quatf& GetRotation(void) const
GLfloat GetScale(void) const
Vec3f Apply(const Vec3f& vec) const
Vec3f ApplyInverse(const Vec3f& vec) const
void ApplyToGLMatrix(void) const
void ApplyInverseToGLMatrix(void) const
void GetGLMatrixf(GLfloat* matrix) const
void GetMatrix(Mat4f& matrix) const
bool IsSpinning(void) const
void StartSpinning(const Quatf& spin)
void StopSpinning(void)
void StepSpin(void)
GlowTransformData* TransformData(void) const
void ConnectTo(GlowTransformData* transform)
void ConnectTo(GlowViewTransform* transform)
void Disconnect(void)
void RefreshAllConnected(void)
Inherited methods
These methods are inherited from GlowComponent.void Close(void)
GlowComponent* Parent(void) const
GlowSubwindow* WhichWindow(void)
GlowSubwindow* ParentWindow(void) const
GlowWindow* ToplevelWindow(void)
bool IsToplevel(void) const
GlowComponent* Next(void) const
GlowComponent* Prev(void) const
int NumChildren(void) const
GlowComponent* FirstChild(void) const
GlowComponent* LastChild(void) const
void ReorderChild(GlowComponent* child, GlowComponent* pos)
void KillChildren(void)
void Activate(void)
void Deactivate(void)
bool IsActive(void)
bool IsInactive(void)
bool IsActiveStandby(void)
void Paint(void)
Overrideable methods |
Inherited methods
These methods are inherited from GlowComponent.virtual void OnActivate(void)
virtual void OnDeactivate(void)
virtual void OnBeginPaint(void)
This method is overridden by GlowViewTransform to perform the OpenGL transformations. You should not normally override it again.virtual void OnEndPaint(void)
This method is overridden by GlowViewTransform to perform the OpenGL transformations. You should not normally override it again.
|
Back to Table of contents |
The GLOW Toolkit