#include <sprk_ops.h>
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.
Mouse-driven devices:
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. |
Touch-driven devices:
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. |
◆ GetIndicatorScale()
float HPS::CuttingSectionOperator::GetIndicatorScale |
( |
| ) |
const |
|
inline |
Returns the scale used for the normal indicator displayed while mousing over the model when the operator is first started.
- Returns
- The scale of the normal indicator.
◆ GetIndicatorVisibility()
bool HPS::CuttingSectionOperator::GetIndicatorVisibility |
( |
| ) |
|
|
inline |
Whether the plane normal indicator is visible
- Returns
- true if the plane normal indicator is visible, false otherwise.
◆ GetMouseOverHighlighting()
bool HPS::CuttingSectionOperator::GetMouseOverHighlighting |
( |
| ) |
const |
|
inline |
Whether mouse-over highlighting is enabled
- Returns
- true if mouse-over highlighting is enabled, false otherwise.
◆ GetName()
virtual HPS::UTF8 HPS::CuttingSectionOperator::GetName |
( |
| ) |
const |
|
inlinevirtual |
◆ GetPlaneHighlightOptions()
Returns the highlight options kit used when hovering over geometry, when mouse-over highlighting is enabled.
- Returns
- the highlight options kit used when hovering over geometry, when mouse-over highlighting is enabled.
◆ GetPlaneMaterial()
Returns the material mapping kit applied to the cutting plane geometry.
- Returns
- The material mapping kit applied to the cutting plane geometry.
◆ GetPlanes()
PlaneArray HPS::CuttingSectionOperator::GetPlanes |
( |
| ) |
|
This function returns the planes associated with the active cutting sections
- Returns
- planes associated with the active cutting sections.
◆ GetPlaneVisibility()
bool HPS::CuttingSectionOperator::GetPlaneVisibility |
( |
| ) |
|
Whether the cutting sections plane representations are visible
- Returns
- true if the cutting sections plane representations are visible, false otherwise.
◆ GetSectioning()
bool HPS::CuttingSectionOperator::GetSectioning |
( |
| ) |
|
|
inline |
Whether sectioning is enabled
- Returns
- true if sectioning is enabled, false otherwise.
◆ OnMouseDown()
virtual bool HPS::CuttingSectionOperator::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. When the operator is first started, this function inserts a cutting section.
- Parameters
-
in_state | A MouseState object describing the current mouse state. |
- Returns
- true if the input event was handled, false otherwise.
Reimplemented from HPS::SelectOperator.
◆ OnMouseMove()
virtual bool HPS::CuttingSectionOperator::OnMouseMove |
( |
MouseState const & |
in_state | ) |
|
|
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
- Parameters
-
in_state | A MouseState object describing the current mouse state. |
- Returns
- true if the input event was handled, false otherwise.
Reimplemented from HPS::Operator.
◆ OnMouseUp()
virtual bool HPS::CuttingSectionOperator::OnMouseUp |
( |
MouseState const & |
in_state | ) |
|
|
virtual |
This function is called whenever HPS receives a MouseEvent that signals a mouse button was released.
- Parameters
-
in_state | A MouseState object describing the current mouse state. |
- Returns
- true if the input event was handled, false otherwise.
Reimplemented from HPS::Operator.
◆ OnTimerTick()
virtual bool HPS::CuttingSectionOperator::OnTimerTick |
( |
TimerTickEvent const & |
in_event | ) |
|
|
virtual |
This function is called whenever HPS receives a TimerTickEvent This function moves the camera
- Parameters
-
- Returns
- true if the input event was handled, false otherwise.
Reimplemented from HPS::Operator.
◆ OnTouchDown()
virtual bool HPS::CuttingSectionOperator::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. When the operator is first started, this function inserts a cutting section.
- Parameters
-
in_state | A TouchState object describing the current touch state. |
- Returns
- true if the input event was handled, false otherwise.
Reimplemented from HPS::SelectOperator.
◆ OnTouchMove()
virtual bool HPS::CuttingSectionOperator::OnTouchMove |
( |
TouchState const & |
in_state | ) |
|
|
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
- Parameters
-
in_state | A TouchState object describing the current touch state. |
- Returns
- true if the input event was handled, false otherwise.
Reimplemented from HPS::Operator.
◆ OnTouchUp()
virtual bool HPS::CuttingSectionOperator::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_state | A TouchState object describing the current touch state. |
- Returns
- true if the input event was handled, false otherwise.
Reimplemented from HPS::Operator.
◆ OnViewAttached()
virtual void HPS::CuttingSectionOperator::OnViewAttached |
( |
HPS::View const & |
in_attached_view | ) |
|
|
virtual |
This function is called whenever a view is attached to this operator.
- Parameters
-
in_attached_view | The view attached to this operator. |
Reimplemented from HPS::Operator.
◆ OnViewDetached()
virtual void HPS::CuttingSectionOperator::OnViewDetached |
( |
HPS::View const & |
in_detached_view | ) |
|
|
virtual |
This function is called whenever a view is detached from this operator.
- Parameters
-
in_detached_view | The view detached from this operator. |
Reimplemented from HPS::Operator.
◆ SetIndicatorScale()
void HPS::CuttingSectionOperator::SetIndicatorScale |
( |
float |
in_scale | ) |
|
|
inline |
Sets the scale of the normal indicator displayed while mousing over the model when the operator is first started.
- Parameters
-
in_scale | The scale of the normal indicator |
◆ SetIndicatorVisibility()
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
- Parameters
-
in_use_indicator | Whether to insert cutting sections through a normal indicator. |
◆ SetMouseOverHighlighting()
void HPS::CuttingSectionOperator::SetMouseOverHighlighting |
( |
bool |
in_enable_mouse_over_highlighting | ) |
|
|
inline |
Sets the mouse-over highlighting behavior
- Parameters
-
in_enable_mouse_over_highlighting | Whether to enable mouse-over highlighting. |
◆ SetPlaneHighlightOptions()
void HPS::CuttingSectionOperator::SetPlaneHighlightOptions |
( |
HighlightOptionsKit const & |
in_highlight_options | ) |
|
|
inline |
Sets the highlight options kit used when hovering over geometry, when mouse-over highlighting is enabled.
- Parameters
-
in_highlight_options | The highlight options kit used when hovering over geometry, when mouse-over highlighting is enabled. |
◆ SetPlaneMaterial()
void HPS::CuttingSectionOperator::SetPlaneMaterial |
( |
MaterialMappingKit const & |
in_plane_material | ) |
|
Sets the material mapping kit applied to the cutting plane geometry.
- Parameters
-
in_plane_material | The material mapping kit applied to the cutting plane geometry. |
◆ SetPlanes()
void HPS::CuttingSectionOperator::SetPlanes |
( |
PlaneArray const & |
in_planes | ) |
|
This function programmatically assigns cutting planes to this operator from plane equations. If this operator has already had cutting planes associated with it, the cutting planes set using this function replace the previous cutting planes.
- Parameters
-
in_planes | An array of Plane objects describing the cutting planes to be inserted. |
◆ SetPlaneVisibility()
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.
- Parameters
-
in_visibility | Whether to enable the visibility of the cutting sections plane representation. |
◆ SetSectioning()
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
- Parameters
-
in_sectioning | Whether to enable sectioning. |
The documentation for this class was generated from the following file: