#include <sprk.h>

Inheritance diagram for HPS::Operator:
HPS::Sprocket HPS::Object HPS::AnnotationOperator HPS::AxisTriadOperator HPS::ConstructRectangleOperator HPS::Exchange::CommonMeasurementOperator HPS::FlyOperator HPS::HandlesOperator HPS::MarkupOperator HPS::MouseWheelOperator HPS::NavigationCubeOperator HPS::OrbitOperator HPS::PanOperator HPS::PanOrbitZoomOperator HPS::RelativeOrbitOperator HPS::SelectOperator HPS::TurntableOperator HPS::ZoomFitTouchOperator HPS::ZoomOperator SpaceMouseOperator

Public Types

enum  Priority { Low, Default, High }
 

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)
 
HPS::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 OnTextInput (HPS::UTF8 const &in_text)
 
virtual bool OnTimerTick (HPS::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 (HPS::View const &in_attached_view)
 
virtual void OnViewDetached (HPS::View const &in_detached_view)
 
 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 HPS::Sprocket
 Sprocket (Sprocket &&in_that)
 
- Public Member Functions inherited from HPS::Object
virtual bool Empty () const
 
intptr_t GetClassID () const
 
intptr_t GetInstanceID () const
 
bool HasType (HPS::Type in_mask) const
 
 Object (Object const &that)
 
 Object (Object &&in_that)
 
Objectoperator= (Object const &other_object)
 
Objectoperator= (Object &&in_that)
 
virtual void Reset ()
 
virtual HPS::Type Type () const
 

Static Public Attributes

static const HPS::Type staticType = HPS::Type::Operator
 
- Static Public Attributes inherited from HPS::Object
static const HPS::Type staticType = HPS::Type::None
 

Protected Attributes

HPS::ModifierKeys modifier_trigger
 
HPS::MouseButtons mouse_trigger
 

Additional Inherited Members

- Static Public Member Functions inherited from HPS::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

◆ Assign()

virtual void HPS::Operator::Assign ( Operator const &  in_that)
virtual

Assigns the parameter in_that to this operator, resulting in a clone.

◆ DetachView()

void HPS::Operator::DetachView ( )

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

◆ Equals()

virtual bool HPS::Operator::Equals ( Operator const &  in_that) const
virtual

Tests this operator for equality against the parameter in_that. Same as Operator::operator==

◆ GetAttachedView()

View HPS::Operator::GetAttachedView ( ) const

Returns the View the Operator is currently attached to.

◆ GetModifierTrigger()

ModifierKeys HPS::Operator::GetModifierTrigger ( ) const
inline

Gets the modifier trigger associated with this operator.

◆ GetMouseTrigger()

MouseButtons HPS::Operator::GetMouseTrigger ( ) const
inline

Gets the mouse trigger associated with this operator.

◆ GetName()

◆ IsMouseTriggered()

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

Returns true if the MouseButtons and ModifierKeys are active.

Reimplemented in HPS::SimpleWalkOperator.

◆ ObjectType()

HPS::Type HPS::Operator::ObjectType ( ) const
inlinevirtual

This function returns the type the object, as declared (if the object is derived, this does not give the true type of the derived object).

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

Reimplemented from HPS::Object.

◆ OnKeyDown()

virtual bool HPS::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 HPS::Exchange::MeasurementOperator, HPS::AnnotationOperator, HPS::MarkupOperator, HPS::SimpleWalkOperator, and HPS::FlyOperator.

◆ OnKeyUp()

virtual bool HPS::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 HPS::SimpleWalkOperator, and HPS::FlyOperator.

◆ OnModelAttached()

virtual void HPS::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 HPS::NavigationCubeOperator, HPS::CuttingSectionOperator, HPS::SimpleWalkOperator, HPS::WalkOperator, HPS::FlyOperator, HPS::MouseWheelOperator, and SpaceMouseOperator.

◆ OnModelDetached()

virtual void HPS::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.

◆ OnMouseDown()

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

◆ OnMouseEnter()

virtual bool HPS::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.

Reimplemented in HPS::SimpleWalkOperator.

◆ OnMouseLeave()

virtual bool HPS::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.

Reimplemented in HPS::SimpleWalkOperator.

◆ OnMouseMove()

virtual bool HPS::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 HPS::Exchange::MeasurementOperator, HPS::NavigationCubeOperator, HPS::AxisTriadOperator, HPS::HandlesOperator, HPS::AnnotationOperator, HPS::MarkupOperator, HPS::CuttingSectionOperator, HPS::SimpleWalkOperator, HPS::FlyOperator, HPS::TurntableOperator, HPS::ConstructRectangleOperator, HPS::ZoomOperator, HPS::RelativeOrbitOperator, HPS::OrbitOperator, HPS::PanOperator, and HPS::PanOrbitZoomOperator.

◆ OnMouseUp()

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

◆ OnMouseWheel()

virtual bool HPS::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 HPS::SimpleWalkOperator, HPS::FlyOperator, HPS::TurntableOperator, and HPS::MouseWheelOperator.

◆ OnTextInput()

virtual bool HPS::Operator::OnTextInput ( HPS::UTF8 const &  in_text)
inlinevirtual

This function is called whenever HPS receives a TextInputEvent that signals text was entered.

Parameters
in_textThe text entered.
Returns
true if the input event was handled, false otherwise.

Reimplemented in HPS::AnnotationOperator, and HPS::MarkupOperator.

◆ OnTimerTick()

virtual bool HPS::Operator::OnTimerTick ( HPS::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 HPS::CuttingSectionOperator, HPS::SimpleWalkOperator, HPS::WalkOperator, HPS::FlyOperator, and SpaceMouseOperator.

◆ OnTouchDown()

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

◆ OnTouchMove()

virtual bool HPS::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 HPS::Exchange::MeasurementOperator, HPS::NavigationCubeOperator, HPS::AxisTriadOperator, HPS::HandlesOperator, HPS::AnnotationOperator, HPS::MarkupOperator, HPS::CuttingSectionOperator, HPS::SimpleWalkOperator, HPS::FlyOperator, HPS::TurntableOperator, HPS::ConstructRectangleOperator, HPS::ZoomOperator, HPS::RelativeOrbitOperator, HPS::OrbitOperator, HPS::PanOperator, and HPS::PanOrbitZoomOperator.

◆ OnTouchUp()

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

◆ OnViewAttached()

virtual void HPS::Operator::OnViewAttached ( HPS::View const &  in_attached_view)
inlinevirtual

◆ OnViewDetached()

virtual void HPS::Operator::OnViewDetached ( HPS::View const &  in_detached_view)
inlinevirtual

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

Parameters
in_detached_viewThe view detached from this operator.

Reimplemented in HPS::Exchange::MeasurementOperator, HPS::Exchange::CommonMeasurementOperator, HPS::NavigationCubeOperator, HPS::HandlesOperator, HPS::AnnotationOperator, HPS::MarkupOperator, HPS::CuttingSectionOperator, and HPS::FlyOperator.

◆ operator!=()

virtual bool HPS::Operator::operator!= ( Operator const &  in_that) const
virtual

Tests this operator for non-equality against the parameter in_that.

◆ operator==()

virtual bool HPS::Operator::operator== ( Operator const &  in_that) const
virtual

Tests this operator for equality against the parameter in_that. Same as Operator::Equals.

◆ SetModifierTrigger()

void HPS::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.

◆ SetMouseTrigger()

void HPS::Operator::SetMouseTrigger ( MouseButtons  in_buttons)
inline

Sets the mouse trigger for this operator


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