Hoops Visualize HPS  version 2018-SP2
Hoops Visualize HPS 3D Rendering Engine
Looking for a senior C++ dev?
I'm looking for work. Hire me!
HPS::FlyOperator Class Reference

The FlyOperator class defines an operator which allows the user to accurately move the camera around the scene. More...

#include <sprk_ops.h>

Inheritance diagram for HPS::FlyOperator:
Collaboration diagram for HPS::FlyOperator:

Public Types

enum  Priority {
  Priority::Low,
  Priority::Default,
  Priority::High
}
 

Public Member Functions

 FlyOperator (MouseButtons in_mouse_trigger=MouseButtons::ButtonRight(), ModifierKeys in_modifier_trigger=ModifierKeys())
 
virtual HPS::UTF8 GetName () const
 Returns the name of the operator. More...
 
virtual bool OnKeyDown (KeyboardState const &in_state)
 This function is called whenever HPS receives a KeyboardState event that signals a button was pressed. More...
 
virtual bool OnKeyUp (KeyboardState const &in_state)
 This function is called whenever HPS receives a KeyboardState event that signals a button was released. More...
 
virtual bool OnMouseDown (MouseState const &in_state)
 This function is called whenever HPS receives a MouseEvent that signals a mouse button was pressed. More...
 
virtual bool OnMouseUp (MouseState const &in_state)
 This function is called whenever HPS receives a MouseEvent that signals a mouse button was released. More...
 
virtual bool OnMouseMove (MouseState const &in_state)
 This function is called whenever HPS receives a MouseEvent that signals the mouse moved This function rotates the camera in place if the right mouse button is down. More...
 
virtual bool OnMouseWheel (MouseState const &in_state)
 This function is called whenever HPS receives a MouseEvent that signals the mouse wheel moved If shift is not pressed this function increases or decreases the step length. More...
 
virtual bool OnTouchDown (TouchState const &in_state)
 This function is called whenever HPS receives a TouchEvent that signals the device was touched. More...
 
virtual bool OnTouchUp (TouchState const &in_state)
 This function is called whenever HPS receives a TouchEvent that signals a point of contact has been released. More...
 
virtual bool OnTouchMove (TouchState const &in_state)
 This function is called whenever HPS receives a TouchEvent that signals a point of contact has moved. More...
 
virtual bool OnTimerTick (HPS::TimerTickEvent const &in_event)
 This function is called whenever HPS receives a TimerTickEvent This function moves the camera. More...
 
virtual void OnModelAttached ()
 This function is called whenever a model is attached to the view that is attached to this operator. More...
 
virtual void OnViewAttached ()
 This function is called whenever a view is attached to this operator. More...
 
virtual void OnViewDetached ()
 This function is called whenever a view is detached from this operator. More...
 
void InvertXAxis ()
 
void InvertYAxis ()
 
bool IsXAxisInverted () const
 
bool IsYAxisInverted () const
 
float GetKeyboardSensitivity () const
 
void SetKeyboardSensitivity (float in_keyboard_sensitivity)
 
float GetMouseSensitivity () const
 
void SetMouseSensitivity (float in_mouse_sensitivity)
 
float GetLeftJoystickSensitivity () const
 
void SetLeftJoystickSensitivity (float in_left_joystick_sensitivity)
 
float GetRightJoystickSensitivity () const
 
void SetRightJoystickSensitivity (float in_right_joystick_sensitivity)
 
float GetJoystickDeadZone () const
 
void SetJoystickDeadZone (float in_dead_zone)
 
float GetSceneExtents () const
 
HPS::Type ObjectType () const
 
virtual void Assign (Operator const &in_that)
 Assigns the parameter in_that to this operator, resulting in a clone. More...
 
virtual bool Equals (Operator const &in_that) const
 Tests this operator for equality against the parameter in_that. More...
 
virtual bool operator!= (Operator const &in_that) const
 Tests this operator for non-equality against the parameter in_that. More...
 
virtual bool operator== (Operator const &in_that) const
 Tests this operator for equality against the parameter in_that. More...
 
void DetachView ()
 Detaches the Operator from the View it was previously attached to. More...
 
View GetAttachedView () const
 Returns the View the Operator is currently attached to. More...
 
virtual bool OnMouseEnter (MouseState const &in_state)
 This function is called whenever HPS receives a MouseEvent that signals the mouse entered the window. More...
 
virtual bool OnMouseLeave (MouseState const &in_state)
 This function is called whenever HPS receives a MouseEvent that signals the mouse left the window. More...
 
virtual bool OnTextInput (HPS::UTF8 const &in_text)
 This function is called whenever HPS receives a TextInputEvent that signals text was entered. More...
 
virtual void OnModelDetached ()
 This function is called whenever a model is detached from the view that is attached to this operator. More...
 
void SetMouseTrigger (MouseButtons in_buttons)
 Sets the mouse trigger for this operator. More...
 
MouseButtons GetMouseTrigger () const
 Gets the mouse trigger associated with this operator. More...
 
void SetModifierTrigger (ModifierKeys in_modifiers)
 Sets the modifier trigger associated with this operator. More...
 
ModifierKeys GetModifierTrigger () const
 Gets the modifier trigger associated with this operator. More...
 
virtual bool IsMouseTriggered (MouseState const &in_state)
 Returns true if the MouseButtons and ModifierKeys are active. More...
 
virtual HPS::Type Type () const
 This function returns the true type of the underlying object. More...
 
virtual bool Empty () const
 Indicates whether this object has any values set on it. More...
 
virtual void Reset ()
 Resets this object to its initial, uninitialized state. More...
 
bool HasType (HPS::Type in_mask) const
 This function indicates whether this Object has the given Type mask. More...
 
intptr_t GetClassID () const
 Returns a unique identifier that is shared by all objects of the same class. More...
 
intptr_t GetInstanceID () const
 Returns an identifier that can be used to identify which instance of a class an object is. More...
 

Static Public Member Functions

template<typename T >
static intptr_t ClassID ()
 Unique identifier for this class. More...
 

Static Public Attributes

static const HPS::Type staticType = HPS::Type::Operator
 

Protected Types

enum  MovementFlags {
  no_movement = 0x0000,
  moving_forward = 0x0001,
  moving_back = 0x0002,
  moving_left = 0x0004,
  moving_right = 0x0008,
  moving_up = 0x0010,
  moving_down = 0x0020,
  roll_left = 0x0040,
  roll_right = 0x0080,
  rotating = 0x0100,
  move_with_touch = 0x0200,
  rotate_with_touch = 0x0400
}
 

Protected Member Functions

void MoveLeft (HPS::Point &position, HPS::Point &target, HPS::Vector &up)
 
void MoveRight (HPS::Point &position, HPS::Point &target, HPS::Vector &up)
 
void MoveUp (HPS::Point &position, HPS::Point &target, HPS::Vector &up)
 
void MoveDown (HPS::Point &position, HPS::Point &target, HPS::Vector &up)
 
void MoveForward (HPS::Point &position, HPS::Point &target, HPS::Vector const &direction)
 
void MoveBack (HPS::Point &position, HPS::Point &target, HPS::Vector const &direction)
 
bool MoveWithTouch (HPS::Point &position, HPS::Point &target, HPS::Vector &up, HPS::Vector const &walking_direction)
 
bool RotateScene (HPS::Point &position, HPS::Point &target)
 
bool RotateWithTouch (HPS::Point &position, HPS::Point &target)
 
void RotateCommon (HPS::Point const &delta, HPS::Point &position, HPS::Point &target)
 

Protected Attributes

unsigned int movement_flags
 
HPS::MouseButtons mouse_trigger
 
HPS::ModifierKeys modifier_trigger
 

Private Types

enum  TouchPosition {
  TouchPosition::Left,
  TouchPosition::Right,
  TouchPosition::None
}
 

Private Member Functions

void UpdateKeyboardState (KeyboardState const &in_state)
 
float CalculateSceneExtents ()
 
void ComputeReasonableStepLength ()
 
void CreateJoystick (HPS::TouchState const &in_state, TouchPosition touch_position)
 

Private Attributes

HPS::TouchID left_side_touch
 
HPS::TouchID right_side_touch
 
HPS::TouchID second_right_touch
 
HPS::WindowPoint start_point
 
HPS::WindowPoint left_start_point
 
HPS::WindowPoint right_start_point
 
HPS::WindowPoint current_right_touch_position
 
HPS::WindowPoint second_right_start_point
 
HPS::WindowPoint current_second_right_touch_position
 
HPS::WindowPoint start_mid_point
 
HPS::SegmentKey left_joystick_segment
 
HPS::SegmentKey right_joystick_segment
 
float joystick_dead_zone
 
float keyboard_sensitivity
 
float old_keyboard_sensitivity
 
float left_joystick_sensitivity
 
float old_left_joystick_sensitivity
 
float right_joystick_sensitivity
 
float old_right_joystick_sensitivity
 
float mouse_sensitivity
 
float scene_extents
 
bool two_right_fingers_down
 
bool invert_x_axis
 
bool invert_y_axis
 
Drawing::Handedness world_handedness
 
bool shift_pressed
 
bool ctrl_pressed
 
HPS::KeyPath event_path
 
HPS::WindowPoint rotation_location
 
HPS::WindowPoint moving_position
 

Detailed Description

The FlyOperator class defines an operator which allows the user to accurately move the camera around the scene.

This Operator works for both mouse- and touch-driven devices. Mouse-Driven Devices: W: Move camera position and target forward A: Pan camera left S: Move camera position and target forward D: Pan camera right C: Pan camera down Space: Pan camera up Q: Roll camera left E: Roll camera right Right-button down and move: Rotate camera in place Shift: Walk at double the speed while pressed Ctrl: Walk at half the speed while pressed Mouse Wheel: Increase / Decrease step length Shift + Mouse Wheel: Increase / Decrease field of view Touch-Driven Devices: touch -left side of screen: Pans camera in left or right, moves camera forward or back touch -right side of screen: Rotates camera in place Two-finger touch -right side of screen: Pans camera up or down, rolls camera left or right The movement speed increases as the user drags his fingers away from the initial touch position

Member Enumeration Documentation

◆ MovementFlags

Enumerator
no_movement 
moving_forward 
moving_back 
moving_left 
moving_right 
moving_up 
moving_down 
roll_left 
roll_right 
rotating 
move_with_touch 
rotate_with_touch 

◆ Priority

enum HPS::Operator::Priority
stronginherited
Enumerator
Low 
Default 
High 

◆ TouchPosition

enum HPS::FlyOperator::TouchPosition
strongprivate
Enumerator
Left 
Right 
None 

Constructor & Destructor Documentation

◆ FlyOperator()

HPS::FlyOperator::FlyOperator ( MouseButtons  in_mouse_trigger = MouseButtons::ButtonRight(),
ModifierKeys  in_modifier_trigger = ModifierKeys() 
)

Member Function Documentation

◆ Assign()

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

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

◆ CalculateSceneExtents()

float HPS::FlyOperator::CalculateSceneExtents ( )
private

◆ ClassID()

template<typename T >
static intptr_t HPS::Object::ClassID ( )
inlinestaticinherited

Unique identifier for this class.

Note: this method uses construction of static objects. If used in a constructor, it should be used in the body not the initializer list.

◆ ComputeReasonableStepLength()

void HPS::FlyOperator::ComputeReasonableStepLength ( )
private

◆ CreateJoystick()

void HPS::FlyOperator::CreateJoystick ( HPS::TouchState const &  in_state,
TouchPosition  touch_position 
)
private

◆ DetachView()

void HPS::Operator::DetachView ( )
inherited

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

◆ Empty()

virtual bool HPS::Object::Empty ( ) const
inlinevirtualinherited

Indicates whether this object has any values set on it.

Returns
true if no values are set on this object, false otherwise.

Reimplemented in HPS::STL::ImportResultsKit, HPS::STL::ImportOptionsKit, HPS::OBJ::ImportResultsKit, HPS::OBJ::ImportOptionsKit, HPS::Hardcopy::File::ExportOptionsKit, HPS::Stream::ExportOptionsKit, HPS::Stream::ImportResultsKit, HPS::Stream::ImportOptionsKit, HPS::PointCloud::ImportOptionsKit, HPS::PointCloud::ImportResultsKit, HPS::UpdateOptionsKit, HPS::HighlightSearchOptionsKit, HPS::HighlightOptionsKit, HPS::SelectionOptionsKit, HPS::SearchOptionsKit, HPS::CutGeometryGatheringOptionsKit, HPS::ShapeKit, HPS::ShaderKit, HPS::Shader::ImportOptionsKit, HPS::ImageKit, HPS::Image::ImportOptionsKit, HPS::Image::ExportOptionsKit, HPS::TextureOptionsKit, HPS::LinePatternKit, HPS::LinePatternParallelKit, HPS::LinePatternOptionsKit, HPS::GlyphKit, HPS::ApplicationWindowOptionsKit, HPS::OffScreenWindowOptionsKit, HPS::StandAloneWindowOptionsKit, HPS::GridKit, HPS::PolygonKit, HPS::MeshKit, HPS::ShellKit, HPS::ShellRelationResultsKit, HPS::ShellRelationOptionsKit, HPS::ShellOptimizationOptionsKit, HPS::TextKit, HPS::EllipticalArcKit, HPS::EllipseKit, HPS::TrimKit, HPS::NURBSSurfaceKit, HPS::NURBSCurveKit, HPS::SpotlightKit, HPS::InfiniteLineKit, HPS::CuttingSectionKit, HPS::CircularWedgeKit, HPS::CircularArcKit, HPS::CircleKit, HPS::SphereKit, HPS::CylinderKit, HPS::DistantLightKit, HPS::MarkerKit, HPS::LineKit, HPS::AttributeLockKit, HPS::FontInfoState, HPS::WindowInfoKit, HPS::DebuggingKit, HPS::SubwindowKit, HPS::ContourLineKit, HPS::VisualEffectsKit, HPS::TransformMaskKit, HPS::PostProcessEffectsKit, HPS::DrawingAttributeKit, HPS::HiddenLineAttributeKit, HPS::PerformanceKit, HPS::NURBSSurfaceAttributeKit, HPS::MaterialKit, HPS::MaterialMappingKit, HPS::MatrixKit, HPS::CurveAttributeKit, HPS::EdgeAttributeKit, HPS::LineAttributeKit, HPS::TextAttributeKit, HPS::CuttingSectionAttributeKit, HPS::CylinderAttributeKit, HPS::LightingAttributeKit, HPS::SphereAttributeKit, HPS::MarkerAttributeKit, HPS::CullingKit, HPS::ColorInterpolationKit, HPS::TransparencyKit, HPS::SelectabilityKit, HPS::CameraKit, HPS::VisibilityKit, HPS::BoundingKit, HPS::SegmentOptimizationOptionsKit, HPS::Publish::ExportOptionsKit, HPS::Publish::TextFieldKit, HPS::Publish::SignatureFieldKit, HPS::Publish::DropDownListKit, HPS::Exchange::TessellationOptionsKit, HPS::Publish::ListBoxKit, HPS::Exchange::ExportSTEPOptionsKit, HPS::Exchange::ExportParasolidOptionsKit, HPS::Publish::RadioButtonKit, HPS::Exchange::ExportIGESOptionsKit, HPS::Exchange::ExportXMLOptionsKit, HPS::Publish::CheckBoxKit, HPS::Exchange::ExportU3DOptionsKit, HPS::Exchange::ExportSTLOptionsKit, HPS::Publish::ButtonKit, HPS::Exchange::ExportPRCOptionsKit, HPS::Publish::LinkKit, HPS::Exchange::ExportJTOptionsKit, HPS::Publish::SlideTableKit, HPS::Exchange::ExportACISOptionsKit, HPS::Publish::TableKit, HPS::Exchange::Export3MFOptionsKit, HPS::Publish::ImageKit, HPS::Publish::TextKit, HPS::Exchange::ModelFileImportOptionsKit, HPS::Publish::ViewKit, HPS::Exchange::TranslationOptionsKit, HPS::Publish::ArtworkKit, HPS::Publish::AnnotationKit, HPS::ComponentPath, HPS::Exchange::ImportOptionsKit, HPS::Parasolid::ExportOptionsKit, HPS::Exchange::NURBSConversionOptionsKit, HPS::Parasolid::LineTessellationKit, HPS::Exchange::Configuration, HPS::Publish::PageKit, HPS::Parasolid::FacetTessellationKit, HPS::Publish::DocumentKit, HPS::Parasolid::ImportOptionsKit, HPS::DWG::ImportOptionsKit, HPS::OOC::ImportOptionsKit, HPS::Sketchup::ImportOptionsKit, and HPS::Sketchup::ImportResultsKit.

◆ Equals()

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

Tests this operator for equality against the parameter in_that.

Same as Operator::operator==

◆ GetAttachedView()

View HPS::Operator::GetAttachedView ( ) const
inherited

Returns the View the Operator is currently attached to.

◆ GetClassID()

intptr_t HPS::Object::GetClassID ( ) const
inherited

Returns a unique identifier that is shared by all objects of the same class.

Returns
A unique value shared by all objects of the same class.

◆ GetInstanceID()

intptr_t HPS::Object::GetInstanceID ( ) const
inherited

Returns an identifier that can be used to identify which instance of a class an object is.

Different keys and controls will return the same value if they are backed by the same database resource.

Returns
A value unique to an instance of an object and all objects that are backed by the same database resource.

◆ GetJoystickDeadZone()

float HPS::FlyOperator::GetJoystickDeadZone ( ) const
inline

◆ GetKeyboardSensitivity()

float HPS::FlyOperator::GetKeyboardSensitivity ( ) const
inline

◆ GetLeftJoystickSensitivity()

float HPS::FlyOperator::GetLeftJoystickSensitivity ( ) const
inline

◆ GetModifierTrigger()

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

Gets the modifier trigger associated with this operator.

◆ GetMouseSensitivity()

float HPS::FlyOperator::GetMouseSensitivity ( ) const
inline

◆ GetMouseTrigger()

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

Gets the mouse trigger associated with this operator.

◆ GetName()

virtual HPS::UTF8 HPS::FlyOperator::GetName ( ) const
inlinevirtual

Returns the name of the operator.

Reimplemented from HPS::Operator.

Reimplemented in HPS::SimpleWalkOperator, and HPS::WalkOperator.

◆ GetRightJoystickSensitivity()

float HPS::FlyOperator::GetRightJoystickSensitivity ( ) const
inline

◆ GetSceneExtents()

float HPS::FlyOperator::GetSceneExtents ( ) const
inline

◆ HasType()

bool HPS::Object::HasType ( HPS::Type  in_mask) const
inherited

This function indicates whether this Object has the given Type mask.

Parameters
in_maskThe Type mask to check against this Object.
Returns
true if this Object has the given Type mask, false otherwise.

◆ InvertXAxis()

void HPS::FlyOperator::InvertXAxis ( )
inline

◆ InvertYAxis()

void HPS::FlyOperator::InvertYAxis ( )
inline

◆ IsMouseTriggered()

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

Returns true if the MouseButtons and ModifierKeys are active.

Reimplemented in HPS::SimpleWalkOperator.

Here is the call graph for this function:

◆ IsXAxisInverted()

bool HPS::FlyOperator::IsXAxisInverted ( ) const
inline

◆ IsYAxisInverted()

bool HPS::FlyOperator::IsYAxisInverted ( ) const
inline

◆ MoveBack()

void HPS::FlyOperator::MoveBack ( HPS::Point position,
HPS::Point target,
HPS::Vector const &  direction 
)
protected

◆ MoveDown()

void HPS::FlyOperator::MoveDown ( HPS::Point position,
HPS::Point target,
HPS::Vector up 
)
protected

◆ MoveForward()

void HPS::FlyOperator::MoveForward ( HPS::Point position,
HPS::Point target,
HPS::Vector const &  direction 
)
protected

◆ MoveLeft()

void HPS::FlyOperator::MoveLeft ( HPS::Point position,
HPS::Point target,
HPS::Vector up 
)
protected

◆ MoveRight()

void HPS::FlyOperator::MoveRight ( HPS::Point position,
HPS::Point target,
HPS::Vector up 
)
protected

◆ MoveUp()

void HPS::FlyOperator::MoveUp ( HPS::Point position,
HPS::Point target,
HPS::Vector up 
)
protected

◆ MoveWithTouch()

bool HPS::FlyOperator::MoveWithTouch ( HPS::Point position,
HPS::Point target,
HPS::Vector up,
HPS::Vector const &  walking_direction 
)
protected

◆ ObjectType()

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

Reimplemented from HPS::Object.

Here is the call graph for this function:

◆ OnKeyDown()

virtual bool HPS::FlyOperator::OnKeyDown ( KeyboardState const &  in_state)
virtual

This function is called whenever HPS receives a KeyboardState event that signals a button was pressed.

This function instructs the operator on which direction to move towards.

Parameters
in_stateA KeyboardState object describing the current keyboard state. W: Move camera position and target forward A: Pan camera left S: Move camera position and target forward D: Pan camera right C: Pan camera down Space: Pan camera up Q: Roll camera left E: Roll camera right Shift: Walk at double the speed while pressed Ctrl: Walk at half the speed while pressed
Returns
true if the input event was handled, false otherwise.

Reimplemented from HPS::Operator.

Reimplemented in HPS::SimpleWalkOperator.

◆ OnKeyUp()

virtual bool HPS::FlyOperator::OnKeyUp ( KeyboardState const &  in_state)
virtual

This function is called whenever HPS receives a KeyboardState event that signals a button was released.

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

Reimplemented from HPS::Operator.

Reimplemented in HPS::SimpleWalkOperator.

◆ OnModelAttached()

virtual void HPS::FlyOperator::OnModelAttached ( )
virtual

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 from HPS::Operator.

Reimplemented in HPS::SimpleWalkOperator, and HPS::WalkOperator.

◆ OnModelDetached()

virtual void HPS::Operator::OnModelDetached ( )
inlinevirtualinherited

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::FlyOperator::OnMouseDown ( MouseState const &  in_state)
virtual

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

This function starts the operator and computes the position of the starting point.

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

Reimplemented from HPS::Operator.

Reimplemented in HPS::SimpleWalkOperator.

◆ OnMouseEnter()

virtual bool HPS::Operator::OnMouseEnter ( MouseState const &  in_state)
inlinevirtualinherited

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)
inlinevirtualinherited

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::FlyOperator::OnMouseMove ( MouseState const &  in_state)
virtual

This function is called whenever HPS receives a MouseEvent that signals the mouse moved This function rotates the camera in place if the right mouse button is down.

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

Reimplemented from HPS::Operator.

Reimplemented in HPS::SimpleWalkOperator.

◆ OnMouseUp()

virtual bool HPS::FlyOperator::OnMouseUp ( MouseState const &  in_state)
virtual

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 from HPS::Operator.

Reimplemented in HPS::SimpleWalkOperator.

◆ OnMouseWheel()

virtual bool HPS::FlyOperator::OnMouseWheel ( MouseState const &  in_state)
virtual

This function is called whenever HPS receives a MouseEvent that signals the mouse wheel moved If shift is not pressed this function increases or decreases the step length.

If shift is pressed this function increases or decreases the camera field of view.

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

Reimplemented from HPS::Operator.

Reimplemented in HPS::SimpleWalkOperator.

◆ OnTextInput()

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

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::FlyOperator::OnTimerTick ( HPS::TimerTickEvent const &  in_event)
virtual

This function is called whenever HPS receives a TimerTickEvent This function moves the camera.

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

Reimplemented from HPS::Operator.

Reimplemented in HPS::SimpleWalkOperator, and HPS::WalkOperator.

◆ OnTouchDown()

virtual bool HPS::FlyOperator::OnTouchDown ( TouchState const &  in_state)
virtual

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

This function starts the operator and computes the position of the starting point.

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

Reimplemented from HPS::Operator.

Reimplemented in HPS::SimpleWalkOperator.

◆ OnTouchMove()

virtual bool HPS::FlyOperator::OnTouchMove ( TouchState const &  in_state)
virtual

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

This function rotates the camera in place.

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

Reimplemented from HPS::Operator.

Reimplemented in HPS::SimpleWalkOperator.

◆ OnTouchUp()

virtual bool HPS::FlyOperator::OnTouchUp ( TouchState const &  in_state)
virtual

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 from HPS::Operator.

Reimplemented in HPS::SimpleWalkOperator.

◆ OnViewAttached()

virtual void HPS::FlyOperator::OnViewAttached ( )
virtual

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

Reimplemented from HPS::Operator.

Reimplemented in HPS::SimpleWalkOperator, and HPS::WalkOperator.

◆ OnViewDetached()

virtual void HPS::FlyOperator::OnViewDetached ( )
virtual

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

Reimplemented from HPS::Operator.

◆ operator!=()

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

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

◆ operator==()

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

Tests this operator for equality against the parameter in_that.

Same as Operator::Equals.

◆ Reset()

◆ RotateCommon()

void HPS::FlyOperator::RotateCommon ( HPS::Point const &  delta,
HPS::Point position,
HPS::Point target 
)
protected

◆ RotateScene()

bool HPS::FlyOperator::RotateScene ( HPS::Point position,
HPS::Point target 
)
protected

◆ RotateWithTouch()

bool HPS::FlyOperator::RotateWithTouch ( HPS::Point position,
HPS::Point target 
)
protected

◆ SetJoystickDeadZone()

void HPS::FlyOperator::SetJoystickDeadZone ( float  in_dead_zone)
inline

◆ SetKeyboardSensitivity()

void HPS::FlyOperator::SetKeyboardSensitivity ( float  in_keyboard_sensitivity)
inline

◆ SetLeftJoystickSensitivity()

void HPS::FlyOperator::SetLeftJoystickSensitivity ( float  in_left_joystick_sensitivity)
inline

◆ SetModifierTrigger()

void HPS::Operator::SetModifierTrigger ( ModifierKeys  in_modifiers)
inlineinherited

Sets the modifier trigger associated with this operator.

Parameters
in_modifiersThe modifier keys that are used to trigger this operator.

◆ SetMouseSensitivity()

void HPS::FlyOperator::SetMouseSensitivity ( float  in_mouse_sensitivity)
inline

◆ SetMouseTrigger()

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

Sets the mouse trigger for this operator.

◆ SetRightJoystickSensitivity()

void HPS::FlyOperator::SetRightJoystickSensitivity ( float  in_right_joystick_sensitivity)
inline

◆ Type()

◆ UpdateKeyboardState()

void HPS::FlyOperator::UpdateKeyboardState ( KeyboardState const &  in_state)
private

Member Data Documentation

◆ ctrl_pressed

bool HPS::FlyOperator::ctrl_pressed
private

◆ current_right_touch_position

HPS::WindowPoint HPS::FlyOperator::current_right_touch_position
private

◆ current_second_right_touch_position

HPS::WindowPoint HPS::FlyOperator::current_second_right_touch_position
private

◆ event_path

HPS::KeyPath HPS::FlyOperator::event_path
private

◆ invert_x_axis

bool HPS::FlyOperator::invert_x_axis
private

◆ invert_y_axis

bool HPS::FlyOperator::invert_y_axis
private

◆ joystick_dead_zone

float HPS::FlyOperator::joystick_dead_zone
private

◆ keyboard_sensitivity

float HPS::FlyOperator::keyboard_sensitivity
private

◆ left_joystick_segment

HPS::SegmentKey HPS::FlyOperator::left_joystick_segment
private

◆ left_joystick_sensitivity

float HPS::FlyOperator::left_joystick_sensitivity
private

◆ left_side_touch

HPS::TouchID HPS::FlyOperator::left_side_touch
private

◆ left_start_point

HPS::WindowPoint HPS::FlyOperator::left_start_point
private

◆ modifier_trigger

HPS::ModifierKeys HPS::Operator::modifier_trigger
protectedinherited

◆ mouse_sensitivity

float HPS::FlyOperator::mouse_sensitivity
private

◆ mouse_trigger

HPS::MouseButtons HPS::Operator::mouse_trigger
protectedinherited

◆ movement_flags

unsigned int HPS::FlyOperator::movement_flags
protected

◆ moving_position

HPS::WindowPoint HPS::FlyOperator::moving_position
private

◆ old_keyboard_sensitivity

float HPS::FlyOperator::old_keyboard_sensitivity
private

◆ old_left_joystick_sensitivity

float HPS::FlyOperator::old_left_joystick_sensitivity
private

◆ old_right_joystick_sensitivity

float HPS::FlyOperator::old_right_joystick_sensitivity
private

◆ right_joystick_segment

HPS::SegmentKey HPS::FlyOperator::right_joystick_segment
private

◆ right_joystick_sensitivity

float HPS::FlyOperator::right_joystick_sensitivity
private

◆ right_side_touch

HPS::TouchID HPS::FlyOperator::right_side_touch
private

◆ right_start_point

HPS::WindowPoint HPS::FlyOperator::right_start_point
private

◆ rotation_location

HPS::WindowPoint HPS::FlyOperator::rotation_location
private

◆ scene_extents

float HPS::FlyOperator::scene_extents
private

◆ second_right_start_point

HPS::WindowPoint HPS::FlyOperator::second_right_start_point
private

◆ second_right_touch

HPS::TouchID HPS::FlyOperator::second_right_touch
private

◆ shift_pressed

bool HPS::FlyOperator::shift_pressed
private

◆ start_mid_point

HPS::WindowPoint HPS::FlyOperator::start_mid_point
private

◆ start_point

HPS::WindowPoint HPS::FlyOperator::start_point
private

◆ staticType

const HPS::Type HPS::Operator::staticType = HPS::Type::Operator
staticinherited

◆ two_right_fingers_down

bool HPS::FlyOperator::two_right_fingers_down
private

◆ world_handedness

Drawing::Handedness HPS::FlyOperator::world_handedness
private

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