Rhino C++ API  7.26
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
CRhinoGumballFrame Class Reference

#include <rhinoSdkGumball.h>

Public Member Functions

 CRhinoGumballFrame ()
 ~CRhinoGumballFrame ()
const ON_3dVectorAxis (int i) const
ON_Line AxisLine (int i, double length) const
ON_3dPoint AxisPoint (int i, double t) const
const ON_3dPointCenter () const
bool 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
bool GetDragToPoint (GUMBALL_MODE gumball_mode, ON_3dPoint world_pick_point, ON_Line world_pick_line, ON_3dPoint &drag_to_point) const
bool GetPlane (int plane_index, ON_Plane &plane) const
bool IsValid () const
bool Read (ON_BinaryArchive &binary_archive)
double ScaleGripDistance (int i) const
ON_3dPoint ScaleGripPoint (int i) const
bool SetCenter (const ON_3dPoint &center)
bool SetFromArc (const ON_Arc &arc)
bool SetFromBoundingBox (ON_BoundingBox bbox)
 gumball points More...
bool SetFromBoundingBox (ON_Plane frame, ON_BoundingBox bbox)
bool SetFromCircle (const ON_Circle &circle)
bool SetFromCurve (const ON_Curve &curve)
bool SetFromEllipse (const ON_Ellipse &ellipse)
bool SetFromExtrusion (const ON_Extrusion &extrusion)
bool SetFromHatch (const ON_Hatch &hatch)
bool SetFromLight (const ON_Light &light)
bool SetFromLine (const ON_Line &line)
bool SetFromPlane (const ON_Plane &plane)
bool SetScaleGripDistance (int i, double d)
void SetToDefaultFrame ()
bool Transform (const ON_Xform &xform)
bool Translate (ON_3dVector V)
bool Write (ON_BinaryArchive &binary_archive) const

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

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

Detailed Description

CRhinoGumballFrame class - gumball location settings

Constructor & Destructor Documentation

◆ CRhinoGumballFrame()

CRhinoGumballFrame::CRhinoGumballFrame ( )

◆ ~CRhinoGumballFrame()

CRhinoGumballFrame::~CRhinoGumballFrame ( )

Member Function Documentation

◆ Axis()

const ON_3dVector& CRhinoGumballFrame::Axis ( int  i) const

Parameters: i - [in] 0 = x, 1 = y, 2 = z Returns: frame axis

◆ AxisLine()

ON_Line CRhinoGumballFrame::AxisLine ( int  i,
double  length 
) const

◆ AxisPoint()

ON_3dPoint CRhinoGumballFrame::AxisPoint ( int  i,
double  t 
) const

◆ Center()

const ON_3dPoint& CRhinoGumballFrame::Center ( ) const

◆ DragTo()

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]

◆ GetDragToPoint()

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()

◆ GetPlane()

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

◆ GetXform()

static bool CRhinoGumballFrame::GetXform ( const CRhinoGumballFrame f0,
const CRhinoGumballFrame f1,
int  scale_mode,
ON_Xform xform 

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]

◆ IsValid()

bool CRhinoGumballFrame::IsValid ( ) const

◆ Read()

bool CRhinoGumballFrame::Read ( ON_BinaryArchive binary_archive)

◆ ScaleGripDistance()

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

◆ ScaleGripPoint()

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.

◆ SetCenter()

bool CRhinoGumballFrame::SetCenter ( const ON_3dPoint center)

◆ SetFromArc()

bool CRhinoGumballFrame::SetFromArc ( const ON_Arc arc)

◆ SetFromBoundingBox() [1/2]

bool CRhinoGumballFrame::SetFromBoundingBox ( ON_BoundingBox  bbox)

gumball points

◆ SetFromBoundingBox() [2/2]

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.

◆ SetFromCircle()

bool CRhinoGumballFrame::SetFromCircle ( const ON_Circle circle)

◆ SetFromCurve()

bool CRhinoGumballFrame::SetFromCurve ( const ON_Curve curve)

◆ SetFromEllipse()

bool CRhinoGumballFrame::SetFromEllipse ( const ON_Ellipse ellipse)

◆ SetFromExtrusion()

bool CRhinoGumballFrame::SetFromExtrusion ( const ON_Extrusion extrusion)

◆ SetFromHatch()

bool CRhinoGumballFrame::SetFromHatch ( const ON_Hatch hatch)

◆ SetFromLight()

bool CRhinoGumballFrame::SetFromLight ( const ON_Light light)

◆ SetFromLine()

bool CRhinoGumballFrame::SetFromLine ( const ON_Line line)

◆ SetFromPlane()

bool CRhinoGumballFrame::SetFromPlane ( const ON_Plane plane)

◆ SetScaleGripDistance()

bool CRhinoGumballFrame::SetScaleGripDistance ( int  i,
double  d 

◆ SetToDefaultFrame()

void CRhinoGumballFrame::SetToDefaultFrame ( )

◆ StatusValue()

static double CRhinoGumballFrame::StatusValue ( const CRhinoGumballFrame f0,
const CRhinoGumballFrame f1,
int  scale_mode,
GUMBALL_MODE  gumball_mode 

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.

◆ Transform()

bool CRhinoGumballFrame::Transform ( const ON_Xform xform)

◆ Translate()

bool CRhinoGumballFrame::Translate ( ON_3dVector  V)

◆ Write()

bool CRhinoGumballFrame::Write ( ON_BinaryArchive binary_archive) const

Member Data Documentation

◆ m_plane

ON_Plane CRhinoGumballFrame::m_plane

◆ m_scale_grip_distance

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.

◆ m_scale_mode

int CRhinoGumballFrame::m_scale_mode

0 = independent, 1 = xy, 2 = yz, 3 = zx, 4 = xyz

◆ scale_tolerance

const double CRhinoGumballFrame::scale_tolerance