|
Rhino C++ API
9.0
|
#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 | ( | ) |
| CRhinoGumballFrame::CRhinoGumballFrame | ( | const CRhinoGumballFrame & | src | ) |
| CRhinoGumballFrame::CRhinoGumballFrame | ( | CRhinoGumballFrame && | ) |
| int CRhinoGumballFrame::ActiveUvnExtraordinaryDirection | ( | ) | const |
| 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] Remarks: gb_mode_uvn_extraordinary drags the arrow this frame's ActiveUvnExtraordinaryDirection() names, and dragged_gumball_frame comes back naming the same one, so drawing it shows that arrow.
| 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
| void CRhinoGumballFrame::GetUvnDirections | ( | ON_3dVector & | vEastOut, |
| ON_3dVector & | vWestOut, | ||
| ON_3dVector & | vNorthOut, | ||
| ON_3dVector & | vSouthOut, | ||
| ON_3dVector & | vNormalOut | ||
| ) | const |
|
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::IsUvnExtraordinary | ( | ) | const |
Returns: True if this frame carries per edge directions for an extraordinary SubD vertex instead of east/west/north/south directions.
| bool CRhinoGumballFrame::IsValid | ( | ) | const |
| const CRhinoGumballFrame& CRhinoGumballFrame::operator= | ( | const CRhinoGumballFrame & | src | ) |
| CRhinoGumballFrame& CRhinoGumballFrame::operator= | ( | CRhinoGumballFrame && | ) |
| 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.
| void CRhinoGumballFrame::SetActiveUvnExtraordinaryDirection | ( | int | index | ) |
Description: The extraordinary direction the user is currently dragging or hovering. Drawing a frame in gb_mode_uvn_extraordinary uses this to know which arrow to show or highlight. CRhinoGumballFrame::DragTo() sets it on the frame it returns, so a dragged frame already knows. Setting the extraordinary directions clears it back to -1. Parameters: index - [in] -1 for none.
| 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 | ( | ) |
| bool CRhinoGumballFrame::SetUvnDirections | ( | const ON_3dVector & | vEast, |
| const ON_3dVector & | vWest, | ||
| const ON_3dVector & | vNorth, | ||
| const ON_3dVector & | vSouth, | ||
| const ON_3dVector & | vNormal | ||
| ) |
| bool CRhinoGumballFrame::SetUvnExtraordinaryDirections | ( | const ON_SimpleArray< ON_3dVector > & | aDirections | ) |
Description: Extraordinary SubD vertices have no east/west/north/south directions. Instead the frame carries one direction per edge coming into the vertex. Setting a non empty list of directions puts the frame in extraordinary mode. Setting an empty list takes it back out. Parameters: aDirections - [in] One direction per edge, in vertex edge order. Returns: True if the frame is in extraordinary mode when this returns.
|
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::TryGetUvnExtraordinaryDirection | ( | int | index, |
| ON_3dVector & | vOut | ||
| ) | const |
Parameters: index - [in] Index into the extraordinary directions. vOut - [out] Returns: True if index is in range and the direction is valid.
| bool CRhinoGumballFrame::TryGetUvnLine | ( | GUMBALL_MODE | uvnMode, |
| ON_Line & | lOut | ||
| ) | const |
Handles the east/west/north/south/normal modes. gb_mode_uvn_extraordinary needs an arrow index, so use TryGetUvnExtraordinaryDirection() for that.
| int CRhinoGumballFrame::UvnExtraordinaryDirectionCount | ( | ) | const |
Returns: Number of extraordinary directions, zero when the frame is not in extraordinary mode.
| 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 |
1.8.17