Inheritance diagram for HPS.HandlesOperator:
HPS.Operator HPS.Sprocket HPS.Object

Classes

class  GeometryTransformedEvent
 

Public Types

enum  HandleType {
  HandleType.Rotation = 0, HandleType.RotationX = 1, HandleType.RotationY = 2, HandleType.RotationZ = 3,
  HandleType.AxisTranslation = 4, HandleType.AxisTranslationX = 5, HandleType.AxisTranslationY = 6, HandleType.AxisTranslationZ = 7,
  HandleType.PlaneTranslation = 8, HandleType.PlaneTranslationXY = 9, HandleType.PlaneTranslationYZ = 10, HandleType.PlaneTranslationZX = 11,
  HandleType.CenterPoint = 12
}




 
- Public Types inherited from HPS.Operator
enum  Priority { Low = 0, Default = 1, High = 2 }
 

Public Member Functions

void AddHandles (HPS.HandlesOperator.HandleType handle_type)
 
void DismissHandles ()
 
override void Dispose ()
 
HPS.CADModel GetCADModel ()
 
void GetHandlesAppearance (out float out_length, out float out_radius, out ulong out_handles_points)
 
HPS.MaterialKit [] GetHandlesColors ()
 
HPS.RGBAColor GetHighlightColor ()
 
override string GetName ()
 
void GetPlaneTranslationAppearance (out float out_plane_offset, out float out_plane_length, out float out_center_radius)
 
void GetRotationHandleAppearance (out float out_offset, out float out_angle, out float out_tip_size)
 
bool GetTrailingGeometry ()
 
 HandlesOperator (HPS.MouseButtons in_mouse_trigger, HPS.ModifierKeys in_modifier_trigger)
 
 HandlesOperator (HPS.MouseButtons in_mouse_trigger)
 
 HandlesOperator (HPS.HandlesOperator in_that)
 
override bool OnMouseDown (HPS.MouseState in_state)
 
override bool OnMouseMove (HPS.MouseState in_state)
 
override bool OnMouseUp (HPS.MouseState in_state)
 
override bool OnTouchDown (HPS.TouchState in_state)
 
override bool OnTouchMove (HPS.TouchState in_state)
 
override bool OnTouchUp (HPS.TouchState in_state)
 
override void OnViewAttached (HPS.View in_attached_view)
 
override void OnViewDetached (HPS.View in_detached_view)
 
void RemoveHandles (HPS.HandlesOperator.HandleType handle_type)
 
void SetCADModel (HPS.CADModel in_cad_model)
 
void SetHandlesAppearance (float in_length, float in_radius, ulong in_handles_points)
 
void SetHandlesAppearance (float in_length, float in_radius)
 
void SetHandlesAppearance (float in_length)
 
void SetHandlesAppearance ()
 
void SetHandlesColors (HPS.MaterialKit[] in_colors)
 
void SetHighlightColor (HPS.RGBAColor in_highlight_color)
 
void SetPlaneTranslationAppearance (float in_plane_offset, float in_plane_length, float in_center_radius)
 
void SetPlaneTranslationAppearance (float in_plane_offset, float in_plane_length)
 
void SetPlaneTranslationAppearance (float in_plane_offset)
 
void SetPlaneTranslationAppearance ()
 
void SetRotationHandleAppearance (float in_offset, float in_angle, float in_tip_size)
 
void SetRotationHandleAppearance (float in_offset, float in_angle)
 
void SetRotationHandleAppearance (float in_offset)
 
void SetRotationHandleAppearance ()
 
void SetTrailingGeometry (bool in_state)
 
- Public Member Functions inherited from HPS.Operator
virtual void Assign (HPS.Operator in_that)
 
void DetachView ()
 
delegate void DtorDelegate (IntPtr cPtr)
 
override bool Equals (System.Object obj)
 
virtual bool Equals (HPS.Operator in_that)
 
HPS.View GetAttachedView ()
 
override int GetHashCode ()
 
HPS.ModifierKeys GetModifierTrigger ()
 
HPS.MouseButtons GetMouseTrigger ()
 
virtual bool IsMouseTriggered (HPS.MouseState in_state)
 
override HPS.Type ObjectType ()
 
virtual bool OnKeyDown (HPS.KeyboardState in_state)
 
virtual bool OnKeyUp (HPS.KeyboardState in_state)
 
virtual void OnModelAttached ()
 
virtual void OnModelDetached ()
 
virtual bool OnMouseEnter (HPS.MouseState in_state)
 
virtual bool OnMouseLeave (HPS.MouseState in_state)
 
virtual bool OnMouseWheel (HPS.MouseState in_state)
 
virtual bool OnTextInput (string in_text)
 
virtual bool OnTimerTick (HPS.TimerTickEvent in_event)
 
 Operator (HPS.MouseButtons in_mouse_trigger, HPS.ModifierKeys in_modifier_trigger)
 
 Operator (HPS.MouseButtons in_mouse_trigger)
 
 Operator (HPS.Operator in_that)
 
delegate void RemoveCacheItemDelegate (IntPtr cPtr)
 
void SetModifierTrigger (HPS.ModifierKeys in_modifiers)
 
void SetMouseTrigger (HPS.MouseButtons in_buttons)
 
- Public Member Functions inherited from HPS.Sprocket
 Sprocket (HPS.Sprocket in_that)
 
- Public Member Functions inherited from HPS.Object
virtual bool Empty ()
 
IntPtr GetClassID ()
 
IntPtr GetInstanceID ()
 
bool HasType (HPS.Type in_mask)
 
 Object (HPS.Object that)
 
virtual void Reset ()
 
virtual HPS.Type Type ()
 

Protected Member Functions

override void deleteCptr ()
 
override bool DerivedClassHasMethod (string methodName, System.Type[] methodTypes)
 
override IntPtr GetNonDirectorClassID ()
 
override bool IsUserDerived ()
 

Additional Inherited Members

- Static Public Member Functions inherited from HPS.Operator
static bool operator!= (HPS.Operator a, HPS.Operator b)
 
static bool operator== (HPS.Operator a, HPS.Operator b)
 
- Static Public Member Functions inherited from HPS.Object
static IntPtr ClassID< T > ()
 
- Protected Attributes inherited from HPS.Operator
HandleRef sptr
 
- Protected Attributes inherited from HPS.Object
bool cMemOwn
 
HandleRef cptr
 
- Static Protected Attributes inherited from HPS.Operator
static Dictionary< IntPtr, OperatorcachedObjects = new Dictionary<IntPtr, Operator>()
 
static Dictionary< IntPtr, WeakReference > cachedWeakRefs = new Dictionary<IntPtr, WeakReference>()
 
static ReaderWriterLockSlim mapLock = new ReaderWriterLockSlim(LockRecursionPolicy.SupportsRecursion)
 

Detailed Description

The HandlesOperator class defines an operator which allows the user to translate geometry in the view plane or along an axis. This operator works for both mouse- and touch-driven devices.

To use this operator on a mouse-driven device: <orderedlist><listitem>

Activate the operator

</listitem><listitem>

Double click on a piece of geometry to activate the handles

</listitem><listitem>

Click and drag the handles to transform the selected geometry

</listitem><listitem>

Click on the background to dismiss the handles

</listitem></orderedlist>

To use this operator on a touch-driven device: <orderedlist><listitem>

Activate the operator

</listitem><listitem>

Double tap on a piece of geometry to activate the handles

</listitem><listitem>

Tap and drag the handles to move the selected geometry

</listitem><listitem>

Tap on the background to dismiss the handles

</listitem></orderedlist>

This operator works on the segment containing the geometry selected. An event of type GeometryTransformedEvent is dispatched after the handles are dismissed, containing the information on which segment was affected and what transform was applied to it.

This operator does not work on Exchange models which have a Drawing structure. This includes CATDrawing models and 2D DWG models loaded through Exchange. Any attempt to use this operator on such a model will produce a warning.

Member Enumeration Documentation

◆ HandleType

Enumerator
Rotation 

Represents three all rotation handles.

RotationX 

Represents handle for rotation around the X axis.

RotationY 

Represents handle for rotation around the Y axis.

RotationZ 

Represents handle for rotation around the Z axis.

AxisTranslation 

Represents three all axis translation handles.

AxisTranslationX 

Represents handle for translation along the X axis.

AxisTranslationY 

Represents handle for translation along the Y axis.

AxisTranslationZ 

Represents handle for translation along the Z axis.

PlaneTranslation 

Represents three all plane translation handles.

PlaneTranslationXY 

Represents handle for translation along the XY plane.

PlaneTranslationYZ 

Represents handle for translation along the YZ plane.

PlaneTranslationZX 

Represents handle for translation along the ZX plane.

CenterPoint 

Represents handle for translation along the view plane.

Member Function Documentation

◆ AddHandles()

void HPS.HandlesOperator.AddHandles ( HPS.HandlesOperator.HandleType  handle_type)
inline

Add a type of handle to those displayed by this operator. Changes take place the next time handles are inserted, by either double clicking or double tapping on geometry.

Parameters
handle_typeThe type of handle to be added to those displayed.

◆ GetCADModel()

HPS.CADModel HPS.HandlesOperator.GetCADModel ( )
inline

Returns the CADModel associated with this operator. If no CADModel was associated with this operator, the returned object will be invalid and have type HPS.Type.None.

Returns
The CADModel associated with this operator.

◆ GetHandlesAppearance()

void HPS.HandlesOperator.GetHandlesAppearance ( out float  out_length,
out float  out_radius,
out ulong  out_handles_points 
)
inline

Returns the parameters used to decide the appearance of the handles.

Parameters
out_lengthThe length of the handles, specified as a percentage of the view containing it.
out_radiusThe radius of the handles, specified as a percentage of the view containing it.
out_handles_pointsThe number of points used to draw the handles. A higher number will yield a smoother appearance.

◆ GetHandlesColors()

HPS.MaterialKit [] HPS.HandlesOperator.GetHandlesColors ( )
inline

This function returns the materials used to color the handles. Only the diffuse color field of the materials is guaranteed to have a value. The materials are used as follows: Entry 0 - translation handle in the x direction Entry 1 - translation handle in the y direction Entry 2 - translation handle in the z direction Entry 3 - rotation handle in the x direction Entry 4 - rotation handle in the y direction Entry 5 - rotation handle in the z direction Entry 6 - xz plane translation Entry 7 - xy plane translation Entry 8 - yz plane translation Entry 9 - center-sphere

Returns
An array of materials associated with the handles

◆ GetHighlightColor()

HPS.RGBAColor HPS.HandlesOperator.GetHighlightColor ( )
inline

Returns the color used to highlight the handles then the user mouses over them.

Returns
the color used to highlight the handles then the user mouses over them.

◆ GetName()

override string HPS.HandlesOperator.GetName ( )
inlinevirtual

Returns the name of the operator.

Reimplemented from HPS.Operator.

◆ GetPlaneTranslationAppearance()

void HPS.HandlesOperator.GetPlaneTranslationAppearance ( out float  out_plane_offset,
out float  out_plane_length,
out float  out_center_radius 
)
inline

Returns the parameters used to decide the appearance of the rotation handles.

Parameters
out_plane_offsetThe distance between the axis translation handle and the start of the plane translation handle, specified as a percentage of handle length.
out_plane_lengthThe size of plane translation handles, specified as a percentage of handle length.
out_center_radiusThe radius of the sphere at the center of the handles, specified as a percentage of handle length.

◆ GetRotationHandleAppearance()

void HPS.HandlesOperator.GetRotationHandleAppearance ( out float  out_offset,
out float  out_angle,
out float  out_tip_size 
)
inline

Returns the parameters used to decide the appearance of the rotation handles.

Parameters
out_offsetThe distance between the end of a translation handle and the rotation handle associated with it, specified as a percentage of handle length.
out_angleThe angle formed by the rotation handles, specified in degrees.
out_tip_sizeThe size of the tip at the end of the handles, specified as a percentage of handle length.

◆ GetTrailingGeometry()

bool HPS.HandlesOperator.GetTrailingGeometry ( )
inline

Whether trailing geometry will be drawn when using the handles. Trailing geometry is geometry which shows you the path of the last movement operation you performed through the handles.

Returns
true if trailing geometry will be drawn, false otherwise.

◆ OnMouseDown()

override bool HPS.HandlesOperator.OnMouseDown ( HPS.MouseState  in_state)
inlinevirtual

This function is called whenever HPS receives a MouseEvent that signals a mouse button was pressed. If the user double clicks on a piece of geometry, handles will be inserted there. If the user clicks on a handle, the segment containing that handle will be translated or rotated appropriately. The user can click on the background to remove the handles.

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

Reimplemented from HPS.Operator.

◆ OnMouseMove()

override bool HPS.HandlesOperator.OnMouseMove ( HPS.MouseState  in_state)
inlinevirtual

This function is called whenever HPS receives a MouseEvent that signals the mouse moved When users click and drag a handle, the associated geometry will be translated or rotated as appropriate.

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()

override bool HPS.HandlesOperator.OnMouseUp ( HPS.MouseState  in_state)
inlinevirtual

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.

◆ OnTouchDown()

override bool HPS.HandlesOperator.OnTouchDown ( HPS.TouchState  in_state)
inlinevirtual

This function is called whenever HPS receives a TouchEvent that signals the device was touched. If the user double taps a piece of geometry, handles will be inserted there. If the user taps on a handle, the segment containing that handle will be translated or rotated appropriately. The user can tap on the background to remove the handles.

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

Reimplemented from HPS.Operator.

◆ OnTouchMove()

override bool HPS.HandlesOperator.OnTouchMove ( HPS.TouchState  in_state)
inlinevirtual

This function is called whenever HPS receives a TouchEvent that signals a point of contact has moved. When users click and drag a handle, the associated geometry will be translated or rotated as appropriate.

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()

override bool HPS.HandlesOperator.OnTouchUp ( HPS.TouchState  in_state)
inlinevirtual

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()

override void HPS.HandlesOperator.OnViewAttached ( HPS.View  in_attached_view)
inlinevirtual

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

Parameters
in_attached_viewThe view attached to this operator.

Reimplemented from HPS.Operator.

◆ OnViewDetached()

override void HPS.HandlesOperator.OnViewDetached ( HPS.View  in_detached_view)
inlinevirtual

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

Parameters
in_detached_viewThe view detached from this operator.

Reimplemented from HPS.Operator.

◆ RemoveHandles()

void HPS.HandlesOperator.RemoveHandles ( HPS.HandlesOperator.HandleType  handle_type)
inline

Remove a type of handle from those displayed by this operator. Changes take place the next time handles are inserted, by either double clicking or double tapping on geometry.

Parameters
handle_typeThe type of handle to be removed from those displayed.

◆ SetCADModel()

void HPS.HandlesOperator.SetCADModel ( HPS.CADModel  in_cad_model)
inline

Sets the CADModel associated with this operator. If a CADModel is set, the underlying PRC or Parasolid data associated with any Components moved by the user with the handles operator will be changed to reflect how the CADModel appears on the user's screen. This function needs to be called before the user starts transforming geometry through the handles operator.

Parameters
in_cad_modelThe CADModel associated with this operator.

◆ SetHandlesAppearance() [1/4]

void HPS.HandlesOperator.SetHandlesAppearance ( float  in_length,
float  in_radius,
ulong  in_handles_points 
)
inline

This function can be used to modify the appearance of handles. Changes will take effect the next time handles are inserted.

Parameters
in_lengthThe length of the handles, specified as a percentage of the view containing it. Valid range is (0, 1].
in_radiusThe radius of the handles, specified as a percentage of the view containing it. Valid range is (0, 1].
in_handles_pointsThe number of points used to draw the handles. A higher number will yield a smoother appearance. Valid range is > 0.

◆ SetHandlesAppearance() [2/4]

void HPS.HandlesOperator.SetHandlesAppearance ( float  in_length,
float  in_radius 
)
inline

This function can be used to modify the appearance of handles. Changes will take effect the next time handles are inserted.

Parameters
in_lengthThe length of the handles, specified as a percentage of the view containing it. Valid range is (0, 1].
in_radiusThe radius of the handles, specified as a percentage of the view containing it. Valid range is (0, 1].

◆ SetHandlesAppearance() [3/4]

void HPS.HandlesOperator.SetHandlesAppearance ( float  in_length)
inline

This function can be used to modify the appearance of handles. Changes will take effect the next time handles are inserted.

Parameters
in_lengthThe length of the handles, specified as a percentage of the view containing it. Valid range is (0, 1].

◆ SetHandlesAppearance() [4/4]

void HPS.HandlesOperator.SetHandlesAppearance ( )
inline

This function can be used to modify the appearance of handles. Changes will take effect the next time handles are inserted.

◆ SetHandlesColors()

void HPS.HandlesOperator.SetHandlesColors ( HPS.MaterialKit []  in_colors)
inline

This function is used to provide a set of colors which will be applied to the handles. The changes will take effect the next time the handles are inserted. The materials need to contain a diffuse color, and will be applied as follows: Entry 0 - translation handle in the x direction Entry 1 - translation handle in the y direction Entry 2 - translation handle in the z direction Entry 3 - rotation handle in the x direction Entry 4 - rotation handle in the y direction Entry 5 - rotation handle in the z direction Entry 6 - xz plane translation Entry 7 - xy plane translation Entry 8 - yz plane translation Entry 9 - center-sphere

Parameters
in_colorsAn array of materials to be applied to the handles.

◆ SetHighlightColor()

void HPS.HandlesOperator.SetHighlightColor ( HPS.RGBAColor  in_highlight_color)
inline

Sets the highlight color used when the user mouses over the handles. The default value for the highlight color is RGBAColor(1.0f, 0.55f, 0.0f)

Parameters
in_highlight_colorThe color used to highlight handles when the user mouses over them.

◆ SetPlaneTranslationAppearance() [1/4]

void HPS.HandlesOperator.SetPlaneTranslationAppearance ( float  in_plane_offset,
float  in_plane_length,
float  in_center_radius 
)
inline

This function can be used to modify the appearance of the handles used to perform plane-translation. Changes will take effect the next time handles are inserted.

Parameters
in_plane_offsetThe distance between the axis translation handle and the start of the plane translation handle, specified as a percentage of handle length.
in_plane_lengthThe size of plane translation handles, specified as a percentage of handle length.
in_center_radiusThe radius of the sphere at the center of the handles, specified as a percentage of handle length.

◆ SetPlaneTranslationAppearance() [2/4]

void HPS.HandlesOperator.SetPlaneTranslationAppearance ( float  in_plane_offset,
float  in_plane_length 
)
inline

This function can be used to modify the appearance of the handles used to perform plane-translation. Changes will take effect the next time handles are inserted.

Parameters
in_plane_offsetThe distance between the axis translation handle and the start of the plane translation handle, specified as a percentage of handle length.
in_plane_lengthThe size of plane translation handles, specified as a percentage of handle length.

◆ SetPlaneTranslationAppearance() [3/4]

void HPS.HandlesOperator.SetPlaneTranslationAppearance ( float  in_plane_offset)
inline

This function can be used to modify the appearance of the handles used to perform plane-translation. Changes will take effect the next time handles are inserted.

Parameters
in_plane_offsetThe distance between the axis translation handle and the start of the plane translation handle, specified as a percentage of handle length.

◆ SetPlaneTranslationAppearance() [4/4]

void HPS.HandlesOperator.SetPlaneTranslationAppearance ( )
inline

This function can be used to modify the appearance of the handles used to perform plane-translation. Changes will take effect the next time handles are inserted.

◆ SetRotationHandleAppearance() [1/4]

void HPS.HandlesOperator.SetRotationHandleAppearance ( float  in_offset,
float  in_angle,
float  in_tip_size 
)
inline

This function can be used to modify the appearance of handles used to perform rotations. Changes will take effect the next time handles are inserted.

Parameters
in_offsetThe distance between the end of a translation handle and the start of then rotation handle associated with it, specified as a percentage of handle length. Valid range is (0, 1].
in_angleThe angle formed by the rotation handles, specified in degrees. Valid range is > 0
in_tip_sizeThe size of the tip at the end of the handles, specified as a percentage of the handle length. Valid range is [0, 1].

◆ SetRotationHandleAppearance() [2/4]

void HPS.HandlesOperator.SetRotationHandleAppearance ( float  in_offset,
float  in_angle 
)
inline

This function can be used to modify the appearance of handles used to perform rotations. Changes will take effect the next time handles are inserted.

Parameters
in_offsetThe distance between the end of a translation handle and the start of then rotation handle associated with it, specified as a percentage of handle length. Valid range is (0, 1].
in_angleThe angle formed by the rotation handles, specified in degrees. Valid range is > 0

◆ SetRotationHandleAppearance() [3/4]

void HPS.HandlesOperator.SetRotationHandleAppearance ( float  in_offset)
inline

This function can be used to modify the appearance of handles used to perform rotations. Changes will take effect the next time handles are inserted.

Parameters
in_offsetThe distance between the end of a translation handle and the start of then rotation handle associated with it, specified as a percentage of handle length. Valid range is (0, 1].

◆ SetRotationHandleAppearance() [4/4]

void HPS.HandlesOperator.SetRotationHandleAppearance ( )
inline

This function can be used to modify the appearance of handles used to perform rotations. Changes will take effect the next time handles are inserted.

◆ SetTrailingGeometry()

void HPS.HandlesOperator.SetTrailingGeometry ( bool  in_state)
inline

Whether to draw trailing geometry when using the handles. Trailing geometry is geometry which shows you the path of the last movement operation you performed through the handles.

Parameters
in_stateWhether to draw trailing geometry when using the handles.

The documentation for this class was generated from the following file:
  • internals/hps_sprk_ops/source/cs/HPS.HandlesOperator.cs