sprk_ops.h
26 (51 + std::hash<float>()(x.red)) * 51 + std::hash<float>()(x.green) * 51 + std::hash<float>()(x.blue));
70 PanOrbitZoomOperator(MouseButtons in_mouse_trigger = MouseButtons::ButtonLeft(), ModifierKeys in_modifier_trigger = ModifierKeys());
139 PanOperator(MouseButtons in_mouse_trigger = MouseButtons::ButtonLeft(), ModifierKeys in_modifier_trigger = ModifierKeys());
193 OrbitOperator(MouseButtons in_mouse_trigger = MouseButtons::ButtonLeft(), ModifierKeys in_modifier_trigger = ModifierKeys());
249 RelativeOrbitOperator(MouseButtons in_mouse_trigger = MouseButtons::ButtonMiddle(), ModifierKeys in_modifier_trigger = ModifierKeys());
283 ZoomOperator(MouseButtons in_mouse_trigger = MouseButtons::ButtonLeft(), ModifierKeys in_modifier_trigger = ModifierKeys());
336 ConstructRectangleOperator(MouseButtons in_mouse_trigger = MouseButtons::ButtonLeft(), ModifierKeys in_modifier_trigger = ModifierKeys(), bool draw_faces = false);
374 ZoomBoxOperator(MouseButtons in_mouse_trigger = MouseButtons::ButtonLeft(), ModifierKeys in_modifier_trigger = ModifierKeys());
409 SelectAreaOperator(MouseButtons in_mouse_trigger = MouseButtons::ButtonLeft(), ModifierKeys in_modifier_trigger = ModifierKeys());
429 void SetSelectionOptions(HPS::SelectionOptionsKit const & in_options) { selection_options = in_options; }
437 bool SelectCommon(HPS::WindowKey & in_window, HPS::ModifierKeys in_modifiers = HPS::ModifierKeys());
453 HighlightAreaOperator(MouseButtons in_mouse_trigger = MouseButtons::ButtonLeft(), ModifierKeys in_modifier_trigger = ModifierKeys());
467 void SetHighlightOptions(HPS::HighlightOptionsKit const & in_options) { highlight_options = in_options; }
506 SelectOperator(MouseButtons in_mouse_trigger = MouseButtons::ButtonLeft(), ModifierKeys in_modifier_trigger = ModifierKeys());
522 void SetSelectionOptions(HPS::SelectionOptionsKit const & in_options) { selection_options = in_options; }
530 bool SelectCommon(HPS::Point const & in_loc, HPS::WindowKey & in_window, HPS::ModifierKeys in_modifiers = HPS::ModifierKeys());
544 HighlightOperator(MouseButtons in_mouse_trigger = MouseButtons::ButtonLeft(), ModifierKeys in_modifier_trigger = ModifierKeys());
554 void SetHighlightOptions(HPS::HighlightOptionsKit const & in_options) { highlight_options = in_options; }
580 MouseWheelOperator(ZoomType in_default_type = ZoomType::Accurate, HPS::ModifierKeys in_alternate_type_modifiers = HPS::ModifierKeys::KeyControl());
613 TurntableOperator(MouseButtons in_mouse_trigger = MouseButtons::ButtonLeft(), ModifierKeys in_modifier_trigger = ModifierKeys());
721 FlyOperator(MouseButtons in_mouse_trigger = MouseButtons::ButtonRight(), ModifierKeys in_modifier_trigger = ModifierKeys());
798 /* Keyboard sensitivity affects the speed of movement of action triggered from the keyboard, such as walking forward by pressing W */
800 void SetKeyboardSensitivity(float in_keyboard_sensitivity) { keyboard_sensitivity = in_keyboard_sensitivity; }
802 /* Mouse sensitivity affects the speed of movement of action triggered from the mouse, such as rotating */
804 void SetMouseSensitivity(float in_mouse_sensitivity) { mouse_sensitivity = in_mouse_sensitivity; }
806 /* Left Joystick sensitivity affects the speed of movement of action triggered from the left joystick on touch devices */
808 void SetLeftJoystickSensitivity(float in_left_joystick_sensitivity) { left_joystick_sensitivity = in_left_joystick_sensitivity; }
810 /* Right Joystick sensitivity affects the speed of movement of action triggered from the right joystick on touch devices */
812 void SetRightJoystickSensitivity(float in_right_joystick_sensitivity) { right_joystick_sensitivity = in_right_joystick_sensitivity; }
815 The dead zone is an area around the initial touch down position where the user can move its finger
848 void MoveWithTouch(HPS::Point & position, HPS::Point & target, HPS::Vector & up, HPS::Vector const & walking_direction);
945 WalkOperator(MouseButtons in_mouse_trigger = MouseButtons::ButtonRight(), ModifierKeys in_modifier_trigger = ModifierKeys());
974 void AdjustWalkingDirection(HPS::Vector const & camera_direction, HPS::Vector const & camera_up);
989 SimpleWalkOperator(MouseButtons in_mouse_trigger = MouseButtons::ButtonLeft(), ModifierKeys in_modifier_trigger = ModifierKeys());
997 virtual bool OnKeyDown(KeyboardState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
1001 virtual bool OnKeyUp(KeyboardState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
1006 virtual bool OnMouseWheel(MouseState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
1027 virtual bool OnTouchDown(TouchState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
1032 virtual bool OnTouchMove(TouchState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
1036 virtual bool OnTouchUp(TouchState const & in_state) { HPS_UNREFERENCED(in_state); return false; }
1123 CuttingSectionOperator(MouseButtons in_mouse_trigger = MouseButtons::ButtonLeft(), ModifierKeys in_modifier_trigger = ModifierKeys());
1132 /* This function programmatically assigns cutting planes to this operator from plane equations.
1133 * If this operator has already had cutting planes associated with it, the cutting planes set using
1207 void SetPlaneHighlightOptions(HighlightOptionsKit const & in_highlight_options) { highlight_options = in_highlight_options; }
1215 void SetMouseOverHighlighting(bool in_enable_mouse_over_highlighting) { enable_mouse_over_highlighting = in_enable_mouse_over_highlighting; }
1233 bool GetIndicatorVisibility() { return (op_state == OpState::Uninitialized || op_state == OpState::FacePicking) ? true : false; }
1250 void TranslateCuttingPlane(KeyPath const & in_event_path, WindowPoint const & in_event_location);
1340 MarkupOperator(MouseButtons in_mouse_trigger = MouseButtons::ButtonLeft(), ModifierKeys in_modifier_trigger = ModifierKeys());
1419 void SetTextAttribute(TextAttributeKit const & in_text_attributes) { current_attributes.text_attributes = in_text_attributes; }
1426 void SetLineAttribute(LineAttributeKit const & in_line_attributes) {current_attributes.line_attributes = in_line_attributes; }
1437 * \return <span class='code'>true</span> if a markup is being inserted, <span class='code'>false</span> otherwise. */
1591 AnnotationOperator(MouseButtons in_mouse_trigger = MouseButtons::ButtonLeft(), ModifierKeys in_modifier_trigger = ModifierKeys());
1664 * It contains the key of the segment containing the annotation and the view currently attached to this operator.
1676 AnnotationInsertedEvent(HPS::SegmentKey const & in_text_key, HPS::View const & in_view) : Event()
1750 SelectionOptionsKit annotation_selection_options; //selection options used when trying to select annotations
1753 UTF8 annotation_user_data; //the user data set on annotation geometry to distinguish it from non annotation geometry
1754 UTF8 annotation_shape; //the name of the shape definition used to draw the annotation background
1756 PortfolioKey current_portfolio; //the portfolio used to store the default definitions used by this operator
1767 //touch only flags -- these flags are only relevant when running the operator on a touch enabled device
1770 CameraKit original_camera; //the camera setting as they were just before the annotation text is edited
1771 KeyboardHiddenEventHandler handler; //a handler that takes care of resetting the camera when the software keyboard is hidden
1773 bool always_show_keyboard_on_touch_up; //true if we are just inserting the annotation, false if we are editing a previously inserted one.
1796 HandlesOperator(MouseButtons in_mouse_trigger = MouseButtons::ButtonLeft(), ModifierKeys in_modifier_trigger = ModifierKeys());
1868 * \param in_highlight_color The color used to highlight handles when the user mouses over them. */
1876 * If the user passes values outside of the acceptable ranges, these values will be ignored and a warning will be issued for each out-of-range value.
1878 * \param in_length The length of the handles, specified as a percentage of the view containing it. Valid range is (0, 1].
1879 * \param in_radius The radius of the handles, specified as a percentage of the view containing it. Valid range is (0, 1].
1880 * \param in_offset The distance between the end of a translation handle and the rotation handle associated with it, specified as a percentage of the handle length. Valid range is (0, 1].
1881 * \param in_angle The angle formed by the rotation handles, specified in degrees. Valid range is > 0
1882 * \param in_handles_points The number of points used to draw the handles. A higher number will yield a smoother appearance. Valid range is > 0
1883 * \param in_tip_size The size of the tip at the end of the handles, specified as a percentage of the handle. Valid range is [0, 1] */
1884 void SetHandlesAppearance(float in_length = 0.2f, float in_radius = 0.005f, float in_offset = 0.2f, float in_angle = 25.0f, size_t in_handles_points = 30, float in_tip_size = 0.15f);
1887 * \param out_length The length of the handles, specified as a percentage of the view containing it.
1888 * \param out_radius The radius of the handles, specified as a percentage of the view containing it.
1889 * \param out_offset The distance between the end of a translation handle and the rotation handle associated with it, specified as a percentage of the handle length.
1891 * \param out_handle_points The number of points used to draw the handles. A higher number will yield a smoother appearance.
1892 * \param out_tip_size The size of the tip at the end of the handles, specified as a percentage of the handle. */
1893 void GetHandlesAppearance(float & out_length, float & out_radius, float & out_offset, float & out_angle, size_t & out_handles_points, float & out_tip_size) const;
1896 * Trailing geometry is geometry which shows you the path of the last movement operation you performed through the handles.
1901 * Trailing geometry is geometry which shows you the path of the last movement operation you performed through the handles.
1902 * \return <span class='code'>true</span> if trailing geometry will be drawn, <span class='code'>false</span> otherwise. */
1915 GeometryTransformedEvent(HPS::View const & in_view, HPS::SegmentKey const & in_segment_key, HPS::MatrixKit const & in_transform) : Event()
1962 CanvasArray canvases; //A list of Canvas objects that the View attached to this operator belongs to. This value only gets updated on OnViewAttached.
1967 SegmentKey handles_segment; //segment where the matrices for the handles transformations are accumulated
1971 SegmentKey temporary_segment_to_move; //segment where we accumulate changes while the handles are active
2005 float arc_offset; //Distance between the end of the translation handle and the start of the translation arc. Expressed in percentage of handles_length [0 - 1].
2008 float tip_size; //The size of the tips at the end of the handles, specified as a percentage of the handles length
2040 //copies the accumulated transform from the reference geometry segment back into the original place.
Definition: hps.h:6171
Event * Clone() const
Definition: sprk_ops.h:1702
MarkupInsertedEvent(Event const &in_event)
Definition: sprk_ops.h:1460
Definition: sprk.h:237
virtual bool OnMouseWheel(MouseState const &in_state)
Definition: sprk_ops.h:1006
An InvalidSpecificationException is thrown when a method is called with non-sensical or contradictory...
Definition: hps.h:5680
Definition: sprk_ops.h:986
Definition: sprk_ops.h:280
Event * Clone() const
Definition: sprk_ops.h:1943
Definition: hps.h:35040
HPS::HighlightOptionsKit GetHighlightOptions() const
Definition: sprk_ops.h:472
Definition: sprk_ops.h:394
HPS::SelectionOptionsKit GetSelectionOptions() const
Definition: sprk_ops.h:527
void SetMarkupType(MarkupType in_markup_type)
Definition: sprk_ops.h:1405
Definition: hps.h:44747
Definition: hps.h:7680
Definition: sprk_ops.h:67
AnnotationInsertedEvent()
Definition: sprk_ops.h:1670
Definition: hps.h:3506
void SetIndicatorScale(float in_scale)
Definition: sprk_ops.h:1191
Definition: hps.h:15670
HPS::SelectionOptionsKit GetSelectionOptions() const
Definition: sprk_ops.h:434
Definition: sprk_ops.h:610
GeometryTransformedEvent(Event const &in_event)
Definition: sprk_ops.h:1926
virtual bool OnTouchDown(TouchState const &in_state)
Definition: sprk_ops.h:1027
void SetPlaneHighlightOptions(HighlightOptionsKit const &in_highlight_options)
Definition: sprk_ops.h:1207
Definition: sprk_ops.h:1905
Definition: sprk_ops.h:491
Definition: sprk_ops.h:190
TextAttributeKit GetTextAttributes()
Definition: sprk_ops.h:1416
GeometryTransformedEvent()
Definition: sprk_ops.h:1909
Definition: hps.h:1501
Definition: hps.h:8847
void SetLineAttribute(LineAttributeKit const &in_line_attributes)
Definition: sprk_ops.h:1426
Definition: sprk_ops.h:333
Definition: sprk_ops.h:1440
Definition: sprk_ops.h:674
virtual bool OnTouchMove(TouchState const &in_state)
Definition: sprk_ops.h:1032
void SetSelectionOptions(HPS::SelectionOptionsKit const &in_options)
Definition: sprk_ops.h:522
Definition: sprk_ops.h:1111
Definition: sprk_ops.h:1793
virtual HPS::UTF8 GetName() const OVERRIDE
Definition: sprk_ops.h:1594
Definition: hps.h:44646
virtual HPS::UTF8 GetName() const
Definition: sprk_ops.h:337
Definition: sprk_ops.h:718
Definition: sprk_ops.h:444
Definition: hps.h:31458
Definition: sprk_ops.h:1329
AnnotationInsertedEvent(Event const &in_event)
Definition: sprk_ops.h:1686
bool GetIndicatorVisibility()
Definition: sprk_ops.h:1233
virtual bool OnTouchUp(TouchState const &in_state)
Definition: sprk_ops.h:1036
Definition: hps.h:4334
Definition: hps.h:7053
Definition: hps.h:44138
Definition: hps.h:25665
Definition: hps.h:41683
Definition: hps.h:5875
Definition: hps.h:43191
Definition: hps.h:40980
Definition: hps.h:44534
Definition: sprk_ops.h:537
Definition: hps.h:15084
Definition: hps.h:14356
Definition: hps.h:41960
Definition: hps.h:43803
bool GetMouseOverHighlighting() const
Definition: sprk_ops.h:1211
HPS::Rectangle GetRectangle() const
Definition: sprk_ops.h:352
Definition: hps.h:6271
void SetSelectionOptions(HPS::SelectionOptionsKit const &in_options)
Definition: sprk_ops.h:429
Definition: hps.h:13390
virtual bool OnKeyDown(KeyboardState const &in_state)
Definition: sprk_ops.h:997
void SetMouseOverHighlighting(bool in_enable_mouse_over_highlighting)
Definition: sprk_ops.h:1215
Definition: sprk_ops.h:239
LineAttributeKit GetLineAttributes()
Definition: sprk_ops.h:1423
Definition: sprk_ops.h:1666
void SetHighlightOptions(HPS::HighlightOptionsKit const &in_options)
Definition: sprk_ops.h:467
float GetIndicatorScale() const
Definition: sprk_ops.h:1187
Definition: sprk_ops.h:1588
HPS::HighlightOptionsKit GetHighlightOptions() const
Definition: sprk_ops.h:559
Definition: hps.h:43117
Definition: sprk_ops.h:567
Definition: sprk_ops.h:942
Definition: hps.h:8965
MaterialMappingKit GetPlaneMaterial() const
Definition: sprk_ops.h:1195
Definition: hps.h:7599
Definition: hps.h:9179
void SetTextAttribute(TextAttributeKit const &in_text_attributes)
Definition: sprk_ops.h:1419
Definition: hps.h:23017
Definition: hps.h:23302
Definition: sprk.h:1065
Definition: sprk_ops.h:136
virtual bool OnKeyUp(KeyboardState const &in_state)
Definition: sprk_ops.h:1001
HighlightOptionsKit GetPlaneHighlightOptions() const
Definition: sprk_ops.h:1203
Definition: hps.h:38548
MarkupInsertedEvent()
Definition: sprk_ops.h:1444
void SetHighlightOptions(HPS::HighlightOptionsKit const &in_options)
Definition: sprk_ops.h:554
Definition: sprk_ops.h:371