#include <sprk_exchange.h>

Classes | |
class | MeasurementDeletedEvent |
class | MeasurementInsertedEvent |
Public Types | |
enum | Tags { Name = 0, MeasurementType, Radius, Inverted, VectorX, VectorY, VectorZ } |
![]() | |
enum | Priority { Low, Default, High } |
Public Member Functions | |
CommonMeasurementOperator (Exchange::CADModel const &in_cad_model, MouseButtons in_mouse_trigger=MouseButtons::ButtonLeft(), ModifierKeys in_modifier_trigger=ModifierKeys()) | |
void | DeleteMeasurements () |
Exchange::CADModel | GetCADModel () const |
MaterialMappingKit | GetMaterial () const |
SegmentKey | GetMeasurementSegment () const |
virtual HPS::UTF8 | GetName () const override |
size_t | GetPrecision () const |
TextAttributeKit | GetTextAttributes () const |
virtual void | OnViewAttached (HPS::View const &in_attached_view) override |
virtual void | OnViewDetached (HPS::View const &in_detached_view) override |
void | SetCADModel (Exchange::CADModel const &in_cad_model) |
void | SetMaterial (MaterialMappingKit const &in_material_mapping) |
void | SetPrecision (size_t in_precision) |
void | SetTextAttribute (TextAttributeKit const &in_text_attributes) |
![]() | |
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) |
HPS::Type | ObjectType () const |
virtual bool | OnKeyDown (KeyboardState const &in_state) |
virtual bool | OnKeyUp (KeyboardState const &in_state) |
virtual void | OnModelAttached () |
virtual void | OnModelDetached () |
virtual bool | OnMouseDown (MouseState const &in_state) |
virtual bool | OnMouseEnter (MouseState const &in_state) |
virtual bool | OnMouseLeave (MouseState const &in_state) |
virtual bool | OnMouseMove (MouseState const &in_state) |
virtual bool | OnMouseUp (MouseState const &in_state) |
virtual bool | OnMouseWheel (MouseState const &in_state) |
virtual bool | OnTextInput (HPS::UTF8 const &in_text) |
virtual bool | OnTimerTick (HPS::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) |
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 Operator & | operator= (Operator const &in_that) |
virtual bool | operator== (Operator const &in_that) const |
void | SetModifierTrigger (ModifierKeys in_modifiers) |
void | SetMouseTrigger (MouseButtons in_buttons) |
![]() | |
Sprocket (Sprocket &&in_that) | |
![]() | |
virtual bool | Empty () const |
intptr_t | GetClassID () const |
intptr_t | GetInstanceID () const |
bool | HasType (HPS::Type in_mask) const |
Object (Object const &that) | |
Object (Object &&in_that) | |
Object & | operator= (Object const &other_object) |
Object & | operator= (Object &&in_that) |
virtual void | Reset () |
virtual HPS::Type | Type () const |
Static Public Member Functions | |
static UTF8 | GetNewMeasurementSegmentName (HPS::UTF8 const &in_prefix) |
![]() | |
template<typename T > | |
static intptr_t | ClassID () |
Protected Member Functions | |
void | GetCameraDirection () |
float | GetModelScale (Exchange::Component const &component) |
void | GetUnits () |
void | PositionLinearMeasurementGeometry (WindowPoint const &window_cursor_location, KeyPath const &event_path, LineKey &leader_line_one, LineKey &leader_line_two, LineKey &measurement_line, LineKey &line_to_cursor, Point &original_point_one, Point &original_point_two, TextKey &text, UTF8 const &text_string, Point &distance_point_one, Point &distance_point_two, SegmentKey ¤t_measurement_segment, Plane const &measurement_plane=Plane(), Vector const &explicit_direction=Vector()) |
void | SetGlyphColor () |
void | SetMaterialsOnMeasurementSegment (HPS::SegmentKey const &set_materials_here, HPS::MaterialMappingKit const &materials_to_apply) |
void | SetupConstructionSegment () |
void | Tag (HPS::Key &tag, const char *message, Tags tag_index) |
Protected Attributes | |
Exchange::CADModel | cad_model |
Vector | camera_direction |
HighlightOptionsKit | highlight_options |
GlyphDefinition | left_arrow |
bool | manipulate_measurement |
MaterialMappingKit | materials |
size_t | measurement_precision |
SegmentKey | measurement_segment |
PortfolioKey | portfolio |
GlyphDefinition | right_arrow |
SelectionOptionsKit | selection_options |
SegmentKey | style_segment |
TextAttributeKit | text_attributes |
UTF8 | units |
![]() | |
HPS::ModifierKeys | modifier_trigger |
HPS::MouseButtons | mouse_trigger |
Static Protected Attributes | |
static size_t | angle_measurement_index |
static size_t | distance_measurement_index |
static size_t | length_measurement_index |
static size_t | radius_measurement_index |
Additional Inherited Members | |
![]() | |
static const HPS::Type | staticType = HPS::Type::Operator |
![]() | |
static const HPS::Type | staticType = HPS::Type::None |
Detailed Description
The CommonMeasurementOperator class defines an operator which contains many often used functions when inserting measurements. Users can build a custom measurement operator by deriving from this class. This operator requires the model be loaded using the Exchange bridge, and the model must contain B-rep.
Member Function Documentation
◆ GetMaterial()
MaterialMappingKit HPS::Exchange::CommonMeasurementOperator::GetMaterial | ( | ) | const |
Returns the material used for the measurements
◆ GetMeasurementSegment()
SegmentKey HPS::Exchange::CommonMeasurementOperator::GetMeasurementSegment | ( | ) | const |
Returns the top measurement segment containing all measurements
◆ GetName()
|
inlineoverridevirtual |
Returns the name of the operator.
Reimplemented from HPS::Operator.
Reimplemented in HPS::Exchange::MeasurementOperator.
◆ GetNewMeasurementSegmentName()
|
static |
Returns the name to be used for the new measurement segment name
◆ GetPrecision()
size_t HPS::Exchange::CommonMeasurementOperator::GetPrecision | ( | ) | const |
Returns the precision used in the measurement (number of digits after the decimal point)
◆ GetTextAttributes()
TextAttributeKit HPS::Exchange::CommonMeasurementOperator::GetTextAttributes | ( | ) | const |
Returns the text attributes used for the measurements
◆ OnViewAttached()
|
overridevirtual |
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.
Reimplemented in HPS::Exchange::MeasurementOperator.
◆ OnViewDetached()
|
overridevirtual |
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.
Reimplemented in HPS::Exchange::MeasurementOperator.
◆ SetMaterial()
void HPS::Exchange::CommonMeasurementOperator::SetMaterial | ( | MaterialMappingKit const & | in_material_mapping | ) |
Changes the material used for the measurements. Affects all measurements, even those already inserted.
◆ SetPrecision()
void HPS::Exchange::CommonMeasurementOperator::SetPrecision | ( | size_t | in_precision | ) |
Changes the precision used in the measurement (number of digits after the decimal point) Only affects future measurements.
◆ SetTextAttribute()
void HPS::Exchange::CommonMeasurementOperator::SetTextAttribute | ( | TextAttributeKit const & | in_text_attributes | ) |
Changes the text attributes used for the measurements. Affects all measurements, even those already inserted.
The documentation for this class was generated from the following file:
- include/sprk_exchange.h