Hoops Visualize HPS  version 2018-SP2
Hoops Visualize HPS 3D Rendering Engine
Looking for a senior C++ dev?
I'm looking for work. Hire me!
HPS::CuttingSectionOperator Class Reference

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

#include <sprk_ops.h>

Inheritance diagram for HPS::CuttingSectionOperator:
Collaboration diagram for HPS::CuttingSectionOperator:

Public Types

enum  Priority {
  Priority::Low,
  Priority::Default,
  Priority::High
}
 

Public Member Functions

 CuttingSectionOperator (MouseButtons in_mouse_trigger=MouseButtons::ButtonLeft(), ModifierKeys in_modifier_trigger=ModifierKeys())
 
virtual HPS::UTF8 GetName () const
 Returns the name of the operator. More...
 
virtual void OnModelAttached ()
 This function is called whenever a model is attached to the view that is attached to this operator. More...
 
virtual void OnViewAttached ()
 This function is called whenever a view is attached to this operator. More...
 
virtual void OnViewDetached ()
 This function is called whenever a view is detached from this operator. More...
 
void SetPlanes (PlaneArray const &in_planes)
 This function programmatically assigns cutting planes to this operator from plane equations. More...
 
PlaneArray GetPlanes ()
 This function returns the planes associated with the active cutting sections. More...
 
virtual bool OnMouseDown (MouseState const &in_state)
 This function is called whenever HPS receives a MouseEvent that signals a mouse button was pressed. More...
 
virtual bool OnMouseUp (MouseState const &in_state)
 This function is called whenever HPS receives a MouseEvent that signals a mouse button was released. More...
 
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. More...
 
virtual bool OnTouchDown (TouchState const &in_state)
 This function is called whenever HPS receives a TouchEvent that signals the device was touched. More...
 
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. More...
 
virtual bool OnTouchMove (TouchState const &in_state)
 This function is called whenever HPS receives a TouchEvent that signals a point of contact has moved. More...
 
virtual bool OnTimerTick (TimerTickEvent const &in_event)
 This function is called whenever HPS receives a TimerTickEvent This function moves the camera. More...
 
float GetIndicatorScale () const
 Returns the scale used for the normal indicator displayed while mousing over the model when the operator is first started. More...
 
void SetIndicatorScale (float in_scale)
 Sets the scale of the normal indicator displayed while mousing over the model when the operator is first started. More...
 
MaterialMappingKit GetPlaneMaterial () const
 Returns the material mapping kit applied to the cutting plane geometry. More...
 
void SetPlaneMaterial (MaterialMappingKit const &in_plane_material)
 Sets the material mapping kit applied to the cutting plane geometry. More...
 
HighlightOptionsKit GetPlaneHighlightOptions () const
 Returns the highlight options kit used when hovering over geometry, when mouse-over highlighting is enabled. More...
 
void SetPlaneHighlightOptions (HighlightOptionsKit const &in_highlight_options)
 Sets the highlight options kit used when hovering over geometry, when mouse-over highlighting is enabled. More...
 
bool GetMouseOverHighlighting () const
 Whether mouse-over highlighting is enabled. More...
 
void SetMouseOverHighlighting (bool in_enable_mouse_over_highlighting)
 Sets the mouse-over highlighting behavior. More...
 
void SetSectioning (bool in_sectioning)
 Sets the sectioning behavior When sectioning is turned on the cutting planes are grouped together into a section. More...
 
bool GetSectioning ()
 Whether sectioning is enabled. More...
 
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. More...
 
bool GetIndicatorVisibility ()
 Whether the plane normal indicator is visible. More...
 
void SetPlaneVisibility (bool in_visibility)
 Sets the visibility of cutting sections plane representation The cutting sections plane representation visibility is on by default. More...
 
bool GetPlaneVisibility ()
 Whether the cutting sections plane representations are visible. More...
 
HPS::SelectionResults GetActiveSelection () const
 This method returns the results of the last selection action. More...
 
void SetSelectionOptions (HPS::SelectionOptionsKit const &in_options)
 Accepts a SelectionOptionsKit that defines the parameters that will be used for selection. More...
 
HPS::SelectionOptionsKit GetSelectionOptions () const
 Gets the HPS::SelectionOptionsKit that has been set on this operator. More...
 
HPS::Type ObjectType () const
 
virtual void Assign (Operator const &in_that)
 Assigns the parameter in_that to this operator, resulting in a clone. More...
 
virtual bool Equals (Operator const &in_that) const
 Tests this operator for equality against the parameter in_that. More...
 
virtual bool operator!= (Operator const &in_that) const
 Tests this operator for non-equality against the parameter in_that. More...
 
virtual bool operator== (Operator const &in_that) const
 Tests this operator for equality against the parameter in_that. More...
 
void DetachView ()
 Detaches the Operator from the View it was previously attached to. More...
 
View GetAttachedView () const
 Returns the View the Operator is currently attached to. More...
 
virtual bool OnMouseWheel (MouseState const &in_state)
 This function is called whenever HPS receives a MouseEvent that signals the mouse wheel was scrolled. More...
 
virtual bool OnMouseEnter (MouseState const &in_state)
 This function is called whenever HPS receives a MouseEvent that signals the mouse entered the window. More...
 
virtual bool OnMouseLeave (MouseState const &in_state)
 This function is called whenever HPS receives a MouseEvent that signals the mouse left the window. More...
 
virtual bool OnKeyDown (KeyboardState const &in_state)
 This function is called whenever HPS receives a KeyboardEvent that signals a key was pressed. More...
 
virtual bool OnKeyUp (KeyboardState const &in_state)
 This function is called whenever HPS receives a KeyboardEvent that signals a key was released. More...
 
virtual bool OnTextInput (HPS::UTF8 const &in_text)
 This function is called whenever HPS receives a TextInputEvent that signals text was entered. More...
 
virtual void OnModelDetached ()
 This function is called whenever a model is detached from the view that is attached to this operator. More...
 
void SetMouseTrigger (MouseButtons in_buttons)
 Sets the mouse trigger for this operator. More...
 
MouseButtons GetMouseTrigger () const
 Gets the mouse trigger associated with this operator. More...
 
void SetModifierTrigger (ModifierKeys in_modifiers)
 Sets the modifier trigger associated with this operator. More...
 
ModifierKeys GetModifierTrigger () const
 Gets the modifier trigger associated with this operator. More...
 
virtual bool IsMouseTriggered (MouseState const &in_state)
 Returns true if the MouseButtons and ModifierKeys are active. More...
 
virtual HPS::Type Type () const
 This function returns the true type of the underlying object. More...
 
virtual bool Empty () const
 Indicates whether this object has any values set on it. More...
 
virtual void Reset ()
 Resets this object to its initial, uninitialized state. More...
 
bool HasType (HPS::Type in_mask) const
 This function indicates whether this Object has the given Type mask. More...
 
intptr_t GetClassID () const
 Returns a unique identifier that is shared by all objects of the same class. More...
 
intptr_t GetInstanceID () const
 Returns an identifier that can be used to identify which instance of a class an object is. More...
 

Static Public Member Functions

template<typename T >
static intptr_t ClassID ()
 Unique identifier for this class. More...
 

Static Public Attributes

static const HPS::Type staticType = HPS::Type::Operator
 

Protected Attributes

HPS::SelectionResults active_selection
 
HPS::MouseButtons mouse_trigger
 
HPS::ModifierKeys modifier_trigger
 

Private Types

enum  OpState {
  OpState::Uninitialized,
  OpState::Initialized,
  OpState::Translating,
  OpState::FacePicking
}
 
typedef std::pair< CuttingSectionKey, std::vector< ShellKey > > SectionInfo
 
typedef std::vector< SectionInfoSectionArray
 

Private Member Functions

void SetupOperatorSegment ()
 
void InsertNormalIndicator (float scale)
 
ShellKey InsertCuttingPlaneGeometry ()
 
void MouseOverHighlighting (MouseState const &in_state)
 
void TranslateCuttingPlane (KeyPath const &in_event_path, WindowPoint const &in_event_location)
 
bool HandleMouseAndTouchDown (WindowKey const &in_event_source, size_t in_number_of_clicks, KeyPath const &in_event_path, WindowPoint const &in_event_location)
 
void ViewAlignSectionPlanes (HPS::PlaneArray &in_out_planes) const
 

Private Attributes

SectionArray sections
 
SegmentKey operator_root_segment
 
SegmentKey cutting_sections_segment
 
SegmentKey plane_representation_segment
 
bool sectioning
 
CuttingSectionKey translating_section
 
size_t translating_plane_offset
 
ShellKey translating_plane_representation
 
TouchID tracked_touch_ID
 
MaterialMappingKit plane_material
 
SegmentKey indicator_seg
 
OpState op_state
 
WorldPoint start_world_point
 
SelectionOptionsKit selection_options
 
SelectionOptionsKit mouse_over_selection_options
 
float indicator_scale
 
Vector plane_normal
 
bool plane_normal_valid
 
WorldPoint anchor_point
 
SimpleCuboid model_bounding
 
UpdateNotifier last_highlight_notifier
 
bool last_skipped_highlight_state_valid
 
MouseState last_skipped_highlight_state
 
bool is_plane_highlighted
 
PortfolioKey portfolio
 
SegmentKey style_segment
 
HighlightOptionsKit highlight_options
 
bool enable_mouse_over_highlighting
 
bool skip_mouse_overs
 
View attached_view
 
KeyArray navigation_keys
 

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 Typedef Documentation

◆ SectionArray

◆ SectionInfo

typedef std::pair<CuttingSectionKey, std::vector<ShellKey> > HPS::CuttingSectionOperator::SectionInfo
private

Member Enumeration Documentation

◆ OpState

Enumerator
Uninitialized 
Initialized 
Translating 
FacePicking 

◆ Priority

enum HPS::Operator::Priority
stronginherited
Enumerator
Low 
Default 
High 

Constructor & Destructor Documentation

◆ CuttingSectionOperator()

HPS::CuttingSectionOperator::CuttingSectionOperator ( MouseButtons  in_mouse_trigger = MouseButtons::ButtonLeft(),
ModifierKeys  in_modifier_trigger = ModifierKeys() 
)

Member Function Documentation

◆ Assign()

virtual void HPS::Operator::Assign ( Operator const &  in_that)
virtualinherited

Assigns the parameter in_that to this operator, resulting in a clone.

◆ ClassID()

template<typename T >
static intptr_t HPS::Object::ClassID ( )
inlinestaticinherited

Unique identifier for this class.

Note: this method uses construction of static objects. If used in a constructor, it should be used in the body not the initializer list.

◆ DetachView()

void HPS::Operator::DetachView ( )
inherited

Detaches the Operator from the View it was previously attached to.

◆ Empty()

virtual bool HPS::Object::Empty ( ) const
inlinevirtualinherited

Indicates whether this object has any values set on it.

Returns
true if no values are set on this object, false otherwise.

Reimplemented in HPS::STL::ImportResultsKit, HPS::STL::ImportOptionsKit, HPS::OBJ::ImportResultsKit, HPS::OBJ::ImportOptionsKit, HPS::Hardcopy::File::ExportOptionsKit, HPS::Stream::ExportOptionsKit, HPS::Stream::ImportResultsKit, HPS::Stream::ImportOptionsKit, HPS::PointCloud::ImportOptionsKit, HPS::PointCloud::ImportResultsKit, HPS::UpdateOptionsKit, HPS::HighlightSearchOptionsKit, HPS::HighlightOptionsKit, HPS::SelectionOptionsKit, HPS::SearchOptionsKit, HPS::CutGeometryGatheringOptionsKit, HPS::ShapeKit, HPS::ShaderKit, HPS::Shader::ImportOptionsKit, HPS::ImageKit, HPS::Image::ImportOptionsKit, HPS::Image::ExportOptionsKit, HPS::TextureOptionsKit, HPS::LinePatternKit, HPS::LinePatternParallelKit, HPS::LinePatternOptionsKit, HPS::GlyphKit, HPS::ApplicationWindowOptionsKit, HPS::OffScreenWindowOptionsKit, HPS::StandAloneWindowOptionsKit, HPS::GridKit, HPS::PolygonKit, HPS::MeshKit, HPS::ShellKit, HPS::ShellRelationResultsKit, HPS::ShellRelationOptionsKit, HPS::ShellOptimizationOptionsKit, HPS::TextKit, HPS::EllipticalArcKit, HPS::EllipseKit, HPS::TrimKit, HPS::NURBSSurfaceKit, HPS::NURBSCurveKit, HPS::SpotlightKit, HPS::InfiniteLineKit, HPS::CuttingSectionKit, HPS::CircularWedgeKit, HPS::CircularArcKit, HPS::CircleKit, HPS::SphereKit, HPS::CylinderKit, HPS::DistantLightKit, HPS::MarkerKit, HPS::LineKit, HPS::AttributeLockKit, HPS::FontInfoState, HPS::WindowInfoKit, HPS::DebuggingKit, HPS::SubwindowKit, HPS::ContourLineKit, HPS::VisualEffectsKit, HPS::TransformMaskKit, HPS::PostProcessEffectsKit, HPS::DrawingAttributeKit, HPS::HiddenLineAttributeKit, HPS::PerformanceKit, HPS::NURBSSurfaceAttributeKit, HPS::MaterialKit, HPS::MaterialMappingKit, HPS::MatrixKit, HPS::CurveAttributeKit, HPS::EdgeAttributeKit, HPS::LineAttributeKit, HPS::TextAttributeKit, HPS::CuttingSectionAttributeKit, HPS::CylinderAttributeKit, HPS::LightingAttributeKit, HPS::SphereAttributeKit, HPS::MarkerAttributeKit, HPS::CullingKit, HPS::ColorInterpolationKit, HPS::TransparencyKit, HPS::SelectabilityKit, HPS::CameraKit, HPS::VisibilityKit, HPS::BoundingKit, HPS::SegmentOptimizationOptionsKit, HPS::Publish::ExportOptionsKit, HPS::Publish::TextFieldKit, HPS::Publish::SignatureFieldKit, HPS::Publish::DropDownListKit, HPS::Exchange::TessellationOptionsKit, HPS::Publish::ListBoxKit, HPS::Exchange::ExportSTEPOptionsKit, HPS::Exchange::ExportParasolidOptionsKit, HPS::Publish::RadioButtonKit, HPS::Exchange::ExportIGESOptionsKit, HPS::Exchange::ExportXMLOptionsKit, HPS::Publish::CheckBoxKit, HPS::Exchange::ExportU3DOptionsKit, HPS::Exchange::ExportSTLOptionsKit, HPS::Publish::ButtonKit, HPS::Exchange::ExportPRCOptionsKit, HPS::Publish::LinkKit, HPS::Exchange::ExportJTOptionsKit, HPS::Publish::SlideTableKit, HPS::Exchange::ExportACISOptionsKit, HPS::Publish::TableKit, HPS::Exchange::Export3MFOptionsKit, HPS::Publish::ImageKit, HPS::Publish::TextKit, HPS::Exchange::ModelFileImportOptionsKit, HPS::Publish::ViewKit, HPS::Exchange::TranslationOptionsKit, HPS::Publish::ArtworkKit, HPS::Publish::AnnotationKit, HPS::ComponentPath, HPS::Exchange::ImportOptionsKit, HPS::Parasolid::ExportOptionsKit, HPS::Exchange::NURBSConversionOptionsKit, HPS::Parasolid::LineTessellationKit, HPS::Exchange::Configuration, HPS::Publish::PageKit, HPS::Parasolid::FacetTessellationKit, HPS::Publish::DocumentKit, HPS::Parasolid::ImportOptionsKit, HPS::DWG::ImportOptionsKit, HPS::OOC::ImportOptionsKit, HPS::Sketchup::ImportOptionsKit, and HPS::Sketchup::ImportResultsKit.

◆ Equals()

virtual bool HPS::Operator::Equals ( Operator const &  in_that) const
virtualinherited

Tests this operator for equality against the parameter in_that.

Same as Operator::operator==

◆ GetActiveSelection()

HPS::SelectionResults HPS::SelectOperator::GetActiveSelection ( ) const
inherited

This method returns the results of the last selection action.

If no objects were selected, the SelectionResults object returned will be have a count of 0.

◆ GetAttachedView()

View HPS::Operator::GetAttachedView ( ) const
inherited

Returns the View the Operator is currently attached to.

◆ GetClassID()

intptr_t HPS::Object::GetClassID ( ) const
inherited

Returns a unique identifier that is shared by all objects of the same class.

Returns
A unique value shared by all objects of the same class.

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

◆ GetInstanceID()

intptr_t HPS::Object::GetInstanceID ( ) const
inherited

Returns an identifier that can be used to identify which instance of a class an object is.

Different keys and controls will return the same value if they are backed by the same database resource.

Returns
A value unique to an instance of an object and all objects that are backed by the same database resource.

◆ GetModifierTrigger()

ModifierKeys HPS::Operator::GetModifierTrigger ( ) const
inlineinherited

Gets the modifier trigger associated with this operator.

◆ GetMouseOverHighlighting()

bool HPS::CuttingSectionOperator::GetMouseOverHighlighting ( ) const
inline

Whether mouse-over highlighting is enabled.

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

◆ GetMouseTrigger()

MouseButtons HPS::Operator::GetMouseTrigger ( ) const
inlineinherited

Gets the mouse trigger associated with this operator.

◆ GetName()

virtual HPS::UTF8 HPS::CuttingSectionOperator::GetName ( ) const
inlinevirtual

Returns the name of the operator.

Reimplemented from HPS::SelectOperator.

◆ GetPlaneHighlightOptions()

HighlightOptionsKit HPS::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.

◆ GetPlaneMaterial()

MaterialMappingKit HPS::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.

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

◆ GetSelectionOptions()

HPS::SelectionOptionsKit HPS::SelectOperator::GetSelectionOptions ( ) const
inlineinherited

Gets the HPS::SelectionOptionsKit that has been set on this operator.

Returns
The HPS::SelectionOptionsKit associated with this operator

◆ HandleMouseAndTouchDown()

bool HPS::CuttingSectionOperator::HandleMouseAndTouchDown ( WindowKey const &  in_event_source,
size_t  in_number_of_clicks,
KeyPath const &  in_event_path,
WindowPoint const &  in_event_location 
)
private

◆ HasType()

bool HPS::Object::HasType ( HPS::Type  in_mask) const
inherited

This function indicates whether this Object has the given Type mask.

Parameters
in_maskThe Type mask to check against this Object.
Returns
true if this Object has the given Type mask, false otherwise.

◆ InsertCuttingPlaneGeometry()

ShellKey HPS::CuttingSectionOperator::InsertCuttingPlaneGeometry ( )
private

◆ InsertNormalIndicator()

void HPS::CuttingSectionOperator::InsertNormalIndicator ( float  scale)
private

◆ IsMouseTriggered()

virtual bool HPS::Operator::IsMouseTriggered ( MouseState const &  in_state)
inlinevirtualinherited

Returns true if the MouseButtons and ModifierKeys are active.

Reimplemented in HPS::SimpleWalkOperator.

Here is the call graph for this function:

◆ MouseOverHighlighting()

void HPS::CuttingSectionOperator::MouseOverHighlighting ( MouseState const &  in_state)
private

◆ ObjectType()

HPS::Type HPS::Operator::ObjectType ( ) const
inlinevirtualinherited

Reimplemented from HPS::Object.

Here is the call graph for this function:

◆ OnKeyDown()

virtual bool HPS::Operator::OnKeyDown ( KeyboardState const &  in_state)
inlinevirtualinherited

This function is called whenever HPS receives a KeyboardEvent that signals a key was pressed.

Parameters
in_stateA KeyboardState object describing the current keyboard state.
Returns
true if the input event was handled, false otherwise.

Reimplemented in HPS::Exchange::MeasurementOperator, HPS::AnnotationOperator, HPS::MarkupOperator, HPS::SimpleWalkOperator, and HPS::FlyOperator.

◆ OnKeyUp()

virtual bool HPS::Operator::OnKeyUp ( KeyboardState const &  in_state)
inlinevirtualinherited

This function is called whenever HPS receives a KeyboardEvent that signals a key was released.

Parameters
in_stateA KeyboardState object describing the current keyboard state.
Returns
true if the input event was handled, false otherwise.

Reimplemented in HPS::SimpleWalkOperator, and HPS::FlyOperator.

◆ OnModelAttached()

virtual void HPS::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 HPS::Operator.

◆ OnModelDetached()

virtual void HPS::Operator::OnModelDetached ( )
inlinevirtualinherited

This function is called whenever a model is detached from the view that is attached to this operator.

If no view is attached to this operator, this function will not be called.

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

Reimplemented from HPS::SelectOperator.

◆ OnMouseEnter()

virtual bool HPS::Operator::OnMouseEnter ( MouseState const &  in_state)
inlinevirtualinherited

This function is called whenever HPS receives a MouseEvent that signals the mouse entered the window.

Parameters
in_stateA MouseState object describing the current mouse state.
Returns
true if the input event was handled, false otherwise.

Reimplemented in HPS::SimpleWalkOperator.

◆ OnMouseLeave()

virtual bool HPS::Operator::OnMouseLeave ( MouseState const &  in_state)
inlinevirtualinherited

This function is called whenever HPS receives a MouseEvent that signals the mouse left the window.

Parameters
in_stateA MouseState object describing the current mouse state.
Returns
true if the input event was handled, false otherwise.

Reimplemented in HPS::SimpleWalkOperator.

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

Reimplemented from HPS::Operator.

◆ OnMouseWheel()

virtual bool HPS::Operator::OnMouseWheel ( MouseState const &  in_state)
inlinevirtualinherited

This function is called whenever HPS receives a MouseEvent that signals the mouse wheel was scrolled.

Parameters
in_stateA MouseState object describing the current mouse state.
Returns
true if the input event was handled, false otherwise.

Reimplemented in HPS::SimpleWalkOperator, HPS::FlyOperator, HPS::TurntableOperator, and HPS::MouseWheelOperator.

◆ OnTextInput()

virtual bool HPS::Operator::OnTextInput ( HPS::UTF8 const &  in_text)
inlinevirtualinherited

This function is called whenever HPS receives a TextInputEvent that signals text was entered.

Parameters
in_textThe text entered.
Returns
true if the input event was handled, false otherwise.

Reimplemented in HPS::AnnotationOperator, and HPS::MarkupOperator.

◆ 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
in_stateA TimerTickEvent object describing the current timer tick.
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_stateA 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_stateA 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_stateA 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 ( )
virtual

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

Reimplemented from HPS::Operator.

◆ OnViewDetached()

virtual void HPS::CuttingSectionOperator::OnViewDetached ( )
virtual

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

Reimplemented from HPS::Operator.

◆ operator!=()

virtual bool HPS::Operator::operator!= ( Operator const &  in_that) const
virtualinherited

Tests this operator for non-equality against the parameter in_that.

◆ operator==()

virtual bool HPS::Operator::operator== ( Operator const &  in_that) const
virtualinherited

Tests this operator for equality against the parameter in_that.

Same as Operator::Equals.

◆ Reset()

◆ 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_scaleThe 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_indicatorWhether to insert cutting sections through a normal indicator.

◆ SetModifierTrigger()

void HPS::Operator::SetModifierTrigger ( ModifierKeys  in_modifiers)
inlineinherited

Sets the modifier trigger associated with this operator.

Parameters
in_modifiersThe modifier keys that are used to trigger this operator.

◆ SetMouseOverHighlighting()

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

◆ SetMouseTrigger()

void HPS::Operator::SetMouseTrigger ( MouseButtons  in_buttons)
inlineinherited

Sets the mouse trigger for this operator.

◆ 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_optionsThe 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_materialThe 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_planesAn 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_visibilityWhether 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_sectioningWhether to enable sectioning.

◆ SetSelectionOptions()

void HPS::SelectOperator::SetSelectionOptions ( HPS::SelectionOptionsKit const &  in_options)
inlineinherited

Accepts a SelectionOptionsKit that defines the parameters that will be used for selection.

Parameters
in_optionsThe SelectionOptionsKit from which the selection options will be set

◆ SetupOperatorSegment()

void HPS::CuttingSectionOperator::SetupOperatorSegment ( )
private

◆ TranslateCuttingPlane()

void HPS::CuttingSectionOperator::TranslateCuttingPlane ( KeyPath const &  in_event_path,
WindowPoint const &  in_event_location 
)
private

◆ Type()

◆ ViewAlignSectionPlanes()

void HPS::CuttingSectionOperator::ViewAlignSectionPlanes ( HPS::PlaneArray in_out_planes) const
private

Member Data Documentation

◆ active_selection

HPS::SelectionResults HPS::SelectOperator::active_selection
protectedinherited

◆ anchor_point

WorldPoint HPS::CuttingSectionOperator::anchor_point
private

◆ attached_view

View HPS::CuttingSectionOperator::attached_view
private

◆ cutting_sections_segment

SegmentKey HPS::CuttingSectionOperator::cutting_sections_segment
private

◆ enable_mouse_over_highlighting

bool HPS::CuttingSectionOperator::enable_mouse_over_highlighting
private

◆ highlight_options

HighlightOptionsKit HPS::CuttingSectionOperator::highlight_options
private

◆ indicator_scale

float HPS::CuttingSectionOperator::indicator_scale
private

◆ indicator_seg

SegmentKey HPS::CuttingSectionOperator::indicator_seg
private

◆ is_plane_highlighted

bool HPS::CuttingSectionOperator::is_plane_highlighted
private

◆ last_highlight_notifier

UpdateNotifier HPS::CuttingSectionOperator::last_highlight_notifier
private

◆ last_skipped_highlight_state

MouseState HPS::CuttingSectionOperator::last_skipped_highlight_state
private

◆ last_skipped_highlight_state_valid

bool HPS::CuttingSectionOperator::last_skipped_highlight_state_valid
private

◆ model_bounding

SimpleCuboid HPS::CuttingSectionOperator::model_bounding
private

◆ modifier_trigger

HPS::ModifierKeys HPS::Operator::modifier_trigger
protectedinherited

◆ mouse_over_selection_options

SelectionOptionsKit HPS::CuttingSectionOperator::mouse_over_selection_options
private

◆ mouse_trigger

HPS::MouseButtons HPS::Operator::mouse_trigger
protectedinherited

◆ navigation_keys

KeyArray HPS::CuttingSectionOperator::navigation_keys
private

◆ op_state

OpState HPS::CuttingSectionOperator::op_state
private

◆ operator_root_segment

SegmentKey HPS::CuttingSectionOperator::operator_root_segment
private

◆ plane_material

MaterialMappingKit HPS::CuttingSectionOperator::plane_material
private

◆ plane_normal

Vector HPS::CuttingSectionOperator::plane_normal
private

◆ plane_normal_valid

bool HPS::CuttingSectionOperator::plane_normal_valid
private

◆ plane_representation_segment

SegmentKey HPS::CuttingSectionOperator::plane_representation_segment
private

◆ portfolio

PortfolioKey HPS::CuttingSectionOperator::portfolio
private

◆ sectioning

bool HPS::CuttingSectionOperator::sectioning
private

◆ sections

SectionArray HPS::CuttingSectionOperator::sections
private

◆ selection_options

SelectionOptionsKit HPS::CuttingSectionOperator::selection_options
private

◆ skip_mouse_overs

bool HPS::CuttingSectionOperator::skip_mouse_overs
private

◆ start_world_point

WorldPoint HPS::CuttingSectionOperator::start_world_point
private

◆ staticType

const HPS::Type HPS::Operator::staticType = HPS::Type::Operator
staticinherited

◆ style_segment

SegmentKey HPS::CuttingSectionOperator::style_segment
private

◆ tracked_touch_ID

TouchID HPS::CuttingSectionOperator::tracked_touch_ID
private

◆ translating_plane_offset

size_t HPS::CuttingSectionOperator::translating_plane_offset
private

◆ translating_plane_representation

ShellKey HPS::CuttingSectionOperator::translating_plane_representation
private

◆ translating_section

CuttingSectionKey HPS::CuttingSectionOperator::translating_section
private

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