< Home

< Table of Contents

REFERENCE MANUAL

CuttingSectionOperator Class Reference

#include <sprk_ops.h>

Inheritance diagram for CuttingSectionOperator:
SelectOperator Operator Sprocket Object

Public Member Functions

 CuttingSectionOperator (MouseButtons in_mouse_trigger=MouseButtons::ButtonLeft(), ModifierKeys in_modifier_trigger=ModifierKeys())
 
float GetIndicatorScale () const
 
bool GetMouseOverHighlighting () const
 
virtual UTF8 GetName () const
 
HighlightOptionsKit GetPlaneHighlightOptions () const
 
MaterialMappingKit GetPlaneMaterial () const
 
void InsertCuttingPlaneFromEquation (Plane const &in_plane)
 
virtual void OnModelAttached ()
 
virtual bool OnMouseDown (MouseState const &in_state)
 
virtual bool OnMouseMove (MouseState const &in_state)
 
virtual bool OnMouseUp (MouseState const &in_state)
 
virtual bool OnTimerTick (TimerTickEvent const &in_event)
 
virtual bool OnTouchDown (TouchState const &in_state)
 
virtual bool OnTouchMove (TouchState const &in_state)
 
virtual bool OnTouchUp (TouchState const &in_state)
 
virtual void OnViewAttached ()
 
virtual void OnViewDetached ()
 
void SetIndicatorScale (float in_scale)
 
void SetMouseOverHighlighting (bool in_enable_mouse_over_highlighting)
 
void SetPlaneHighlightOptions (HighlightOptionsKit const &in_highlight_options)
 
void SetPlaneMaterial (MaterialMappingKit const &in_plane_material)
 
- Public Member Functions inherited from SelectOperator
SelectionResults GetActiveSelection () const
 
SelectionOptionsKit GetSelectionOptions () const
 
 SelectOperator (MouseButtons in_mouse_trigger=MouseButtons::ButtonLeft(), ModifierKeys in_modifier_trigger=ModifierKeys())
 
void SetSelectionOptions (SelectionOptionsKit const &in_options)
 
- Public Member Functions inherited from Operator
virtual void Assign (Operator const &in_that)
 
void DetachView ()
 
virtual bool Equals (Operator const &in_that) const
 
View GetAttachedView () const
 
ModifierKeys GetModifierTrigger () const
 
MouseButtons GetMouseTrigger () const
 
virtual bool IsMouseTriggered (MouseState const &in_state)
 
Type ObjectType () const
 
virtual bool OnKeyDown (KeyboardState const &in_state)
 
virtual bool OnKeyUp (KeyboardState const &in_state)
 
virtual void OnModelDetached ()
 
virtual bool OnMouseEnter (MouseState const &in_state)
 
virtual bool OnMouseLeave (MouseState const &in_state)
 
virtual bool OnMouseWheel (MouseState const &in_state)
 
 Operator (MouseButtons in_mouse_trigger=MouseButtons::ButtonLeft(), ModifierKeys in_modifier_trigger=ModifierKeys())
 
 Operator (Operator const &in_that)
 
virtual bool operator!= (Operator const &in_that) const
 
virtual Operatoroperator= (Operator const &in_that)
 
virtual bool operator== (Operator const &in_that) const
 
void SetModifierTrigger (ModifierKeys in_modifiers)
 
void SetMouseTrigger (MouseButtons in_buttons)
 
- Public Member Functions inherited from Sprocket
 Sprocket (Sprocket &&in_that)
 
- Public Member Functions inherited from Object
virtual bool Empty () const
 
intptr_t GetClassID () const
 
intptr_t GetInstanceID () const
 
bool HasType (Type in_mask) const
 
 Object (Object &&in_that)
 
Objectoperator= (Object const &other_object)
 
Objectoperator= (Object &&in_that)
 
virtual void Reset ()
 
Type Type () const
 

Additional Inherited Members

- Public Types inherited from Operator
enum  Priority { Low, Normal, High }
 
- Public Types inherited from Sprocket
enum  UpdateType { Synchronous, Asynchronous }
 
- Static Public Member Functions inherited from Object
template<typename T >
static intptr_t ClassID ()
 
- Protected Attributes inherited from Operator
ModifierKeys modifier_trigger
 
MouseButtons mouse_trigger
 

Detailed Description

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.

Member Function Documentation

float 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.
bool CuttingSectionOperator::GetMouseOverHighlighting ( ) const
inline

Whether mouse-over highlighting is enabled

Returns
true if mouse-over highlighting is enabled, false otherwise.
virtual UTF8 CuttingSectionOperator::GetName ( ) const
inlinevirtual

Returns the name of the operator.

Reimplemented from SelectOperator.

HighlightOptionsKit CuttingSectionOperator::GetPlaneHighlightOptions ( ) const
inline

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.
MaterialMappingKit CuttingSectionOperator::GetPlaneMaterial ( ) const
inline

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

Returns
The material mapping kit applied to the cutting plane geometry.
virtual void CuttingSectionOperator::OnModelAttached ( )
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 Operator.

virtual bool 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_stateA MouseState object describing the current mouse state.
Returns
true if the input event was handled, false otherwise.

Reimplemented from SelectOperator.

virtual bool 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_stateA MouseState object describing the current mouse state.
Returns
true if the input event was handled, false otherwise.

Reimplemented from Operator.

virtual bool 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_stateA MouseState object describing the current mouse state.
Returns
true if the input event was handled, false otherwise.

Reimplemented from Operator.

virtual bool CuttingSectionOperator::OnTimerTick ( TimerTickEvent const &  in_event)
virtual

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

Parameters
in_stateA TimerTickEvent object describing the current timer tick.
Returns
true if the input event was handled, false otherwise.

Reimplemented from Operator.

virtual bool 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_stateA TouchState object describing the current touch state.
Returns
true if the input event was handled, false otherwise.

Reimplemented from SelectOperator.

virtual bool 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_stateA TouchState object describing the current touch state.
Returns
true if the input event was handled, false otherwise.

Reimplemented from Operator.

virtual bool 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_stateA TouchState object describing the current touch state.
Returns
true if the input event was handled, false otherwise.

Reimplemented from Operator.

virtual void CuttingSectionOperator::OnViewAttached ( )
virtual

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

Reimplemented from Operator.

virtual void CuttingSectionOperator::OnViewDetached ( )
virtual

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

Reimplemented from Operator.

void 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_scaleThe scale of the normal indicator
void CuttingSectionOperator::SetMouseOverHighlighting ( bool  in_enable_mouse_over_highlighting)
inline

Sets the mouse-over highlighting behavior

Parameters
in_enable_mouse_over_highlightingWhether to enable mouse-over highlighting.
void 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_optionsThe highlight options kit used when hovering over geometry, when mouse-over highlighting is enabled.
void CuttingSectionOperator::SetPlaneMaterial ( MaterialMappingKit const &  in_plane_material)

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

Parameters
in_plane_materialThe material mapping kit applied to the cutting plane geometry.

The documentation for this class was generated from the following file: