#include <c4d_objectdata.h>
Class holding the information for object handles.
The handle system has been changed in such a way that handles must travel with the mouse.
The system tries to help automate the placement of the handles. It calculates the correct handle positions and constrains the handle.
The values of HandleInfo are typically set in ObjectData::GetHandle by the user.
Here is the internal code of the ObjectData::DetectHandle and ObjectData::MoveHandle methods:
Here is code from the DoubleCircle SDK example that shows the implementation of the automated handle interface functions:
Public Member Functions | |
HandleInfo () | |
~HandleInfo () | |
Vector | CalculateNewPosition (BaseDraw *bd, const Matrix &mg, const Vector &mouse_pos) const |
Public Attributes | |
Vector | position |
Vector | direction |
Vector | center |
Float | radius |
HANDLECONSTRAINTTYPE | type |
HandleInfo | ( | ) |
Constructor.
~HandleInfo | ( | ) |
Destructor.
Calculates a handle position for the given mouse position.
[in] | bd | The editor's view. The caller owns the pointed view. |
[in] | mg | The global matrix of the handle's parent object. |
[in] | mouse_pos | The mouse coordinates for which to calculate the handle position. |
Vector position |
The handle position.
Vector direction |
The normal used for the handle travel. For linear handle constraints it is the line on which a handle can travel. For planar and radial constraints it is the normal of the plane/disc. Otherwise it is not needed.
Vector center |
The handle constraint center, for radial and spherical handle constraints.
Float radius |
The handle constraint radius, for radial and spherical handle constraints.
HANDLECONSTRAINTTYPE type |
The handle constraint type: HANDLECONSTRAINTTYPE.