#include <c4d_snapdata.h>
A data class for creating snap mode plugins. For example Polygon Snap, Edge Snap, Spline Snap, Vertex Snap and so on.
Use RegisterSnapPlugin() to register a snap mode plugin.
Public Member Functions | |
virtual Bool | Init () |
virtual void | Free () |
virtual Bool | InitSnap (const SnapStruct &ss) |
virtual Bool | Snap (const Vector &p, const SnapStruct &ss, SnapPoint &result) |
virtual Bool | Intersect (const Vector &p, const Vector &n, Bool plane, const SnapStruct &ss, SnapPoint &result) |
virtual void | FreeSnap (const SnapStruct &ss) |
virtual Bool | Draw (const SnapStruct &ss, BaseDocument *doc, BaseDraw *bd, BaseDrawHelp *bh, BaseThread *bt) |
virtual Bool | GetCursorInfo (const SnapStruct &ss, BaseDocument *doc, BaseDraw *bd, Float x, Float y, BaseContainer &result) |
virtual Bool | MouseInput (const SnapStruct &ss, BaseDocument *doc, BaseDraw *bd, EditorWindow *win, const BaseContainer &msg) |
virtual Bool | KeyboardInput (const SnapStruct &ss, BaseDocument *doc, BaseDraw *bd, EditorWindow *win, const BaseContainer &msg) |
Public Member Functions inherited from BaseData | |
BaseData () | |
virtual | ~BaseData () |
void | Destructor () |
|
virtual |
Called to initialize the snap plugin.
|
virtual |
Called to free the snap plugin instance.
|
virtual |
Called to prepare snapping to begin.
[in] | ss | The passed snap context structure. |
|
virtual |
Called for 3D Snap detection.
[in] | p | The position being snapped to in world coordinates. |
[in] | ss | The passed Snap context structure. |
[out] | result | Assign data about the resulting snap point if one is generated. |
|
virtual |
Called for guide intersection.
[in] | p | The position being snapped to in world coordinates. |
[in] | n | The guide normal in world coordinates. |
[in] | plane | true if the guide is a plane, false if it is a ray/line. |
[in] | ss | The passed Snap context structure. |
[out] | result | Assign data about the resulting intersection points if they are generated. |
|
virtual |
Called to free any stored data after snapping has occurred.
[in] | ss | The passed Snap context structure. |
|
virtual |
Called for custom draw during snap.
[in] | ss | The passed Snap context structure. |
[in] | doc | The current document passed by the tool. The caller owns the pointed document. |
[in] | bd | The current BaseDraw passed by the tool. The caller owns the pointed BaseDraw. |
[in] | bh | The current BaseDrawHelp passed by the tool. The caller owns the pointed BaseDrawHelp. |
[in] | bt | The current BaseThread passed by the tool. The caller owns the pointed BaseThread. |
|
virtual |
Called to intercept the GetCursorInfo purely for the snap.
[in] | ss | The passed Snap context structure. |
[in] | doc | The current document passed by the tool. The caller owns the pointed document. |
[in] | bd | The current BaseDraw passed by the tool. The caller owns the pointed BaseDraw. |
[in] | x | The mouse x position passed by the tool. |
[in] | y | The mouse y position passed by the tool. |
[out] | result | The message container passed by the tool. |
|
virtual |
Called to intercept the MouseInput purely for the snap.
[in] | ss | The passed Snap context structure. |
[in] | doc | The current document passed by the tool. The caller owns the pointed document. |
[in] | bd | The current BaseDraw passed by the tool. The caller owns the pointed BaseDraw. |
[in] | win | The current EditorWindow passed by the tool. The caller owns the pointed EditorWindow. |
[in] | msg | The message container passed by the tool. |
|
virtual |
Called to intercept the KeyboardInput purely for the snap.
[in] | ss | The passed Snap context structure. |
[in] | doc | The current document passed by the tool. The caller owns the pointed document. |
[in] | bd | The current BaseDraw passed by the tool. The caller owns the pointed BaseDraw. |
[in] | win | The current EditorWindow passed by the tool. The caller owns the pointed EditorWindow. |
[in] | msg | The message container passed by the tool. |