< Home

< Table of Contents

REFERENCE MANUAL

Operator Class Reference

#include <sprk.h>

Inheritance diagram for Operator:
Sprocket Object AxisTriadOperator ConstructRectangleOperator FlyOperator MouseWheelOperator NavigationCubeOperator OrbitOperator PanOperator PanOrbitZoomOperator RelativeOrbitOperator SelectOperator TurntableOperator ZoomFitTouchOperator ZoomOperator

Public Types

enum  Priority { Low, Normal, High }
 
- Public Types inherited from Sprocket
enum  UpdateType { Synchronous, Asynchronous }
 

Public Member Functions

virtual void Assign (Operator const &in_that)
 
void DetachView ()
 
virtual bool Equals (Operator const &in_that) const
 
View GetAttachedView () const
 
ModifierKeys GetModifierTrigger () const
 
MouseButtons GetMouseTrigger () const
 
virtual UTF8 GetName () const
 
virtual bool IsMouseTriggered (MouseState const &in_state)
 
Type ObjectType () const
 
virtual bool OnKeyDown (KeyboardState const &in_state)
 
virtual bool OnKeyUp (KeyboardState const &in_state)
 
virtual void OnModelAttached ()
 
virtual void OnModelDetached ()
 
virtual bool OnMouseDown (MouseState const &in_state)
 
virtual bool OnMouseEnter (MouseState const &in_state)
 
virtual bool OnMouseLeave (MouseState const &in_state)
 
virtual bool OnMouseMove (MouseState const &in_state)
 
virtual bool OnMouseUp (MouseState const &in_state)
 
virtual bool OnMouseWheel (MouseState const &in_state)
 
virtual bool OnTimerTick (TimerTickEvent const &in_event)
 
virtual bool OnTouchDown (TouchState const &in_state)
 
virtual bool OnTouchMove (TouchState const &in_state)
 
virtual bool OnTouchUp (TouchState const &in_state)
 
virtual void OnViewAttached ()
 
virtual void OnViewDetached ()
 
 Operator (MouseButtons in_mouse_trigger=MouseButtons::ButtonLeft(), ModifierKeys in_modifier_trigger=ModifierKeys())
 
 Operator (Operator const &in_that)
 
virtual bool operator!= (Operator const &in_that) const
 
virtual Operatoroperator= (Operator const &in_that)
 
virtual bool operator== (Operator const &in_that) const
 
void SetModifierTrigger (ModifierKeys in_modifiers)
 
void SetMouseTrigger (MouseButtons in_buttons)
 
- Public Member Functions inherited from Sprocket
 Sprocket (Sprocket &&in_that)
 
- Public Member Functions inherited from Object
virtual bool Empty () const
 
intptr_t GetClassID () const
 
intptr_t GetInstanceID () const
 
bool HasType (Type in_mask) const
 
 Object (Object &&in_that)
 
Objectoperator= (Object const &other_object)
 
Objectoperator= (Object &&in_that)
 
virtual void Reset ()
 
Type Type () const
 

Protected Attributes

ModifierKeys modifier_trigger
 
MouseButtons mouse_trigger
 

Additional Inherited Members

- Static Public Member Functions inherited from Object
template<typename T >
static intptr_t ClassID ()
 

Detailed Description

The Operator class is the base class for classes which handle under input and operate on the scene. This class handles GUI events such as key presses, mouse movement and clicks, and touches

Member Function Documentation

void Operator::DetachView ( )

Detaches the Operator from the View it was previously attached to.

View Operator::GetAttachedView ( ) const

Returns the View the Operator is currently attached to.

ModifierKeys Operator::GetModifierTrigger ( ) const
inline

Gets the modifier trigger associated with this operator.

MouseButtons Operator::GetMouseTrigger ( ) const
inline

Gets the mouse trigger associated with this operator.

virtual bool Operator::IsMouseTriggered ( MouseState const &  in_state)
inlinevirtual
Type Operator::ObjectType ( ) const
inlinevirtual

This function returns the type the object, as declared. This does not necessarily give the true type of the underlying object.

Returns
The declared type of the object in question, which may differ from the true, underlying type.

Reimplemented from Object.

virtual bool Operator::OnKeyDown ( KeyboardState const &  in_state)
inlinevirtual

This function is called whenever HPS receives a KeyboardEvent that signals a key was pressed.

Parameters
in_stateA KeyboardState object describing the current keyboard state.
Returns
true if the input event was handled, false otherwise.

Reimplemented in SimpleWalkOperator, and FlyOperator.

virtual bool Operator::OnKeyUp ( KeyboardState const &  in_state)
inlinevirtual

This function is called whenever HPS receives a KeyboardEvent that signals a key was released.

Parameters
in_stateA KeyboardState object describing the current keyboard state.
Returns
true if the input event was handled, false otherwise.

Reimplemented in SimpleWalkOperator, and FlyOperator.

virtual void Operator::OnModelAttached ( )
inlinevirtual

This function is called whenever a model is attached to the view that is attached to this operator. If no view is attached to this operator, this function will not be called.

Reimplemented in NavigationCubeOperator, CuttingSectionOperator, FlyOperator, and MouseWheelOperator.

virtual void Operator::OnModelDetached ( )
inlinevirtual

This function is called whenever a model is detached from the view that is attached to this operator. If no view is attached to this operator, this function will not be called.

virtual bool Operator::OnMouseDown ( MouseState const &  in_state)
inlinevirtual

This function is called whenever HPS receives a MouseEvent that signals a mouse button was pressed.

Parameters
in_stateA MouseState object describing the current mouse state.
Returns
true if the input event was handled, false otherwise.

Reimplemented in NavigationCubeOperator, AxisTriadOperator, CuttingSectionOperator, SimpleWalkOperator, FlyOperator, TurntableOperator, HighlightOperator, SelectOperator, ConstructRectangleOperator, ZoomOperator, RelativeOrbitOperator, OrbitOperator, PanOperator, and PanOrbitZoomOperator.

virtual bool Operator::OnMouseEnter ( MouseState const &  in_state)
inlinevirtual

This function is called whenever HPS receives a MouseEvent that signals the mouse entered the window.

Parameters
in_stateA MouseState object describing the current mouse state.
Returns
true if the input event was handled, false otherwise.
virtual bool Operator::OnMouseLeave ( MouseState const &  in_state)
inlinevirtual

This function is called whenever HPS receives a MouseEvent that signals the mouse left the window.

Parameters
in_stateA MouseState object describing the current mouse state.
Returns
true if the input event was handled, false otherwise.
virtual bool Operator::OnMouseMove ( MouseState const &  in_state)
inlinevirtual

This function is called whenever HPS receives a MouseEvent that signals the mouse moved

Parameters
in_stateA MouseState object describing the current mouse state.
Returns
true if the input event was handled, false otherwise.

Reimplemented in NavigationCubeOperator, AxisTriadOperator, CuttingSectionOperator, SimpleWalkOperator, FlyOperator, TurntableOperator, ConstructRectangleOperator, ZoomOperator, RelativeOrbitOperator, OrbitOperator, PanOperator, and PanOrbitZoomOperator.

virtual bool Operator::OnMouseUp ( MouseState const &  in_state)
inlinevirtual

This function is called whenever HPS receives a MouseEvent that signals a mouse button was released.

Parameters
in_stateA MouseState object describing the current mouse state.
Returns
true if the input event was handled, false otherwise.

Reimplemented in NavigationCubeOperator, AxisTriadOperator, CuttingSectionOperator, SimpleWalkOperator, FlyOperator, TurntableOperator, HighlightAreaOperator, SelectAreaOperator, ZoomBoxOperator, ConstructRectangleOperator, ZoomOperator, RelativeOrbitOperator, OrbitOperator, PanOperator, and PanOrbitZoomOperator.

virtual bool Operator::OnMouseWheel ( MouseState const &  in_state)
inlinevirtual

This function is called whenever HPS receives a MouseEvent that signals the mouse wheel was scrolled.

Parameters
in_stateA MouseState object describing the current mouse state.
Returns
true if the input event was handled, false otherwise.

Reimplemented in SimpleWalkOperator, FlyOperator, TurntableOperator, and MouseWheelOperator.

virtual bool Operator::OnTimerTick ( TimerTickEvent const &  in_event)
inlinevirtual

This function is called whenever HPS receives a TimerTickEvent.

Parameters
in_eventA TimerTickEvent object describing the current event state.
Returns
true if the input event was handled, false otherwise.

Reimplemented in CuttingSectionOperator, SimpleWalkOperator, WalkOperator, and FlyOperator.

virtual bool Operator::OnTouchDown ( TouchState const &  in_state)
inlinevirtual

This function is called whenever HPS receives a TouchEvent that signals the device was touched.

Parameters
in_stateA TouchState object describing the current touch state.
Returns
true if the input event was handled, false otherwise.

Reimplemented in NavigationCubeOperator, AxisTriadOperator, CuttingSectionOperator, SimpleWalkOperator, FlyOperator, ZoomFitTouchOperator, TurntableOperator, HighlightOperator, SelectOperator, ConstructRectangleOperator, ZoomOperator, RelativeOrbitOperator, OrbitOperator, PanOperator, and PanOrbitZoomOperator.

virtual bool Operator::OnTouchMove ( TouchState const &  in_state)
inlinevirtual

This function is called whenever HPS receives a TouchEvent that signals a point of contact has moved.

Parameters
in_stateA TouchState object describing the current touch state.
Returns
true if the input event was handled, false otherwise.

Reimplemented in NavigationCubeOperator, AxisTriadOperator, CuttingSectionOperator, SimpleWalkOperator, FlyOperator, TurntableOperator, ConstructRectangleOperator, ZoomOperator, RelativeOrbitOperator, OrbitOperator, PanOperator, and PanOrbitZoomOperator.

virtual bool Operator::OnTouchUp ( TouchState const &  in_state)
inlinevirtual

This function is called whenever HPS receives a TouchEvent that signals a point of contact has been released.

Parameters
in_stateA TouchState object describing the current touch state.
Returns
true if the input event was handled, false otherwise.

Reimplemented in NavigationCubeOperator, AxisTriadOperator, CuttingSectionOperator, SimpleWalkOperator, FlyOperator, ZoomFitTouchOperator, TurntableOperator, HighlightAreaOperator, SelectAreaOperator, ZoomBoxOperator, ConstructRectangleOperator, RelativeOrbitOperator, OrbitOperator, PanOperator, and PanOrbitZoomOperator.

virtual void Operator::OnViewAttached ( )
inlinevirtual

This function is called whenever a view is attached to this operator.

Reimplemented in NavigationCubeOperator, AxisTriadOperator, CuttingSectionOperator, WalkOperator, FlyOperator, HighlightAreaOperator, SelectAreaOperator, and ConstructRectangleOperator.

virtual void Operator::OnViewDetached ( )
inlinevirtual

This function is called whenever a view is detached from this operator.

Reimplemented in NavigationCubeOperator, AxisTriadOperator, CuttingSectionOperator, and FlyOperator.

void Operator::SetModifierTrigger ( ModifierKeys  in_modifiers)
inline

Sets the modifier trigger associated with this operator.

Parameters
in_modifiersThe modifier keys that are used to trigger this operator.
void Operator::SetMouseTrigger ( MouseButtons  in_buttons)
inline

Sets the mouse trigger for this operator


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