Rhino C++ API
8.17
|
#include <rhinoSdkGumball.h>
Static Public Member Functions | |
static bool | GetXform (const CRhinoGumballFrame &f0, const CRhinoGumballFrame &f1, int scale_mode, ON_Xform &xform) |
static double | StatusValue (const CRhinoGumballFrame &f0, const CRhinoGumballFrame &f1, int scale_mode, GUMBALL_MODE gumball_mode) |
Public Attributes | |
signed char | m_iExtendAxis |
-1 = unset, 0 = x, 1 = y, 2 = z, corresponding to the axis face extension is supported along More... | |
ON_Plane | m_plane |
ON_3dVector | m_scale_grip_distance |
int | m_scale_mode |
0 = independent, 1 = xy, 2 = yz, 3 = zx, 4 = xyz More... | |
Static Public Attributes | |
static const double | scale_tolerance |
CRhinoGumballFrame class - gumball location settings
CRhinoGumballFrame::CRhinoGumballFrame | ( | ) |
CRhinoGumballFrame::~CRhinoGumballFrame | ( | ) |
const ON_3dVector& CRhinoGumballFrame::Axis | ( | int | i | ) | const |
Parameters: i - [in] 0 = x, 1 = y, 2 = z Returns: frame axis
ON_Line CRhinoGumballFrame::AxisLine | ( | int | i, |
double | length | ||
) | const |
ON_3dPoint CRhinoGumballFrame::AxisPoint | ( | int | i, |
double | t | ||
) | const |
const ON_3dPoint& CRhinoGumballFrame::Center | ( | ) | const |
bool CRhinoGumballFrame::DragTo | ( | GUMBALL_MODE | gumball_mode, |
const CRhinoGumballDragSettings & | drag_settings, | ||
ON_3dPoint | start_point, | ||
ON_3dPoint | drag_to_point, | ||
CRhinoGumballFrame & | dragged_gumball_frame, | ||
ON_Line & | drag_line | ||
) | const |
Description: Get a new location for a gumball frame based on an input drag_to_point. Parameters: gumball_mode - [in] indicates which part of the gumball is being dragged. drag_settings - [in] Settings that modify default drag behavior. drag_to_point - [in] dragged_gumball_frame - [out] drag_line - [out]
bool CRhinoGumballFrame::GetDragToPoint | ( | GUMBALL_MODE | gumball_mode, |
ON_3dPoint | world_pick_point, | ||
ON_Line | world_pick_line, | ||
ON_3dPoint & | drag_to_point | ||
) | const |
Description: Get drag to point from picking information when the world_pick_point is not on the gumball. This typically happens when a GetPoint or grip drag is not being constrained. The returned value in drag_to_point can be passed to DragTo(). Parameters: gumball_mode - [in] indicates which part of the gumball is being dragged. world_pick_point - [in] world coordinate of pick point world_pick_line - [in] world coordinate pick line drag_to_point - [out] Point that can be passed to DragTo()
bool CRhinoGumballFrame::GetPlane | ( | int | plane_index, |
ON_Plane & | plane | ||
) | const |
Parameters: plane_index - [in] 0 = get yz plane 1 = get zx plane 2 = get xy plane
|
static |
Description: Get the transformation determined by two gumball locations. Parameters: f0 - [in] starting gumball frame f1 - [in] ending gumball frame scale_mode - [in] 0 freem 1 x=y, 2 y=z, 3 z=x, 4 x=y=z xform - [out]
bool CRhinoGumballFrame::IsValid | ( | ) | const |
bool CRhinoGumballFrame::Read | ( | ON_BinaryArchive & | binary_archive | ) |
double CRhinoGumballFrame::ScaleGripDistance | ( | int | i | ) | const |
Parameters: i - [in] 0 = x, 1 = y, 2 = z Returns: 0.0 if scale grip is distance is not set
0.0 if scale grip distance is set
ON_3dPoint CRhinoGumballFrame::ScaleGripPoint | ( | int | i | ) | const |
Parameters: i - [in] 0 = x, 1 = y, 2 = z Returns: Location of scale grip point or ON_UNSET_POINT if it is not defined.
bool CRhinoGumballFrame::SetCenter | ( | const ON_3dPoint & | center | ) |
bool CRhinoGumballFrame::SetFromArc | ( | const ON_Arc & | arc | ) |
bool CRhinoGumballFrame::SetFromBoundingBox | ( | ON_BoundingBox | bbox | ) |
gumball points
bool CRhinoGumballFrame::SetFromBoundingBox | ( | ON_Plane | frame, |
ON_BoundingBox | bbox | ||
) |
Parameters: frame - [in] bbox - [in] bounding box with respect to frame. Returns: True if input is valid and gumball is set. False if input is not valid. In this case, gumball is set to the default.
bool CRhinoGumballFrame::SetFromBrepObject | ( | const CRhinoBrepObject & | brep, |
double | dTol = ON_ZERO_TOLERANCE |
||
) |
bool CRhinoGumballFrame::SetFromCircle | ( | const ON_Circle & | circle | ) |
bool CRhinoGumballFrame::SetFromClippingPlane | ( | const ON_PlaneSurface & | clipping_plane | ) |
bool CRhinoGumballFrame::SetFromCurve | ( | const ON_Curve & | curve | ) |
bool CRhinoGumballFrame::SetFromEllipse | ( | const ON_Ellipse & | ellipse | ) |
bool CRhinoGumballFrame::SetFromExtrusion | ( | const ON_Extrusion & | extrusion | ) |
bool CRhinoGumballFrame::SetFromExtrusionObject | ( | const CRhinoExtrusionObject & | ext, |
double | dTol = ON_ZERO_TOLERANCE |
||
) |
bool CRhinoGumballFrame::SetFromHatch | ( | const ON_Hatch & | hatch | ) |
bool CRhinoGumballFrame::SetFromLight | ( | const ON_Light & | light | ) |
bool CRhinoGumballFrame::SetFromLine | ( | const ON_Line & | line | ) |
bool CRhinoGumballFrame::SetFromMeshObject | ( | const CRhinoMeshObject & | mesh, |
double | dTol = ON_ZERO_TOLERANCE |
||
) |
bool CRhinoGumballFrame::SetFromMorphControlObject | ( | const CRhinoMorphControl & | mc, |
double | dTol = ON_ZERO_TOLERANCE |
||
) |
bool CRhinoGumballFrame::SetFromPlane | ( | const ON_Plane & | plane | ) |
bool CRhinoGumballFrame::SetFromSubDObject | ( | const CRhinoSubDObject & | ext, |
double | dTol = ON_ZERO_TOLERANCE |
||
) |
bool CRhinoGumballFrame::SetScaleFromAnnotation | ( | const ON_Plane & | frame, |
const class CRhinoAnnotation & | annotation | ||
) |
bool CRhinoGumballFrame::SetScaleFromBoundingBox | ( | const ON_Plane & | frame, |
const ON_BoundingBox & | bbox | ||
) |
These functions only set the size of the scale handles. They do not affect the gumball origin or rotation. In all cases, the first parameter is the plane which defines the Gumball origin and rotation (ie - the object frame)
bool CRhinoGumballFrame::SetScaleFromBrepObject | ( | const ON_Plane & | frame, |
const CRhinoBrepObject & | brep, | ||
double | dTol = ON_ZERO_TOLERANCE |
||
) |
bool CRhinoGumballFrame::SetScaleFromClippingPlane | ( | const ON_Plane & | frame, |
const ON_PlaneSurface & | clipping_plane | ||
) |
bool CRhinoGumballFrame::SetScaleFromEllipse | ( | const ON_Plane & | frame, |
const ON_Ellipse & | ellipse | ||
) |
bool CRhinoGumballFrame::SetScaleFromExtrusion | ( | const ON_Plane & | frame, |
const ON_Extrusion & | extrusion | ||
) |
bool CRhinoGumballFrame::SetScaleFromExtrusionObject | ( | const ON_Plane & | frame, |
const CRhinoExtrusionObject & | ext, | ||
double | dTol = ON_ZERO_TOLERANCE |
||
) |
bool CRhinoGumballFrame::SetScaleFromMeshObject | ( | const ON_Plane & | frame, |
const CRhinoMeshObject & | mesh, | ||
double | dTol = ON_ZERO_TOLERANCE |
||
) |
bool CRhinoGumballFrame::SetScaleFromMorphControlObject | ( | const ON_Plane & | frame, |
const CRhinoMorphControl & | mc, | ||
double | dTol = ON_ZERO_TOLERANCE |
||
) |
bool CRhinoGumballFrame::SetScaleFromSubDObject | ( | const ON_Plane & | frame, |
const CRhinoSubDObject & | ext, | ||
double | dTol = ON_ZERO_TOLERANCE |
||
) |
bool CRhinoGumballFrame::SetScaleGripDistance | ( | const ON_3dVector & | ) |
bool CRhinoGumballFrame::SetScaleGripDistance | ( | int | i, |
double | d | ||
) |
void CRhinoGumballFrame::SetToDefaultFrame | ( | ) |
|
static |
Description: Get Rhino status bar value of translation distance, scale, or rotation angle. Parameters: f0 - [in] starting frame f1 - [in] ending frame; scale_mode - [in] 0 freem 1 x=y, 2 y=z, 3 z=x, 4 x=y=z gumball_mode - [in]; Returns: If gumball mode is one of the gmode_rotate*, the returned status value is the rotation in radians. If gumball mode is one of the gmode_translate*, the returned status value is the translation distance. If gumball mode is one of the gmode_scale*, the returned status value is the scale multiplier. If the status value cannot be computed, then ON_UNSET_VALUE is returned.
bool CRhinoGumballFrame::Transform | ( | const ON_Xform & | xform | ) |
bool CRhinoGumballFrame::Translate | ( | ON_3dVector | V | ) |
bool CRhinoGumballFrame::Write | ( | ON_BinaryArchive & | binary_archive | ) | const |
signed char CRhinoGumballFrame::m_iExtendAxis |
-1 = unset, 0 = x, 1 = y, 2 = z, corresponding to the axis face extension is supported along
ON_Plane CRhinoGumballFrame::m_plane |
ON_3dVector CRhinoGumballFrame::m_scale_grip_distance |
if a coordinate is valid and non-zero, then the world coordinate of the scale grip is m_frame.origin + m_scale_grip_distance.X*m_frame.Xaxis where "X" is x, y or z. Otherwise the scale grip is a "snap-back" view sized grip.
int CRhinoGumballFrame::m_scale_mode |
0 = independent, 1 = xy, 2 = yz, 3 = zx, 4 = xyz
|
static |