OrbitOperator
-
class OrbitOperator : public HPS::Operator
The OrbitOperator class defines an operator which allows the user to orbit the camera. This Operator works for both mouse- and touch-driven devices. Mouse-Driven Devices: Left button pressed and move: Orbit camera Touch-Driven Devices: Touch down and move: Orbit camera
Public Functions
-
virtual bool OnMouseDown(MouseState const &in_state)
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_state – A MouseState object describing the current mouse state.
- Returns:
true if the input event was handled, false otherwise.
-
virtual bool OnMouseMove(MouseState const &in_state)
This function is called whenever HPS receives a MouseEvent that signals the mouse moved This function orbits the camera as needed.
- Parameters:
in_state – A MouseState object describing the current mouse state.
- Returns:
true if the input event was handled, false otherwise.
-
virtual bool OnMouseUp(MouseState const &in_state)
This function is called whenever HPS receives a MouseEvent that signals a mouse button was released. This function stops the operator.
- Parameters:
in_state – A MouseState object describing the current mouse state.
- Returns:
true if the input event was handled, false otherwise.
-
virtual bool OnTouchDown(TouchState const &in_state)
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_state – A TouchState object describing the current touch state.
- Returns:
true if the input event was handled, false otherwise.
-
virtual bool OnTouchMove(TouchState const &in_state)
This function is called whenever HPS receives a TouchEvent that signals a point of contact has moved. This function orbits the camera as needed.
- Parameters:
in_state – A TouchState object describing the current touch state.
- Returns:
true if the input event was handled, false otherwise.
-
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. This function stops the operator.
- Parameters:
in_state – A TouchState object describing the current touch state.
- Returns:
true if the input event was handled, false otherwise.
-
OrbitOperator(MouseButtons in_mouse_trigger = MouseButtons::ButtonLeft(), ModifierKeys in_modifier_trigger = ModifierKeys())
-
virtual bool OnMouseDown(MouseState const &in_state)