# IRdScaleSnapTool Interface Reference

Inherits IUnknown.

List of all members.

## Public Member Functions
HRESULT | SetParameters (IRsNode *pViewNode, IRsObjectList *pObjectList)
HRESULT | GetSnappedScale ([in] RtScaleSnappingParameters *pSnapParams,[out] RtPoint *pptOutScale,[out] RtFloat *pfWeight)
HRESULT | ApplyScaleConstraints ([in] RtScaleSnappingParameters *pSnapParams)
HRESULT | NotifyScaleSnapActive ()
HRESULT | NotifyScaleSnapperDeactivate ()
HRESULT | HideScaleSnapMarkers ()

## Detailed Description

IRdScaleSnapTool is interface for data objects that provide snapping capabilities.

## Member Function Documentation

HRESULT IRdScaleSnapTool::SetParameters | ( | IRsNode * | pViewNode,
|  | IRsObjectList * | pObjectList |
| ) |  |  |

Snapping manager calls SetParameters of the tool, to setup it's internal structures and update pObjectList if needed. This is called once during initialization of snapping manager session.

Parameters:

  | pViewNode | defines node of current view
  | pObjectList | defines list of objects. Tool can modify this list as it needs

Returns:
  standard HRESULT processing will be applied to returned value

HRESULT IRdScaleSnapTool::GetSnappedScale | ( | [in] RtScaleSnappingParameters * | pSnapParams,
|  | [out] RtPoint * | pptOutScale,
|  | [out] RtFloat * | pfWeight |
| ) |  |  |

Compute snapped scale.

Parameters:

  | pSnapParams | Snapping parameters
  | pptOutputPos | Pointer that should be filled by snapped position.
  | pfWeight | Weight of snapped position. This weight is used to choose best snapping scale from all active tools.

Returns:
  standard HRESULT processing will be applied to returned value

HRESULT IRdScaleSnapTool::ApplyScaleConstraints | ( | [in] RtScaleSnappingParameters * | pSnapParams | ) |

Compute constraints. Tool should update basis inside pSnapperInfo structure of RtScaleSnappingParameters structure to constraint scaling. Current step will be constrained to calculated scale in constrained basis.

Parameters:

  | pSnapParams | Snapping parameters

Returns:
  standard HRESULT processing will be applied to returned value

HRESULT IRdScaleSnapTool::NotifyScaleSnapActive | ( |  | ) |

Notification called by snap manager after tool becomes active (it's snapping position was chosen as the best)

HRESULT IRdScaleSnapTool::NotifyScaleSnapperDeactivate | ( |  | ) |

Notification called by snap manager when snapping session is terminated.

HRESULT IRdScaleSnapTool::HideScaleSnapMarkers | ( |  | ) |

Force tool to hide snapping markers.