#include <sprk_ops.h>
Public Member Functions | |
CuttingSectionOperator (MouseButtons in_mouse_trigger=MouseButtons::ButtonLeft(), ModifierKeys in_modifier_trigger=ModifierKeys()) | |
virtual HPS::UTF8 | GetName () const |
virtual void | OnModelAttached () |
virtual void | OnViewAttached () |
virtual void | OnViewDetached () |
void | SetPlanes (PlaneArray const &in_planes) |
PlaneArray | GetPlanes () |
virtual bool | OnMouseDown (MouseState const &in_state) |
virtual bool | OnMouseUp (MouseState const &in_state) |
virtual bool | OnMouseMove (MouseState const &in_state) |
virtual bool | OnTouchDown (TouchState const &in_state) |
virtual bool | OnTouchUp (TouchState const &in_state) |
virtual bool | OnTouchMove (TouchState const &in_state) |
virtual bool | OnTimerTick (TimerTickEvent const &in_event) |
float | GetIndicatorScale () const |
void | SetIndicatorScale (float in_scale) |
MaterialMappingKit | GetPlaneMaterial () const |
void | SetPlaneMaterial (MaterialMappingKit const &in_plane_material) |
HighlightOptionsKit | GetPlaneHighlightOptions () const |
void | SetPlaneHighlightOptions (HighlightOptionsKit const &in_highlight_options) |
bool | GetMouseOverHighlighting () const |
void | SetMouseOverHighlighting (bool in_enable_mouse_over_highlighting) |
void | SetSectioning (bool in_sectioning) |
bool | GetSectioning () |
void | SetIndicatorVisibility (bool in_use_indicator) |
bool | GetIndicatorVisibility () |
void | SetPlaneVisibility (bool in_visibility) |
bool | GetPlaneVisibility () |
![]() | |
SelectOperator (MouseButtons in_mouse_trigger=MouseButtons::ButtonLeft(), ModifierKeys in_modifier_trigger=ModifierKeys()) | |
HPS::SelectionResults | GetActiveSelection () const |
void | SetSelectionOptions (HPS::SelectionOptionsKit const &in_options) |
HPS::SelectionOptionsKit | GetSelectionOptions () const |
![]() | |
Operator (MouseButtons in_mouse_trigger=MouseButtons::ButtonLeft(), ModifierKeys in_modifier_trigger=ModifierKeys()) | |
Operator (Operator const &in_that) | |
HPS::Type | ObjectType () const |
virtual Operator & | operator= (Operator const &in_that) |
virtual void | Assign (Operator const &in_that) |
virtual bool | Equals (Operator const &in_that) const |
virtual bool | operator!= (Operator const &in_that) const |
virtual bool | operator== (Operator const &in_that) const |
void | DetachView () |
View | GetAttachedView () const |
virtual bool | OnMouseWheel (MouseState const &in_state) |
virtual bool | OnMouseEnter (MouseState const &in_state) |
virtual bool | OnMouseLeave (MouseState const &in_state) |
virtual bool | OnKeyDown (KeyboardState const &in_state) |
virtual bool | OnKeyUp (KeyboardState const &in_state) |
virtual void | OnModelDetached () |
void | SetMouseTrigger (MouseButtons in_buttons) |
MouseButtons | GetMouseTrigger () const |
void | SetModifierTrigger (ModifierKeys in_modifiers) |
ModifierKeys | GetModifierTrigger () const |
virtual bool | IsMouseTriggered (MouseState const &in_state) |
![]() | |
Sprocket (HPS::Sprocket const &in_that)=default | |
Sprocket (Sprocket &&in_that) | |
![]() | |
Object (Object const &that) | |
Object & | operator= (Object const &other_object) |
Object (Object &&in_that) | |
Object & | operator= (Object &&in_that) |
HPS::Type | Type () const |
virtual bool | Empty () const |
virtual void | Reset () |
bool | HasType (HPS::Type in_mask) const |
intptr_t | GetClassID () const |
intptr_t | GetInstanceID () const |
Additional Inherited Members | |
![]() | |
enum | Priority { Low, Normal, High } |
![]() | |
enum | UpdateType { Synchronous, Asynchronous } |
![]() | |
template<typename T > | |
static intptr_t | ClassID () |
![]() | |
HPS::MouseButtons | mouse_trigger |
HPS::ModifierKeys | modifier_trigger |
The CuttingSectionOperator class defines an operator which allows the user to insert and interact with cutting sections. This Operator works for both mouse- and touch-driven devices. Each instance of the operator supports inserting and interacting with a single cutting plane. Multiple instances of the operator can be pushed to the View’s operator stack when the user wants to add an additional cutting plane to the scene. The cutting plane associated with an instance of the operator will be removed when the operator is popped from the View’s operator stack.
Action | Result |
---|---|
Mouse move | When the operator is first activated, moving the mouse over the model will display a indicator representing the normal of the face the user is currently hovering over. Once a cutting section has been inserted, it will be highlighted when the user hovers over it. The highlight options can also be customized, or this behavior can be disabled entirely. |
Left click | When the operator is first activated, a left click will insert a cutting section at this position. |
Double left click | Flips the cutting section the user double clicked on. |
Left mouse down and move | Translates the cutting section the user clicked on along its normal. |
Action | Result |
---|---|
Touch down | Inserts a cutting section at the position of the touch. |
Double tap | Flips the cutting section the user double tapped. |
Touch down and drag | Translates the cutting section the user tapped along its normal. |
|
inline |
Returns the scale used for the normal indicator displayed while mousing over the model when the operator is first started.
|
inline |
Whether the plane normal indicator is visible
|
inline |
Whether mouse-over highlighting is enabled
|
inlinevirtual |
Returns the name of the operator.
Reimplemented from HPS::SelectOperator.
|
inline |
Returns the highlight options kit used when hovering over geometry, when mouse-over highlighting is enabled.
|
inline |
Returns the material mapping kit applied to the cutting plane geometry.
bool HPS::CuttingSectionOperator::GetPlaneVisibility | ( | ) |
Whether the cutting sections plane representations are visible
|
inline |
Whether sectioning is enabled
|
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.
|
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. When the operator is first started, this function inserts a cutting section.
in_state | A MouseState object describing the current mouse state. |
Reimplemented from HPS::SelectOperator.
|
virtual |
This function is called whenever HPS receives a MouseEvent that signals the mouse moved When the operator is first started this function displays a normal indicator when the user mouses over geometry. After a cutting section has been inserted this function allows the user to translate a cutting section along its normal
in_state | A MouseState object describing the current mouse state. |
Reimplemented from HPS::Operator.
|
virtual |
This function is called whenever HPS receives a MouseEvent that signals a mouse button was released.
in_state | A MouseState object describing the current mouse state. |
Reimplemented from HPS::Operator.
|
virtual |
This function is called whenever HPS receives a TimerTickEvent This function moves the camera
in_state | A TimerTickEvent object describing the current timer tick. |
Reimplemented from HPS::Operator.
|
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. When the operator is first started, this function inserts a cutting section.
in_state | A TouchState object describing the current touch state. |
Reimplemented from HPS::SelectOperator.
|
virtual |
This function is called whenever HPS receives a TouchEvent that signals a point of contact has moved. After a cutting section has been inserted this function allows the user to translate a cutting section along its normal
in_state | A TouchState object describing the current touch state. |
Reimplemented from HPS::Operator.
|
virtual |
This function is called whenever HPS receives a TouchEvent that signals a point of contact has been released.
in_state | A TouchState object describing the current touch state. |
Reimplemented from HPS::Operator.
|
virtual |
This function is called whenever a view is attached to this operator.
Reimplemented from HPS::Operator.
|
virtual |
This function is called whenever a view is detached from this operator.
Reimplemented from HPS::Operator.
|
inline |
Sets the scale of the normal indicator displayed while mousing over the model when the operator is first started.
in_scale | The scale of the normal indicator |
void HPS::CuttingSectionOperator::SetIndicatorVisibility | ( | bool | in_use_indicator | ) |
This function allows the user to pick a cutting sections through the aid of a normal indicator when moving the mouse By default this mode is active when the operator is fist attached to a View
in_use_indicator | Whether to insert cutting sections through a normal indicator. |
|
inline |
Sets the mouse-over highlighting behavior
in_enable_mouse_over_highlighting | Whether to enable mouse-over highlighting. |
|
inline |
Sets the highlight options kit used when hovering over geometry, when mouse-over highlighting is enabled.
in_highlight_options | The highlight options kit used when hovering over geometry, when mouse-over highlighting is enabled. |
void HPS::CuttingSectionOperator::SetPlaneMaterial | ( | MaterialMappingKit const & | in_plane_material | ) |
Sets the material mapping kit applied to the cutting plane geometry.
in_plane_material | The material mapping kit applied to the cutting plane geometry. |
void HPS::CuttingSectionOperator::SetPlaneVisibility | ( | bool | in_visibility | ) |
Sets the visibility of cutting sections plane representation The cutting sections plane representation visibility is on by default.
in_visibility | Whether to enable the visibility of the cutting sections plane representation. |
void HPS::CuttingSectionOperator::SetSectioning | ( | bool | in_sectioning | ) |
Sets the sectioning behavior When sectioning is turned on the cutting planes are grouped together into a section
in_sectioning | Whether to enable sectioning. |