Rhino C++ API  8.6
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
CRhinoGetPoint Class Reference

#include <rhinoSdkGetPoint.h>

Inheritance diagram for CRhinoGetPoint:
CRhinoGet CRhGetSubCurvePoint CRhinoGetAngle CRhinoGetDirection CRhinoGetDistance CRhinoGetFrameOnObject CRhinoGetRectangle CRhinoGetRectangle3Point CRhinoGetRectangleRounded CRhinoGetView CRhinoGetXform CRhinoGumballDragger

Public Member Functions

 CRhinoGetPoint ()
 
 CRhinoGetPoint (const CRhinoGet &src)
 prompt and options copied More...
 
 CRhinoGetPoint (const CRhinoGetPoint &)=delete
 no implementation More...
 
virtual ~CRhinoGetPoint ()
 
int AddConstructionPoint (const ON_3dPoint &construction_point)
 
int AddSnapPoint (const ON_3dPoint &snap_point)
 
int AddSnapPoints (BOOL32 bRationalPoints, int point_count, int point_stride, const double *points)
 
int AddSnapPoints (int point_count, const ON_3dPoint *snap_points)
 
const CRhinoObjRefBaseObjRef () const
 
ON_3dPoint BasePoint () const
 
void ClearConstraints ()
 
void ClearConstructionPoints ()
 
void ClearSnapPoints ()
 
bool ComplexPointInput () const
 
BOOL32 Constrain (const ON_Arc &)
 constrain point to lie on an arc More...
 
BOOL32 Constrain (const ON_Brep &, int wire_density=-1, int face_index=-1, bool bAllowPickingPointOffObject=false)
 
BOOL32 Constrain (const ON_BrepFace &, int wire_density=-1, bool bAllowPickingPointOffObject=false)
 
BOOL32 Constrain (const ON_Circle &)
 constrain point to lie on a circle More...
 
BOOL32 Constrain (const ON_Curve &, bool bAllowPickingPointOffObject=false)
 
BOOL32 Constrain (const ON_Cylinder &)
 constrain point to lie on a cylinder More...
 
BOOL32 Constrain (const ON_Line &, BOOL32 bTrackFromStart=true)
 constrain to a line More...
 
BOOL32 Constrain (const ON_Mesh &, bool bAllowPickingPointOffObject=false)
 
BOOL32 Constrain (const ON_Plane &, bool bAllowElevator=false)
 constrain point to lie on a plane More...
 
BOOL32 Constrain (const ON_Sphere &)
 constrain point to lie on a sphere More...
 
BOOL32 Constrain (const ON_Surface &, bool bAllowPickingPointOffObject=false)
 
BOOL32 Constrain (ON_3dPoint, ON_3dPoint)
 constrain to a line More...
 
void ConstrainDistanceFromBasePoint (double distance_from_basepoint)
 
bool Constrained () const
 
BOOL32 ConstrainEx (const ON_Mesh &, bool bAllowPickingPointOffObject=false, double dOffset=0.0)
 
BOOL32 ConstrainEx (const ON_SubD &, bool bAllowPickingPointOffObject=false, double dOffset=0.0)
 
BOOL32 ConstrainToConstructionPlane (BOOL32 bThroughBasePoint=true, BOOL32 bProjectOsnaps=false)
 
BOOL32 ConstrainToTargetPlane ()
 
BOOL32 ConstrainToVirtualCPlaneIntersection (const ON_Plane &)
 
HCURSOR CurrentCursor () const
 
void DrawLineFromPoint (ON_3dPoint start_point, BOOL32 bShowDistanceInStatusBar)
 
bool DrawsShadedMeshes () const
 
virtual void DynamicDraw (CRhinoDisplayPipeline &, const ON_3dPoint &)
 
virtual void DynamicDraw (HDC, CRhinoViewport &, const ON_3dPoint &)
 
const ON_BoundingBoxDynamicDrawBounds () const
 
ON_Color DynamicDrawColor () const
 
void EnableCurveSnapArrow (BOOL32 bDrawDirectionArrowAtSnapPoint=true, BOOL32 bReverseArrow=false)
 
void EnableCurveSnapPerpBar (BOOL32 bDrawPerpBarAtSnapPoint=true, BOOL32 bDrawEndPoints=false)
 
void EnableCurveSnapTangentBar (BOOL32 bDrawTangentBarAtSnapPoint=true, BOOL32 bDrawEndPoints=false)
 
void EnableDrawLineFromPoint (BOOL32 bDrawLineFromPoint=true)
 
void EnableNoRedrawOnExit (bool bNoRedrawOnExit=true)
 
void EnableObjectSnapCursors (bool bEnableObjectSnapCursors=true)
 
void EnableOneShotOsnapHiddenOptions (bool bEnable)
 
void EnableOnObjectCursors (bool bEnableOnObjectCursors=true)
 
void EnableSnapToCurves (BOOL32=true)
 
CRhinoGet::result Get2dLine (CRhinoView *pView=NULL, const POINT *corner=NULL, BOOL32 bCentered=false, int pen_style=PS_SOLID, bool bClampToView=true)
 
CRhinoGet::result Get2dPoint (CRhinoView *pView=NULL, bool bOnMouseUp=false)
 
CRhinoGet::result Get2dRectangle (CRhinoView *pView=NULL, const POINT *corner=NULL, BOOL32 bCentered=false, int pen_style=PS_SOLID, bool bClampToView=true, const wchar_t *second_prompt=NULL)
 
int GetConstructionPoints (ON_SimpleArray< ON_3dPoint > &construction_points) const
 
BOOL32 GetPlanarConstraint (const CRhinoViewport *vp, ON_Plane &plane) const
 
CRhinoGet::result GetPoint (CRhinoHistory *history=nullptr, bool bOnMouseUp=false)
 
HCURSOR GetPointCursor () const
 
bool GetPointOnMouseUp () const
 true if getting point on mouse up event More...
 
int GetSnapPoints (ON_SimpleArray< ON_3dPoint > &snap_points) const
 
bool GetTabModeSettings (int *tab_mode=0, ON_Line *tab_mode_line=0)
 
bool GetView3dPoint (UINT nPointingDevice, CRhinoView &view, UINT_PTR nFlags, ON_3dPoint device_point, const ON_Line &world_line, ON_3dPoint &world_point)
 
BOOL32 HasBasePoint () const
 
BOOL32 InterruptMouseMove () const
 tool for use in More...
 
bool MouseMoved () const
 
bool NumberPreview (double *number=nullptr) const
 
virtual void OnMouseDown (CRhinoViewport &vp, UINT nFlags, const ON_3dPoint &point, const ON_2iPoint *view_wnd_point)
 
virtual void OnMouseMove (CRhinoViewport &vp, UINT nFlags, const ON_3dPoint &point, const ON_2iPoint *view_wnd_point)
 
int OnViewMouseDown (CRhinoView &, int button, UINT nFlags, const ON_2iPoint &point, CRhinoViewport &vp)
 these functions are used by CRhinoView::OnMouseDown/Move/Up - pretend they don't exist More...
 
int OnViewMouseMove (CRhinoView &, int button, UINT nFlags, const ON_2iPoint &point, CRhinoViewport &vp)
 
int OnViewMouseUp (CRhinoView &, int button, UINT nFlags, const ON_2iPoint &point, CRhinoViewport &vp)
 
CRhinoGetPointoperator= (const CRhinoGetPoint &)=delete
 
bool OrthoSnap () const
 
bool OsnapOverideEnabled (CRhinoAppSettings::osnap_mode &mode) const
 
void PermitConstraintOptions (BOOL32 bPermitConstraintOptions=true)
 
void PermitElevatorMode (int permit_elevator_mode=1)
 
void PermitFromOption (BOOL32 bPermitFromOption=true)
 
void PermitObjectSnap (BOOL32 bPermitObjectSnap=true)
 
void PermitOrthoSnap (BOOL32 bPermitOrthoSnap=true)
 
void PermitTabMode (bool bPermitTabMode=true)
 
ON_3dPoint Point () const
 returns 3d point in world coordinates More...
 
const ON_BrepFacePointOnBrep (double *u, double *v) const
 
const ON_CurvePointOnCurve (double *t) const
 
const ON_BrepEdgePointOnEdge (double *edge_parameter, const ON_BrepTrim *&pTrim) const
 
BOOL32 PointOnObject (CRhinoObjRef &) const
 
const ON_SurfacePointOnSurface (double *u, double *v) const
 
void ProhibitObjectSnap (const CRhinoObject *object)
 
void SetBaseObjRef (const CRhinoObjRef &ref)
 
void SetBasePoint (ON_3dPoint basePoint, bool showDistanceInStatusBar=false)
 
void SetComplexPointInput (bool b)
 
void SetDrawsShadedMeshes (bool on)
 
void SetDynamicDrawBounds (const ON_BoundingBox &bbox)
 
void SetDynamicDrawColor (COLORREF color)
 
HCURSOR SetGetPointCursor (HCURSOR getpoint_cursor)
 
void SetNumberPreview (double number)
 
const CRhinoSnapEventSnapEvent () const
 
- Public Member Functions inherited from CRhinoGet
 CRhinoGet (TYPE)
 
 CRhinoGet (TYPE, const CRhinoGet &)
 
virtual ~CRhinoGet ()
 
void AcceptColor (BOOL32 b=true)
 
bool AcceptCustomWindowsMessage (UINT winmsg_id)
 
void AcceptNothing (BOOL32 b=true)
 
void AcceptNumber (bool b=true, bool bAcceptZero=true)
 
void AcceptPoint (BOOL32 b=true)
 
void AcceptString (BOOL32 b=true)
 
void AcceptUndo (BOOL32 b=true)
 call to allow user undo previous selection. More...
 
int AddCommandOption (CRhinoCommandOptionName option_name, CRhinoCommandOptionValue option_value=CRhinoCommandOptionValue(nullptr, nullptr), BOOL32 bHiddenOption=false)
 
int AddCommandOption (CRhinoCommandOptionName option_name, double number_value)
 
int AddCommandOption (CRhinoCommandOptionName option_name, int number_value)
 
int AddCommandOptionColor (CRhinoCommandOptionName option_name, ON_Color *color_value, const wchar_t *option_prompt=nullptr)
 
int AddCommandOptionInteger (CRhinoCommandOptionName option_name, int *integer_value, const wchar_t *option_prompt=nullptr, double lower_limit=ON_UNSET_VALUE, double upper_limit=ON_UNSET_VALUE)
 
int AddCommandOptionList (CRhinoCommandOptionName option_name, const ON_SimpleArray< CRhinoCommandOptionValue > &list_values, int list_current_index)
 
int AddCommandOptionList (CRhinoCommandOptionName option_name, int list_current_index, CRhinoCommandOptionValue list0_value=CRhinoCommandOptionValue(nullptr, nullptr), CRhinoCommandOptionValue list1_value=CRhinoCommandOptionValue(nullptr, nullptr), CRhinoCommandOptionValue list2_value=CRhinoCommandOptionValue(nullptr, nullptr), CRhinoCommandOptionValue list3_value=CRhinoCommandOptionValue(nullptr, nullptr), CRhinoCommandOptionValue list4_value=CRhinoCommandOptionValue(nullptr, nullptr), CRhinoCommandOptionValue list5_value=CRhinoCommandOptionValue(nullptr, nullptr), CRhinoCommandOptionValue list6_value=CRhinoCommandOptionValue(nullptr, nullptr), CRhinoCommandOptionValue list7_value=CRhinoCommandOptionValue(nullptr, nullptr), CRhinoCommandOptionValue list8_value=CRhinoCommandOptionValue(nullptr, nullptr), CRhinoCommandOptionValue list9_value=CRhinoCommandOptionValue(nullptr, nullptr))
 
int AddCommandOptionList (CRhinoCommandOptionName option_name, int list_values_count, const CRhinoCommandOptionValue *list_values, int list_current_index)
 
int AddCommandOptionNumber (CRhinoCommandOptionName option_name, double *number_value, const wchar_t *option_prompt=nullptr, BOOL32 bIntegerValue=false, double lower_limit=ON_UNSET_VALUE, double upper_limit=ON_UNSET_VALUE, int number_format=0)
 
int AddCommandOptionToggle (CRhinoCommandOptionName option_name, CRhinoCommandOptionValue option_off_value, CRhinoCommandOptionValue option_on_value, bool bToggleState, bool *bCurrentToggleState=nullptr)
 
int AddCommandOptionToggle (CRhinoCommandOptionName option_name, CRhinoCommandOptionValue option_off_value, CRhinoCommandOptionValue option_on_value, BOOL32 bToggleState, BOOL32 *bCurrentToggleState=nullptr)
 
void AddHiddenCommandOptionAlias (int option_index, const wchar_t *alias1, const wchar_t *alias2=nullptr, const wchar_t *alias3=nullptr, const wchar_t *alias4=nullptr)
 low level tool More...
 
void ClearCommandOptions ()
 Clear all command line options. More...
 
void ClearDefault ()
 
ON_Color Color () const
 Used to get color if Get*() returns CRhinoGet::color. More...
 
CRhinoCommand::result CommandResult () const
 
const ON_ColorDefaultColor () const
 
double DefaultNumber () const
 
unsigned int DocumentRuntimeSerialNumber () const
 
void EnableTransparentCommands (BOOL32 bEnableTransparentCommands)
 
BOOL32 GotDefault () const
 
bool In2dGet () const
 these functions are used by CRhinoView::OnMouseDown/Move/Up - pretend they don't exist More...
 
bool IsGetColor () const
 
bool IsGetMeshes () const
 
bool IsGetNumber () const
 
bool IsGetObject () const
 
bool IsGetOption () const
 
bool IsGetPoint () const
 
bool IsGetString () const
 
RH_LINE Line2d () const
 
double Number () const
 
const CRhinoCommandOptionOption () const
 
int OptionCount () const
 Get the number of available command line options. This information is useful when command flow depends on the existence of command line options. More...
 
int OptionCurrentListOptionIndex () const
 
int OptionIndex () const
 
CRhinoCommandOption::COMMAND_OPTION_TYPE OptionType () const
 
ON_4iRect PickRect () const
 
ON_3dPoint Point () const
 Used to get point if Get*() returns CRhinoGet::point. More...
 
ON_2iPoint Point2d () const
 
ON_4iRect Rectangle2d () const
 
CRhinoGet::result Result () const
 returns result of the Get*() call More...
 
unsigned int SerialNumber () const
 low level tool used to identify the get More...
 
void SetCommandPrompt (const wchar_t *prompt)
 
void SetCommandPromptDefault (const wchar_t *default_value)
 
void SetDefaultColor (ON_Color default_color)
 
void SetDefaultColor (ON_Color default_color, bool bUseAlpha)
 
void SetDefaultInteger (int default_integer)
 
void SetDefaultNumber (double default_number, const wchar_t *format=nullptr)
 
void SetDefaultPoint (ON_3dPoint default_point)
 
void SetDefaultString (const wchar_t *default_string)
 
void SetDocument (unsigned int rhino_doc_sn)
 
void SetOptionVaries (int option_index, bool bVaries)
 Set option that uses "option_name=value" format to show the value as "Varies". More...
 
void SetVector (const ON_3dVector &v)
 
void SetWaitDuration (double seconds)
 
const wchar_t * String () const
 
TYPE Type () const
 
ON_3dVector Vector () const
 
CRhinoViewView () const
 
MSG WindowsMessage () const
 
ON_3dPoint WorldPoint1 () const
 
ON_3dPoint WorldPoint2 () const
 

Protected Member Functions

ON_Plane GetCS (bool bWorldCoordinates, bool bRelativeCoordinates) override
 Helper used by IsAcceptableInput when parsing points. More...
 
bool InElevatorMode (ON_Line &elevator) const
 
- Protected Member Functions inherited from CRhinoGet
CRhinoGet::result AutoProcessOption ()
 
const CRhinoCommandOptionCommandOptionAtIndex (int option_index) const
 
int CommandOptionCount () const
 see source for comments More...
 
CRhinoGet::result IsAcceptableInput (const class CRhEventToken &, BOOL32 bAcceptNumber, BOOL32 *bUpdatedOptionValue, CRhinoHistory *history)
 
CRhinoGetoperator= (const CRhinoGet &)
 
void PreGet ()
 
void RemoveCommandOptions (int option_index)
 see source for comments More...
 
virtual void SetCommandWndPrompt () const
 
void SetOptionAccelerators ()
 

Protected Attributes

ON_3dPointArray m_construction_points
 
ON_SimpleArray< ON_Linem_feedback_lines
 
ON_3dPointArray m_int_osnap_points
 
ON_3dPointArray m_point_osnap_points
 
ON_SimpleArray< ON_Linem_tracking_lines
 
- Protected Attributes inherited from CRhinoGet
bool m_2dClamp
 true to clamp 2d coordinates to window More...
 
int m_2dget_mode
 
int m_2dget_pen_style
 
ON_2iPoint m_2dget_point1
 first 2d rect corner-center / 2d line end More...
 
ON_2iPoint m_2dget_point2
 second 2d rect corner / 2d line end More...
 
ON_wString m_2dget_second_prompt
 
int m_2dget_step
 0 = none, 1 = get first point, 2 get second point, 3 = done More...
 
ON_3dPoint m_2dget_wpoint1
 first 3d world point input during 2d get point More...
 
ON_3dPoint m_2dget_wpoint2
 second 3d world point input during 2d get point More...
 
ON_2iPoint m_2dpoint
 2d window point (used by CRhinoGetPoint::Get2dPoint) More...
 
bool m_bAccept2dPoint
 2d screen point (used by CRhinoGet2dPoint) More...
 
BOOL32 m_bAcceptColor
 
BOOL32 m_bAcceptNothing
 
bool m_bAcceptNumber
 
bool m_bAcceptNumberZero
 
BOOL32 m_bAcceptPoint
 3d world point More...
 
BOOL32 m_bAcceptString
 
BOOL32 m_bAcceptString_0
 
BOOL32 m_bAcceptUndo
 
BOOL32 m_bEnableTransparentCommands
 
bool m_bGetPointOnMouseUp
 true if getting point on mouse up More...
 
ON_Color m_color
 
double m_number
 
CRhinoViewm_p2dPointView
 if not NULL, Get2dPoint()/Get2dRectangle() will use this view More...
 
ON_4iRect m_pick_rect
 
ON_3dPoint m_point
 3d world point More...
 
ON_wString m_prompt
 
ON_wString m_prompt_default
 
CRhinoGet::result m_result
 
unsigned int m_rhino_view_sn = 0
 
ON_wString m_string
 
const TYPE m_type
 
ON_3dVector m_vector
 3d world vector (from some digitizers) More...
 
UINT m_wait_duration
 milliseconds More...
 
ON_SimpleArray< UINT > m_winmsg_id_list
 

Friends

class CRhinoGetPointPrivate
 

Additional Inherited Members

- Public Types inherited from CRhinoGet
enum  result {
  no_result = 0, cancel = 1, nothing = 2, option,
  number, color, undo, miss,
  point, point2d, line2d, rect2d,
  object, string, winmsg, timeout,
  circle, plane, cylinder, sphere,
  angle, distance, direction, frame,
  number_preview, point_preview, user1 = 0xFFFFFFFF, user2 = 0xFFFFFFFE,
  user3 = 0xFFFFFFFD, user4 = 0xFFFFFFFC, user5 = 0xFFFFFFFB, exit_rhino = 0x0FFFFFFF
}
 
enum  TYPE {
  get_string = 1, get_point = 2, get_object = 3, get_meshes = 4,
  get_option = 5, get_number = 6, get_color = 7, force_32bit_enum = 0xFFFFFFFF
}
 
- Static Public Member Functions inherited from CRhinoGet
static BOOL32 IsValidOptionName (const wchar_t *option_name)
 
static BOOL32 IsValidOptionValueName (const wchar_t *option_value)
 
static void PostCustomWindowsMessage (UINT Msg, WPARAM wParam, LPARAM lParam)
 
- Public Attributes inherited from CRhinoGet
class CRhGetSdkExtension * m__rhino_get_sdk_extension
 

Detailed Description

Copyright (c) 1993-2017 Robert McNeel & Associates. All rights reserved. Rhinoceros is a registered trademark of Robert McNeel & Associates.

THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY. ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF MERCHANTABILITY ARE HEREBY DISCLAIMED.

For complete Rhino SDK copyright information see http://www.rhino3d.com/developer. Description: CRhinoGetPoint is the Rhino SDK user interface tool used to get points. It is derived from CRhinoGet which is used to provide the command prompt and option setting tools that are common to all the Rhino SDK getting tools.

Step 1: Use the CRhinoGet member functions to specify command prompt, command options, and what types of non-point input are acceptable. For example, if you want the user to be able to either pick a point or type a number, then you would call CRhinoGet::AcceptNumber(true). The default command prompt is a localized "Pick point" prompt.

Step 2: Use the CRhinoGetPoint member functions to customize point picking behavior.

Step 3: Call CRhinoGetPoint::GetPoint();

Step 4: Examine the value returned by CRhinoGet::Result() and react accordingly.

Example: CRhinoCommand::result my_center_radius_getter( ON_3dPoint& my_center, double* my_radius ) { double radius = 1.0; ON_3dPoint center(0,0,0);

CRhinoGetPoint gp; gp.SetCommandPrompt( L"Center point" ); gp.SetCommandPromptDefault( L"(0,0,0)" ); gp.AddCommandOptionNumber( L"radius", &radius, "New radius", false, ON_ZERO_TOLERANCE); gp.AcceptNothing(true); for (;;) { gp.GetPoint(); switch (gp.Result()) { case CRhinoGet::cancel: return CRhinoCommand::cancel; ///< user pressed ESCAPE break;

case CRhinoGet::nothing: / user pressed enter - use default center value break;

case CRhinoGet::option: / user changed radius value - radius automatically updated continue; break;

case CRhinoGet::point: center = gp.Point(); break;

default: continue; break; } break; } my_center = center; my_radius = radius; return CRhinoCommand::success; }

See Also: CRhinoGetObject, CRhinoGetString, CRhinoGetInteger, CRhinoGetNumber, CRhinoGetOption

Constructor & Destructor Documentation

◆ CRhinoGetPoint() [1/3]

CRhinoGetPoint::CRhinoGetPoint ( )

◆ ~CRhinoGetPoint()

virtual CRhinoGetPoint::~CRhinoGetPoint ( )
virtual

◆ CRhinoGetPoint() [2/3]

CRhinoGetPoint::CRhinoGetPoint ( const CRhinoGet src)

prompt and options copied

◆ CRhinoGetPoint() [3/3]

CRhinoGetPoint::CRhinoGetPoint ( const CRhinoGetPoint )
delete

no implementation

Member Function Documentation

◆ AddConstructionPoint()

int CRhinoGetPoint::AddConstructionPoint ( const ON_3dPoint construction_point)

Description: Add a point to the list of construction points Parameters: construction_point - [in] Returns: Total number of construction points Remarks: Construction points are like snap points except that they get snapped to even when point osnap is off. Typically, there are only a few construction points while there can be many snap points. For example, when polylines are drawn the start point is a construction point and the other points are snap points. See Also: CRhinoGetPoint::ClearConstructionPoint CRhinoGetPoint::GetConstructionPoint CRhinoGetPoint::AddSnapPoint

◆ AddSnapPoint()

int CRhinoGetPoint::AddSnapPoint ( const ON_3dPoint snap_point)

Description: Add a point to the list of osnap points Parameters: snap_point - [in] Returns: Total number of snap points Remarks: When point osnap is enabled, GetPoint will snap to points in the Rhino model. If you want the user to be able to snap to additional points, then use CRhinoGetPoint::AddSnapPoints to specify the locations of these additional points. See Also: CRhinoGetPoint::AddSnapPoints CRhinoGetPoint::ClearSnapPoints CRhinoGetPoint::GetSnapPoints CRhinoGetPoint::AddSnapPoint CRhinoGetPoint::AddConstructionPoint

◆ AddSnapPoints() [1/2]

int CRhinoGetPoint::AddSnapPoints ( BOOL32  bRationalPoints,
int  point_count,
int  point_stride,
const double *  points 
)

Description: Add points to the list of snap points. Parameters: bRationalPoints - [in] true if points are 4d rational homogeneos points false if points are 3d eudlidean points point_count - [in] number of points point_stride - [in] number of doubles to skip between points ( >= bRationalPoints ? 4 : 3 ) Returns: Total number of snap points. Remarks: When point osnap is enabled, GetPoint will snap to points in the Rhino model. If you want the user to be able to snap to additional points, then use CRhinoGetPoint::AddSnapPoints to specify the locations of these additional points. See Also: CRhinoGetPoint::AddSnapPoint CRhinoGetPoint::ClearSnapPoints CRhinoGetPoint::GetSnapPoints CRhinoGetPoint::AddSnapPoint

◆ AddSnapPoints() [2/2]

int CRhinoGetPoint::AddSnapPoints ( int  point_count,
const ON_3dPoint snap_points 
)

Description: Add points to the list of snap points. Parameters: point_count - [in] snap_points - [in] Returns: Total number of snap points Remarks: When point osnap is enabled, GetPoint will snap to points in the Rhino model. If you want the user to be able to snap to additional points, then use CRhinoGetPoint::AddSnapPoints to specify the locations of these additional points. See Also: CRhinoGetPoint::AddSnapPoint CRhinoGetPoint::ClearSnapPoints CRhinoGetPoint::GetSnapPoints CRhinoGetPoint::AddSnapPoint

◆ BaseObjRef()

const CRhinoObjRef& CRhinoGetPoint::BaseObjRef ( ) const

Description: Returns the base objref used for object-object tan and perp osnaps.

◆ BasePoint()

ON_3dPoint CRhinoGetPoint::BasePoint ( ) const

Description: Location of base point used by ortho snap, from snap, etc., and DrawLineFromPoint(). Parameters: base_point - [in] pass ON_unset_point to clear the base point. Returns: Location of base point. If value is ON_unset_point, then the base point is not set. Remarks: Default base_point is world (0,0,0) See Also: SetBasePoint

◆ ClearConstraints()

void CRhinoGetPoint::ClearConstraints ( )

Description: Remove any explicit constraints added by calls to CRhinoGetPoint::Constraint() and enable the built-in constraint options. See Also: CRhinoGetPoint::PermitConstraintOptions

◆ ClearConstructionPoints()

void CRhinoGetPoint::ClearConstructionPoints ( )

Description: Remove all construction points. Remarks: Construction points are like snap points except that they get snapped to even when point osnap is off. Typically, there are only a few construction points while there can be many snap points. For example, when polylines are drawn the start point is a construction point and the other points are snap points. See Also: CRhinoGetPoint::AddConstructionPoint CRhinoGetPoint::GetConstructionPoint CRhinoGetPoint::AddSnapPoint

◆ ClearSnapPoints()

void CRhinoGetPoint::ClearSnapPoints ( )

Description: Remove all snap points. Remarks: When point osnap is enabled, GetPoint will snap to points in the Rhino model. If you want the user to be able to snap to additional points, then use CRhinoGetPoint::AddSnapPoints to specify the locations of these additional points. See Also: CRhinoGetPoint::AddSnapPoint CRhinoGetPoint::AddSnapPoints CRhinoGetPoint::GetSnapPoints

◆ ComplexPointInput()

bool CRhinoGetPoint::ComplexPointInput ( ) const

If m_complex_point_input is true, the getpoint operation used some kind of point input not well supported by History and PointOnObject, like .x, .y, between, Intersection osnap, etc. This is added so that putting this kind of thing in history records can be avoided

◆ Constrain() [1/12]

BOOL32 CRhinoGetPoint::Constrain ( const ON_Arc )

constrain point to lie on an arc

◆ Constrain() [2/12]

BOOL32 CRhinoGetPoint::Constrain ( const ON_Brep ,
int  wire_density = -1,
int  face_index = -1,
bool  bAllowPickingPointOffObject = false 
)

When face_index <0, constrain to whole brep. When face_index >=0, constrain to individual face. When wire_density<0, isocurve intersection snapping is turned off, when wire_density>=0, the value defines the isocurve density used for isocurve intersection snapping.

◆ Constrain() [3/12]

BOOL32 CRhinoGetPoint::Constrain ( const ON_BrepFace ,
int  wire_density = -1,
bool  bAllowPickingPointOffObject = false 
)

◆ Constrain() [4/12]

BOOL32 CRhinoGetPoint::Constrain ( const ON_Circle )

constrain point to lie on a circle

◆ Constrain() [5/12]

BOOL32 CRhinoGetPoint::Constrain ( const ON_Curve ,
bool  bAllowPickingPointOffObject = false 
)

bAllowPickingPointOffObject defines whether the point pick is allowed to happen off object. When false, a "no no" cursor is shown when the cursor is not on the object. When true, a normal point picking cursor is used and the marker is visible also when the cursor is not on the object.

◆ Constrain() [6/12]

BOOL32 CRhinoGetPoint::Constrain ( const ON_Cylinder )

constrain point to lie on a cylinder

◆ Constrain() [7/12]

BOOL32 CRhinoGetPoint::Constrain ( const ON_Line ,
BOOL32  bTrackFromStart = true 
)

constrain to a line

◆ Constrain() [8/12]

BOOL32 CRhinoGetPoint::Constrain ( const ON_Mesh ,
bool  bAllowPickingPointOffObject = false 
)

◆ Constrain() [9/12]

BOOL32 CRhinoGetPoint::Constrain ( const ON_Plane ,
bool  bAllowElevator = false 
)

constrain point to lie on a plane

◆ Constrain() [10/12]

BOOL32 CRhinoGetPoint::Constrain ( const ON_Sphere )

constrain point to lie on a sphere

◆ Constrain() [11/12]

BOOL32 CRhinoGetPoint::Constrain ( const ON_Surface ,
bool  bAllowPickingPointOffObject = false 
)

◆ Constrain() [12/12]

BOOL32 CRhinoGetPoint::Constrain ( ON_3dPoint  ,
ON_3dPoint   
)

constrain to a line

You may use one the following to constrain the picked point to lie on a line, plane, curve, surface, ...

◆ ConstrainDistanceFromBasePoint()

void CRhinoGetPoint::ConstrainDistanceFromBasePoint ( double  distance_from_basepoint)

Description: Set distance constraint from base point Parameters: distance_from_basepoint - [in] pass ON_UNSET_VALUE to clear this constraint. Pass 0.0 to disable the ability to set this constraint by typing a number during GetPoint. Remarks: If the base point is set and the distance from base point constraint is > 0, then the picked point is constrained to be this distance from the base point. See Also: CRhinoGetPoint::BasePoint CRhinoGetPoint::PermitFromOption

◆ Constrained()

bool CRhinoGetPoint::Constrained ( ) const

◆ ConstrainEx() [1/2]

BOOL32 CRhinoGetPoint::ConstrainEx ( const ON_Mesh ,
bool  bAllowPickingPointOffObject = false,
double  dOffset = 0.0 
)

Expert version of mesh constraint. Has an optional offset option, and the passed in mesh is used without making a copy which means it must not be deleted while CRhinoGetPoint is in scope.

◆ ConstrainEx() [2/2]

BOOL32 CRhinoGetPoint::ConstrainEx ( const ON_SubD ,
bool  bAllowPickingPointOffObject = false,
double  dOffset = 0.0 
)

Expert version of SubD constraint. Has an optional offset option, and the passed in SubD is used without making a copy which means it must not be deleted while CRhinoGetPoint is in scope.

◆ ConstrainToConstructionPlane()

BOOL32 CRhinoGetPoint::ConstrainToConstructionPlane ( BOOL32  bThroughBasePoint = true,
BOOL32  bProjectOsnaps = false 
)

Description: If enabled, the picked point is constrained to be on the active construction plane. If the base point is set, then the point is constrained to be on the plane that contains the base point and is parallel to the active construction plane.
By default this constraint is enabled. Parameters: bThroughBasePoint - [in] if true and the base point is set, then the point is constrained to be on the plane parallel to the construction plane that passes through the base point, even when planar mode is off. If bThroughBasePoint is false, then the base point shift only happens if planar mode is on. bProjectOsnaps - [in] if true, then osnaps are projected to the current constraint plane. It's identical to turning on projecting osnaps in the osnap dialog, and also planar mode if bThroughBasePoint is true. Remarks: "Planar" mode is on if RhinoApp().AppSettings().Planar() is true. See Also: SetBasePoint.

◆ ConstrainToTargetPlane()

BOOL32 CRhinoGetPoint::ConstrainToTargetPlane ( )

Constrain point to lie on a plane that is parallel to the viewing plane and passes through the view's target point.

◆ ConstrainToVirtualCPlaneIntersection()

BOOL32 CRhinoGetPoint::ConstrainToVirtualCPlaneIntersection ( const ON_Plane )

Description: If enabled, the picked point is constrained to be on the intersection of the plane and the virtual CPlane going through the plane origin. If the planes are parallel, the constraint works just like planar constraint. Parameters: ON_Plane& - The plane used for the plane - virtual CPlane intersection.

◆ CurrentCursor()

HCURSOR CRhinoGetPoint::CurrentCursor ( ) const

Description: Gets cursor that will be used when GetPoint() is called. This is either the get point cursor or a snap cursor. Returns: The current GetPoint cursor (may be a snap cursor or the get point cursor). Remarks: When CRhinoGetPoint::GetPoint is called, the cursor is changed to the cursor specified in CRhinoGetPoint::SetGetPointCursor.
If a snap happens during GetPoint, the cursor is changed to the appropriate snap cursor while the snap is active. The default get point cursor is RhinoApp().m_cross_hair_cursor. See Also: CRhinoGetPoint::SetGetPointCursor CRhinoGetPoint::GetPointCursor RhinoSetCursor

◆ DrawLineFromPoint()

void CRhinoGetPoint::DrawLineFromPoint ( ON_3dPoint  start_point,
BOOL32  bShowDistanceInStatusBar 
)

Description: Use DrawLineFromPoint() if you want a dynamic line drawn from a point to the point being picked. Parameters: start_point - [in] The line is drawn from start_point to the point being picked. If the base point has not been set, then it is set to start_point. bShowDistanceInStatusBar - [in] if true, the distance from the base_point to the point begin picked is shown in the status bar. Remarks: Calling DrawLineFromPoint automatically enables drawing the line. Use EnableDrawLineFromPoint() to toggle the line drawing state. See Also: EnableDrawLineFromPoint, SetBasePoint.

◆ DrawsShadedMeshes()

bool CRhinoGetPoint::DrawsShadedMeshes ( ) const

◆ DynamicDraw() [1/2]

virtual void CRhinoGetPoint::DynamicDraw ( CRhinoDisplayPipeline ,
const ON_3dPoint  
)
virtual

STEP 5a: Optional - override CRhinoGetPoint::DynamicDraw() if you want to dynamically draw things as the mouse/digitizer moves. Every time the mouse moves, DynamicDraw() will be called once per viewport. The calls to DynamicDraw() happen AFTER the call to OnMouseMove().

Use the CRhinoView::Draw* tools to draw things. Use Rhino::LayerColor(), etc., to get Rhino system colors.

If you are drawing anything that takes a long time, periodically call InterruptMouseMove() to see if you should stop.

If you override both OnMouseMove() and DynamicDraw(), then every time the mouse moves you will first get a single call to OnMouseMove() and then get a call to DynamicDraw() for each viewport.

If you override dynamic draw, you should call CRhinoGetPoint::DynamicDraw() at the end of your override.

Reimplemented in CRhinoGetXform, CRhinoGumballDragger, CRhinoGetAngle, CRhinoGetFrameOnObject, CRhGetSubCurvePoint, CRhinoGetRectangle, CRhinoGetRectangleRounded, CRhinoGetRectangle3Point, and CRhinoGetView.

◆ DynamicDraw() [2/2]

virtual void CRhinoGetPoint::DynamicDraw ( HDC  ,
CRhinoViewport ,
const ON_3dPoint  
)
virtual

◆ DynamicDrawBounds()

const ON_BoundingBox& CRhinoGetPoint::DynamicDrawBounds ( ) const

◆ DynamicDrawColor()

ON_Color CRhinoGetPoint::DynamicDrawColor ( ) const

Description: The color used by CRhinoGetPoint::DynamicDraw to draw the current point and the line from the base point to the current point. Returns: Current dynamic draw color. See Also: CRhinoGetPoint::SetDynamicDrawColor

◆ EnableCurveSnapArrow()

void CRhinoGetPoint::EnableCurveSnapArrow ( BOOL32  bDrawDirectionArrowAtSnapPoint = true,
BOOL32  bReverseArrow = false 
)

Description: Controls display of the curve snap arrow icon. Parameters: bDrawDirectionArrowAtSnapPoint - [in] true to draw arrow icon whenever GetPoint snaps to a curve. bReverseArrow - [in] true if arrow icon direction should be the reverse of the first derivative direction. Remarks: The tangent bar is drawn by CRhinoGetPoint::DynamicDraw. If you override CRhinoGetPoint::DynamicDraw, then you must call the base class function. See Also: CRhinoGetPoint::EnableCurveSnapTangentBar CRhinoGetPoint::EnableSnapToCurves CRhinoGetPoint::Constrain( const ON_Curve& )

◆ EnableCurveSnapPerpBar()

void CRhinoGetPoint::EnableCurveSnapPerpBar ( BOOL32  bDrawPerpBarAtSnapPoint = true,
BOOL32  bDrawEndPoints = false 
)

Description: Controls display of the curve snap perpendicular bar icon. Parameters: bDrawPerpBarAtSnapPoint - [in] true to draw a tangent bar icon whenever GetPoint snaps to a curve. bDrawEndPoints - [in] true to draw points at the end of the tangent bar. Remarks: The tangent bar is drawn by CRhinoGetPoint::DynamicDraw. If you override CRhinoGetPoint::DynamicDraw, then you must call the base class function. See Also: CRhinoGetPoint::EnableCurveSnapArrow CRhinoGetPoint::EnableSnapToCurves CRhinoGetPoint::Constrain( const ON_Curve& )

◆ EnableCurveSnapTangentBar()

void CRhinoGetPoint::EnableCurveSnapTangentBar ( BOOL32  bDrawTangentBarAtSnapPoint = true,
BOOL32  bDrawEndPoints = false 
)

Description: Controls display of the curve snap tangent bar icon. Parameters: bDrawTangentBarAtSnapPoint - [in] true to draw a tangent bar icon whenever GetPoint snaps to a curve. bDrawEndPoints - [in] true to draw points at the end of the tangent bar. Remarks: The tangent bar is drawn by CRhinoGetPoint::DynamicDraw. If you override CRhinoGetPoint::DynamicDraw, then you must call the base class function. See Also: CRhinoGetPoint::EnableCurveSnapArrow CRhinoGetPoint::EnableSnapToCurves CRhinoGetPoint::Constrain( const ON_Curve& )

◆ EnableDrawLineFromPoint()

void CRhinoGetPoint::EnableDrawLineFromPoint ( BOOL32  bDrawLineFromPoint = true)

Description: Controls drawing of dynamic a line from the start point. Parameters bDrawLineFromPoint - [in] if true, a dynamic line is drawn from the DrawLineFromPoint start_point to the point being picked. Remarks: Use DrawLineFromPoint to specify the start point, color, and status bar behavior. See Also: DrawLineFromPoint, SetBasePoint.

◆ EnableNoRedrawOnExit()

void CRhinoGetPoint::EnableNoRedrawOnExit ( bool  bNoRedrawOnExit = true)

Description: This setting turns off automatic redraw at the end of GetPoint. May be needed in some commands for flicker free feedback. When true the caller is responsible for cleaning up the screen after GetPoint. The default is false. Parameters: bNoRedrawOnExit - [in]

◆ EnableObjectSnapCursors()

void CRhinoGetPoint::EnableObjectSnapCursors ( bool  bEnableObjectSnapCursors = true)

Description: By default, object snap cursors are enabled. Parameters: bEnableObjectSnapCursors - [in] Returns: True if object snap cursors (plus sign with "near", "end", etc.) are used when the point snaps to a object.

◆ EnableOneShotOsnapHiddenOptions()

void CRhinoGetPoint::EnableOneShotOsnapHiddenOptions ( bool  bEnable)

Description: By default, hidden one-shot object snaps, like typing "e" or "end" and getting a one-shot end snap, are enabled.
You may disable them by calling EnableOneShotOsnapHiddenOptions(false).

◆ EnableOnObjectCursors()

void CRhinoGetPoint::EnableOnObjectCursors ( bool  bEnableOnObjectCursors = true)

Description: By default, OnCrv/OnSrf/OnMesh cursor is shown if osnap cursors are enabled and input is constrained to a curve, surface, brep or a mesh, and the cursor is over the constrained object. Parameters: bUseOnObjectCursors - [in]

◆ EnableSnapToCurves()

void CRhinoGetPoint::EnableSnapToCurves ( BOOL32  = true)

If you want GetPoint() to try to snap to curves when the mouse is near a curve (like the center point in the Circle command when the AroundCurve option is on), then enable the snap to curves option.

◆ Get2dLine()

CRhinoGet::result CRhinoGetPoint::Get2dLine ( CRhinoView pView = NULL,
const POINT *  corner = NULL,
BOOL32  bCentered = false,
int  pen_style = PS_SOLID,
bool  bClampToView = true 
)

Description: After setting up options and so on, call CRhinoGetPoint::Get2dLine to get a 2d line in a view window. Parameters: pView - [in] if pView is not NULL, then the 2d line will be in this view. Otherwise, the 2d line can be in any view. corner - [in] if pView is not NULL and corner is not NULL, then corner will be the location of the start point bCentered - [in] if true, the first point will be the center of the line. pen_style - [in] pen style used to draw dynamic line. If PS_NULL, then no dynamic line is drawn bClampToView - [in] if true, then the endpoints are constrained to be in the view. If false, then the endpoints can be outside of the view. Returns: The type of input that was specified. If CRhinoGet::rect2d is returned, then use CRhinoGetPoint::Rectangle2d to get the value of the 2d point and CRhinoGetPoint::View() to get the view that contains the 2d point.

◆ Get2dPoint()

CRhinoGet::result CRhinoGetPoint::Get2dPoint ( CRhinoView pView = NULL,
bool  bOnMouseUp = false 
)

Description: After setting up options and so on, call CRhinoGetPoint::Get2dPoint to get a 2d point in a view window. Parameters: pView - [in] if pView is not NULL, then the 2d point will be in this view. Otherwise, the 2d point can be in any view. bOnMouseUp - [in] if true, the point will be returned on the mouse up event. Returns: The type of input that was specified. If CRhinoGet::point2d is returned, then use CRhinoGetPoint::Point2d to get the value of the 2d point and CRhinoGetPoint::View() to get the view that contains the 2d point.

◆ Get2dRectangle()

CRhinoGet::result CRhinoGetPoint::Get2dRectangle ( CRhinoView pView = NULL,
const POINT *  corner = NULL,
BOOL32  bCentered = false,
int  pen_style = PS_SOLID,
bool  bClampToView = true,
const wchar_t *  second_prompt = NULL 
)

Description: After setting up options and so on, call CRhinoGetPoint::Get2dRectangle to get a 2d rectanble in a view window. Parameters: pView - [in] if pView is not NULL, then the 2d rectangle will be in this view. Otherwise, the 2d rectangle can be in any view. corner - [in] if pView is not NULL and corner is not NULL, then corner will be the location of the first corner. bCentered - [in] if true, the first point will be the center of the rectangle. pen_style - [in] pen style used to draw dynamic rectangle second_prompt - [in] default automatically comes up with the right string. If you are very hard to satisfy, you can supply your own. Returns: The type of input that was specified. If CRhinoGet::rect2d is returned, then use CRhinoGetPoint::Rectangle2d to get the value of the 2d point and CRhinoGetPoint::View() to get the view that contains the 2d point.

◆ GetConstructionPoints()

int CRhinoGetPoint::GetConstructionPoints ( ON_SimpleArray< ON_3dPoint > &  construction_points) const

Description: Get current construction points. Parameters: construction_points - [out] Returns: number of construction points Remarks: Construction points are like snap points except that they get snapped to even when point osnap is off. Typically, there are only a few construction points while there can be many snap points. For example, when polylines are drawn the start point is a construction point and the other points are snap points. See Also: CRhinoGetPoint::AddConstructionPoint CRhinoGetPoint::ClearConstructionPoint CRhinoGetPoint::AddSnapPoint

◆ GetCS()

ON_Plane CRhinoGetPoint::GetCS ( bool  bWorldCoordinates,
bool  bRelativeCoordinates 
)
overrideprotectedvirtual

Helper used by IsAcceptableInput when parsing points.

Reimplemented from CRhinoGet.

◆ GetPlanarConstraint()

BOOL32 CRhinoGetPoint::GetPlanarConstraint ( const CRhinoViewport vp,
ON_Plane plane 
) const

Description: Check if point is constrained to be on a plane. Parameters: vp - [in] NULL or viewport to use for construction plane. plane - [out] If GetPlanarConstraint() returns true, then the planar constraint is returned here. Example: CRhinoView* view = ...; ON_Plane plane; if ( GetPlanarConstraint( &view->Viewport(), plane ) ) { ... } Returns: true if there is an active planar constraint.

◆ GetPoint()

CRhinoGet::result CRhinoGetPoint::GetPoint ( CRhinoHistory history = nullptr,
bool  bOnMouseUp = false 
)

STEP 6: Call GetPoint() or Get2dPoint() to get a point. Description: After setting up options and so on, call CRhinoGetPoint::GetPoint to get a 3d point. Parameters: history - [in] if not NULL, a record of the options and point getting is stored here. bOnMouseUp - [in] if false, the point is returned when the left mouse button goes down. If true, the point is returned when the left mouse button goes up. If true, the virtual function

Returns: The type of input that was specified. If CRhinoGet::point is returned, then use CRhinoGetPoint::Point to get the value of the 3d point.

◆ GetPointCursor()

HCURSOR CRhinoGetPoint::GetPointCursor ( ) const

Description: Gets the default get point cursor. Returns: The default GetPoint cursor. Remarks: When CRhinoGetPoint::GetPoint is called, the cursor is changed to the cursor specified in CRhinoGetPoint::SetGetPointCursor.
If a snap happens during GetPoint, the cursor is changed to the appropriate snap cursor while the snap is active. The default get point cursor is RhinoApp().m_cross_hair_cursor. See Also: CRhinoGetPoint::SetGetPointCursor CRhinoGetPoint::CurrentCursor RhinoSetCursor

◆ GetPointOnMouseUp()

bool CRhinoGetPoint::GetPointOnMouseUp ( ) const

true if getting point on mouse up event

◆ GetSnapPoints()

int CRhinoGetPoint::GetSnapPoints ( ON_SimpleArray< ON_3dPoint > &  snap_points) const

Description: Get current snap points. Parameters: snap_points - [out] Returns: number of snap points Remarks: See Also: CRhinoGetPoint::AddSnapPoint CRhinoGetPoint::AddSnapPoints CRhinoGetPoint::ClearSnapPoints

◆ GetTabModeSettings()

bool CRhinoGetPoint::GetTabModeSettings ( int *  tab_mode = 0,
ON_Line tab_mode_line = 0 
)

Description: Returns the current tab mode setting. Parameters: tab_mode - [out] The current tab mode, 0 = off, 1 = on. tab_mode_line - [out] The current line constraint. Returns: True of tab mode is permitted, false otherwise. See Also: CRhinoGetPoint::PermitTabMode

◆ GetView3dPoint()

bool CRhinoGetPoint::GetView3dPoint ( UINT  nPointingDevice,
CRhinoView view,
UINT_PTR  nFlags,
ON_3dPoint  device_point,
const ON_Line world_line,
ON_3dPoint world_point 
)

Description: Used internally. Do not call. No support is available.

◆ HasBasePoint()

BOOL32 CRhinoGetPoint::HasBasePoint ( ) const

Description: Returns true if SetBasePonint has been called Returns: true - SetBasePoint has been called. false - SetBasePoint has not been called. See Also: SetBasePoint

◆ InElevatorMode()

bool CRhinoGetPoint::InElevatorMode ( ON_Line elevator) const
protected

Parameters: elevator - [out] if the getter is in elevator mode, this line defines the base and top of the elevator. Returns: True if point getter is currently in elevator mode.

◆ InterruptMouseMove()

BOOL32 CRhinoGetPoint::InterruptMouseMove ( ) const

tool for use in

If you have lengthy computations in OnMouseMove() and/or DymanicPaint() overrides, then periodically call InterruptMouseMove() to see if you should interrupt your work because the mouse has moved again.

◆ MouseMoved()

bool CRhinoGetPoint::MouseMoved ( ) const

Returns: True if mouse moved during the call to GetPoint();

◆ NumberPreview()

bool CRhinoGetPoint::NumberPreview ( double *  number = nullptr) const

Description: Returns true and optionally the number if m_bAcceptNumber is true and user is typing a number, but hasn't pressed Enter. Necessary for making OnMouseMove override pay attention to what is being typed at the command prompt in real time, and also after call to GetPoint() if you want the typed number to affect the result even if the user picked a point.

◆ OnMouseDown()

virtual void CRhinoGetPoint::OnMouseDown ( CRhinoViewport vp,
UINT  nFlags,
const ON_3dPoint point,
const ON_2iPoint view_wnd_point 
)
virtual

Description: This virtual function CRhinoGetPoint::OnMouseDown is called during CRhinoGetPoint::Get2dRectangle, RhinoGetPoint::Get2dLine, and CRhinoGetPoint::GetPoint(..,true) when the mouse down event for the initial point occurs. The default does nothing. This function is not called during ordinary point getting because the mouse down event terminates an ordinary point get and returns a CRhinoGet::point result. Parameters: vp - [in] active view nFlags - [in] standard windows OnMouseMove event flags point - [in] 3d world location view_wnd_point - [in] If the point is coming from a "mouse" pointing device, view_wnd_point is the CRhinoView window coordinates of mouse location. If the point is coming from a 3d digitizer pointing device, view_wnd_point is NULL.

Reimplemented in CRhinoGumballDragger.

◆ OnMouseMove()

virtual void CRhinoGetPoint::OnMouseMove ( CRhinoViewport vp,
UINT  nFlags,
const ON_3dPoint point,
const ON_2iPoint view_wnd_point 
)
virtual

STEP 4: Optional - override CRhinoGetPoint::OnMouseMove() Description: If you want to be called every time the mouse moves, override this function. Parameters: vp - [in] active view nFlags - [in] standard windows OnMouseMove event flags point - [in] 3d world location ( May be uninitialized) view_wnd_point - [in] If the point is coming from a "mouse" pointing device, view_wnd_point is the CRhinoView window coordinates of mouse location. If the point is coming from a 3d digitizer pointing device, view_wnd_point is NULL. Remarks: CRhinoGetPoint::OnMouseMove is called once per mouse move and is called BEFORE any calls to CRhinoGetPoint::OnDynamicDraw. If you are doing anything that takes a long time, periodically call InterruptMouseMove() to see if you should stop. If the view is such that the 2d screen point can't be mapped to a 3d point, the 'point' argument will be ON_unset_point

Reimplemented in CRhinoGetAngle, CRhinoGetXform, CRhinoGumballDragger, CRhinoGetFrameOnObject, CRhinoGetRectangleRounded, CRhinoGetView, CRhinoGetRectangle, CRhGetSubCurvePoint, and CRhinoGetRectangle3Point.

◆ OnViewMouseDown()

int CRhinoGetPoint::OnViewMouseDown ( CRhinoView ,
int  button,
UINT  nFlags,
const ON_2iPoint point,
CRhinoViewport vp 
)

these functions are used by CRhinoView::OnMouseDown/Move/Up - pretend they don't exist

◆ OnViewMouseMove()

int CRhinoGetPoint::OnViewMouseMove ( CRhinoView ,
int  button,
UINT  nFlags,
const ON_2iPoint point,
CRhinoViewport vp 
)

◆ OnViewMouseUp()

int CRhinoGetPoint::OnViewMouseUp ( CRhinoView ,
int  button,
UINT  nFlags,
const ON_2iPoint point,
CRhinoViewport vp 
)

◆ operator=()

CRhinoGetPoint& CRhinoGetPoint::operator= ( const CRhinoGetPoint )
delete

◆ OrthoSnap()

bool CRhinoGetPoint::OrthoSnap ( ) const

Description: Returns the ortho permitter state set with PermitOrthoSnap. By default returns true. See Also: PermitOrthoSnap

◆ OsnapOverideEnabled()

bool CRhinoGetPoint::OsnapOverideEnabled ( CRhinoAppSettings::osnap_mode mode) const

Description: Returns true if m_bEnableOsnap is false and vice versa. It also sets the mode to m_osnap_override;

◆ PermitConstraintOptions()

void CRhinoGetPoint::PermitConstraintOptions ( BOOL32  bPermitConstraintOptions = true)

Description: Control the availability of the built-in linear, planar, curve, and surface constraint options like "Along", "AlongPerp", "AlongTan", "AlongParallel", "Between", "OnCrv", "OnSrf", ".x", ".y", ".z", ".xy", etc. Parameters: bPermitConstraintOptions - [in] if true, then the built-in constraint options are automatically available in GetPoint. Remarks: By default, these built-in constraint options are available unless an explicit constraint is added by calling one of the CRhinoGetPoint::Constrain functions.
Calling CRhinoGetPoint::ClearConstraints automatically enables the built-in constraint options. The built-in constraint options are never visible on the command line and the user must type the complete option name to activate these options. See Also: CRhinoGetPoint::SetBasePoint CRhinoGetPoint::PermitOrthoSnap CRhinoGetPoint::PermitFromOption

◆ PermitElevatorMode()

void CRhinoGetPoint::PermitElevatorMode ( int  permit_elevator_mode = 1)

Description: Permit use of the control key to define a line constraint. Parameters: permit_elevator_mode - [in] 0: no elevator modes are permitted 1: fixed plane elevator mode (like the Line command) 2: cplane elevator mode (like object dragging) Remarks: By default, mode 1 is enabled.

◆ PermitFromOption()

void CRhinoGetPoint::PermitFromOption ( BOOL32  bPermitFromOption = true)

Description: Control the availability of the built-in "From" option. By default, the "From" option is enabled. Parameters: bPermitFromOption - [in] if true, then the "From" option is automatically available in GetPoint. Remarks: The GetPoint "From" option is never visible on the command line and the user must type the complete option name to activate the "From" option.
When the GetPoint "From" snap is enabled, the user set/change the base point during GetPoint by typing "From" and picking a point.

A related option is the builit-in distance from base point constraint that is can be set before GetPoint is called by passing a value to CRhinoGetPoint::ConstrainDistanceFromBasePoint or during GetPoint by entering a number. See Also: CRhinoGetPoint::SetBasePoint CRhinoGetPoint::PermitOrthoSnap CRhinoGetPoint::ConstrainDistanceFromBasePoint CRhinoGetPoint::PermitConstraintOptions

◆ PermitObjectSnap()

void CRhinoGetPoint::PermitObjectSnap ( BOOL32  bPermitObjectSnap = true)

Description: By default, object snaps like "end", "near", etc. are controlled by the user. If you want to disable this ability, then call PermitObjectSnap(false). Parameters: bPermitObjectSnap - [in] true to permit snapping to objects.

◆ PermitOrthoSnap()

void CRhinoGetPoint::PermitOrthoSnap ( BOOL32  bPermitOrthoSnap = true)

Description: Controls availability of ortho snap. Default is true. Parameters: bPermitOrthoSnap - [in] if true, then GetPoint pays attention to the Rhino "ortho snap" and "planar snap" settings reported by RhinoApp().AppSettings().Ortho() and RhinoApp().AppSettings().Planar(). Remarks: The base point must be set and ortho snapping must be permitted and RhinoApp().AppSettings().Ortho() must be true for ortho snapping to work. See Also: SetBasePoint, PermitFromOption.

◆ PermitTabMode()

void CRhinoGetPoint::PermitTabMode ( bool  bPermitTabMode = true)

Description: Permit use of the tab key to define a line constraint. Parameters: bPermitTabMode - [in] if true, then the built-in tab key mode is available. Remarks: By default, use of the tab key is supported.

◆ Point()

ON_3dPoint CRhinoGetPoint::Point ( ) const

returns 3d point in world coordinates

STEP 7: Use result code returned by GetPoint() to determine what function to call to get the input.

result function CRhinoGet::option CRhinoGet::Option() CRhinoGet::number CRhinoGet::Number() CRhinoGet::point CRhinoPoint::Point()

◆ PointOnBrep()

const ON_BrepFace* CRhinoGetPoint::PointOnBrep ( double *  u,
double *  v 
) const

Description: Use to determine if point was on a brep (face).

Parameters: u - [out] v - [out] if the point was on a face, then the (*u,*v) are the face parameters for the point.

Returns: pointer to a brep or NULL if the point was not on a brep.

◆ PointOnCurve()

const ON_Curve* CRhinoGetPoint::PointOnCurve ( double *  t) const

Description: Use to determine if point was on a curve.

Parameters: t - [out] if the point was on a curve, then the *t is the curve parameter for the point. The point returned by CRhinoGetPoint::Point() is the same as curve->PointAt(*t).

Returns: pointer to a curve or NULL if the point was not on a curve.

◆ PointOnEdge()

const ON_BrepEdge* CRhinoGetPoint::PointOnEdge ( double *  edge_parameter,
const ON_BrepTrim *&  pTrim 
) const

Description: Use to determine if point was on an edge curve of a brep. Parameters: edge_parameter - [out] edge parameter of pick point pTrim - [out] the associated trim Remarks: An edge can be a boundary or interior edge. Boundary edges have a single trim. Interior edges have multiple trims. If you need information about the surface, then examine the trim. Example: CRhinoGetPoint gp; gp.GetPoint(); if ( gp.Result() == CRhinoGet::point ) { double edge_t; double trim_t; const ON_BrepTrim* pTrim = NULL; const ON_BrepEdge* pEdge = gp.PointOnEdge( &edge_t, pTrim ); if ( pEdge ) { const ON_Surface* pSurface pEdge->Brep()->SurfaceOf(*pTrim); } } Remarks: If you do not need trim or surface information, then use CRhinoGetPoint::PointOnCurve. Returns: NULL or edge the point was on.

◆ PointOnObject()

BOOL32 CRhinoGetPoint::PointOnObject ( CRhinoObjRef ) const

Call this function to see if the point was on an object. If PointOnObject() returns true, then the object is returned in the CRhinoObjRef parameter. Use CRhinoObjRef::CurveParameter() or CRhinoObjRef::SurfaceParameter() to get the parameter values for the point.

◆ PointOnSurface()

const ON_Surface* CRhinoGetPoint::PointOnSurface ( double *  u,
double *  v 
) const

Description: Use to determine if point was on a surface.

Parameters: u - [out] v - [out] if the point was on a surface, then the (*u,*v) are the surface parameters for the point. The point returned by Point() is the same as surface->PointAt(*u,*v).

Returns: pointer to a surface or NULL if the point was not on a surface.

◆ ProhibitObjectSnap()

void CRhinoGetPoint::ProhibitObjectSnap ( const CRhinoObject object)

Description: Used to prevent snapping to a specific object. Parameters: object - [in] object that should not be snapped to.

◆ SetBaseObjRef()

void CRhinoGetPoint::SetBaseObjRef ( const CRhinoObjRef ref)

Description: Sets the base objref needed for object-object tan and perp osnaps.

◆ SetBasePoint()

void CRhinoGetPoint::SetBasePoint ( ON_3dPoint  basePoint,
bool  showDistanceInStatusBar = false 
)

Description: Set base point used by ortho snap, from snap, planar snap, etc. Parameters: basePoint - [in] showDistanceInStatusBar - [in] if true, then the distance from base_point to the current point will be in the status bar distance pane.

◆ SetComplexPointInput()

void CRhinoGetPoint::SetComplexPointInput ( bool  b)

◆ SetDrawsShadedMeshes()

void CRhinoGetPoint::SetDrawsShadedMeshes ( bool  on)

◆ SetDynamicDrawBounds()

void CRhinoGetPoint::SetDynamicDrawBounds ( const ON_BoundingBox bbox)

◆ SetDynamicDrawColor()

void CRhinoGetPoint::SetDynamicDrawColor ( COLORREF  color)

Description: Set the color used by CRhinoGetPoint::DynamicDraw to draw the current point and the line from the base point to the current point. Remarks: The default is RhinoApp().AppSettings().ActiveLayerColor(). See Also: DynamicDrawColor, EnableDrawLineFromPoint

◆ SetGetPointCursor()

HCURSOR CRhinoGetPoint::SetGetPointCursor ( HCURSOR  getpoint_cursor)

Description: Sets cursor that will be used when GetPoint() is called and a snap is not happening. Parameters: getpoint_cursor - [in] Returns: Previous get point cursor. Remarks: When CRhinoGetPoint::GetPoint is called, the cursor is changed to getpoint_cursor.
The default is RhinoApp().m_cross_hair_cursor. See Also: CRhinoGetPoint::CurrentCursor CRhinoGetPoint::GetPointCursor RhinoSetCursor

◆ SetNumberPreview()

void CRhinoGetPoint::SetNumberPreview ( double  number)

Description: Sets the number preview. Pass ON_UNSET_VALUE to clear the preview.

◆ SnapEvent()

const CRhinoSnapEvent& CRhinoGetPoint::SnapEvent ( ) const

Description: Returns the snap event if object snap was active when picking the point.

Friends And Related Function Documentation

◆ CRhinoGetPointPrivate

friend class CRhinoGetPointPrivate
friend

Member Data Documentation

◆ m_construction_points

ON_3dPointArray CRhinoGetPoint::m_construction_points
protected

◆ m_feedback_lines

ON_SimpleArray<ON_Line> CRhinoGetPoint::m_feedback_lines
protected

when a snap or constraint requires feedback line(s), m_feedback_line_count >= 0. If you override DynamicDraw, then draw these lines using RhinoApp().AppSettings().FeedbackColor() The default feedback color is black.

◆ m_int_osnap_points

ON_3dPointArray CRhinoGetPoint::m_int_osnap_points
protected

◆ m_point_osnap_points

ON_3dPointArray CRhinoGetPoint::m_point_osnap_points
protected

◆ m_tracking_lines

ON_SimpleArray<ON_Line> CRhinoGetPoint::m_tracking_lines
protected

when a snap or constraint requires tracking line(s), m_tracking_line_count >= 0. If you override DynamicDraw, then draw these lines using RhinoApp().AppSettings().TrackingColor() The default tracking color is white.