CuttingSectionOperator

class HPS::CuttingSectionOperator : public HPS::SelectOperator

Public Functions

CuttingSectionOperator(MouseButtons in_mouse_trigger = MouseButtons::ButtonLeft(), ModifierKeys in_modifier_trigger = ModifierKeys())
inline float GetIndicatorScale() const

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.

inline bool GetIndicatorVisibility()

Whether the plane normal indicator is visible

Returns

true if the plane normal indicator is visible, false otherwise.

inline bool GetMouseOverHighlighting() const

Whether mouse-over highlighting is enabled

Returns

true if mouse-over highlighting is enabled, false otherwise.

inline virtual HPS::UTF8 GetName() const

Returns the name of the operator.

inline HighlightOptionsKit GetPlaneHighlightOptions() const

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.

inline MaterialMappingKit GetPlaneMaterial() const

Returns the material mapping kit applied to the cutting plane geometry.

Returns

The material mapping kit applied to the cutting plane geometry.

PlaneArray GetPlanes()

This function returns the planes associated with the active cutting sections

Returns

planes associated with the active cutting sections.

bool GetPlaneVisibility()

Whether the cutting sections plane representations are visible

Returns

true if the cutting sections plane representations are visible, false otherwise.

inline bool GetSectioning()

Whether sectioning is enabled

Returns

true if sectioning is enabled, false otherwise.

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. 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.

virtual bool OnMouseMove(MouseState const &in_state)

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.

virtual bool OnMouseUp(MouseState const &in_state)

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.

virtual bool OnTimerTick(TimerTickEvent const &in_event)

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

Parameters

in_state – A TimerTickEvent object describing the current timer tick.

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. 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.

virtual bool OnTouchMove(TouchState const &in_state)

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.

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.

Parameters

in_state – A TouchState object describing the current touch state.

Returns

true if the input event was handled, false otherwise.

virtual void OnViewAttached(HPS::View const &in_attached_view)

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

Parameters

in_attached_view – The view attached to this operator.

virtual void OnViewDetached(HPS::View const &in_detached_view)

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

Parameters

in_detached_view – The view detached from this operator.

void RecalculateModelBounding()
inline void SetIndicatorScale(float in_scale)

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

void 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.

inline void SetMouseOverHighlighting(bool in_enable_mouse_over_highlighting)

Sets the mouse-over highlighting behavior

Parameters

in_enable_mouse_over_highlighting – Whether to enable mouse-over highlighting.

inline void SetPlaneHighlightOptions(HighlightOptionsKit const &in_highlight_options)

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.

void 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.

void 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.

void 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.

void 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.