Rhino C++ API  7.22
Public Member Functions | Public Attributes | Friends | List of all members
CRhinoSnapEvent Class Reference

#include <rhinoSdkSnap.h>

Public Member Functions

 CRhinoSnapEvent ()
 
 CRhinoSnapEvent (const CRhinoSnapEvent &)
 
 ~CRhinoSnapEvent ()
 
bool CompareAndUpdate (const CRhinoSnapEvent &src, const ON_Xform *pXform=0)
 Sets *this to src and returns true if src precedes this (src > *this). Also updates list of secondary snap modes with an optional xform needed when snapping to blocks or model space objects in layout space. More...
 
BOOL operator!= (const CRhinoSnapEvent &) const
 
BOOL operator< (const CRhinoSnapEvent &) const
 
CRhinoSnapEventoperator= (const CRhinoSnapEvent &)
 
BOOL operator== (const CRhinoSnapEvent &) const
 
BOOL operator> (const CRhinoSnapEvent &) const
 
unsigned int SecondarySnapModes () const
 Returns secondary osnap modes if other osnaps were active at the same location as this event. More...
 

Public Attributes

bool m_bConstructionPointSnap
 
bool m_bInferred
 flag to see if an inferred line was involved in this snap event More...
 
double m_near_depth
 
double m_near_distance
 
ON_3dPoint m_near_point
 
double m_near_t
 
CRhinoObjRef m_objref
 object and parameter corresponding to snap_point are in m_objref More...
 
CRhinoObjRef m_second_objref
 
int m_smart_point_index
 tells which smart point the snap event belongs to if any. More...
 
ON_3dPoint m_snap___point
 same as m_near_t for near snaps More...
 
double m_snap_depth
 
double m_snap_distance
 
CRhinoAppSettings::osnap_mode m_snap_mode
 type of snap More...
 
int m_snap_point_index
 index that points to a snap_point in case one was hit. -1 if not set. More...
 
double m_snap_t
 same as m_near_t for center and near snaps More...
 
int m_type
 

Friends

class CRhSnapEventExtension
 

Constructor & Destructor Documentation

◆ CRhinoSnapEvent() [1/2]

CRhinoSnapEvent::CRhinoSnapEvent ( )

◆ CRhinoSnapEvent() [2/2]

CRhinoSnapEvent::CRhinoSnapEvent ( const CRhinoSnapEvent )

◆ ~CRhinoSnapEvent()

CRhinoSnapEvent::~CRhinoSnapEvent ( )

Member Function Documentation

◆ CompareAndUpdate()

bool CRhinoSnapEvent::CompareAndUpdate ( const CRhinoSnapEvent src,
const ON_Xform pXform = 0 
)

Sets *this to src and returns true if src precedes this (src > *this). Also updates list of secondary snap modes with an optional xform needed when snapping to blocks or model space objects in layout space.

◆ operator!=()

BOOL CRhinoSnapEvent::operator!= ( const CRhinoSnapEvent ) const

◆ operator<()

BOOL CRhinoSnapEvent::operator< ( const CRhinoSnapEvent ) const

◆ operator=()

CRhinoSnapEvent& CRhinoSnapEvent::operator= ( const CRhinoSnapEvent )

◆ operator==()

BOOL CRhinoSnapEvent::operator== ( const CRhinoSnapEvent ) const

◆ operator>()

BOOL CRhinoSnapEvent::operator> ( const CRhinoSnapEvent ) const

the >, <, ==, != operators compare mode, depth and distance and are used to determine which snaps take precedence

◆ SecondarySnapModes()

unsigned int CRhinoSnapEvent::SecondarySnapModes ( ) const

Returns secondary osnap modes if other osnaps were active at the same location as this event.

Friends And Related Function Documentation

◆ CRhSnapEventExtension

friend class CRhSnapEventExtension
friend

Member Data Documentation

◆ m_bConstructionPointSnap

bool CRhinoSnapEvent::m_bConstructionPointSnap

◆ m_bInferred

bool CRhinoSnapEvent::m_bInferred

flag to see if an inferred line was involved in this snap event

◆ m_near_depth

double CRhinoSnapEvent::m_near_depth

depth of near point. CRhinoSnapContext::GetSnapDepth(m_near_point,..) sets m_near_depth.

◆ m_near_distance

double CRhinoSnapEvent::m_near_distance

shortest distance from snap ray to near point CRhinoSnapContext::GetSnapDepth(m_near_point,..) sets m_near_distance.

◆ m_near_point

ON_3dPoint CRhinoSnapEvent::m_near_point

The near point is the point on the curve nearest to the mouse. This point determines the snap depth and snap distance.

◆ m_near_t

double CRhinoSnapEvent::m_near_t

◆ m_objref

CRhinoObjRef CRhinoSnapEvent::m_objref

object and parameter corresponding to snap_point are in m_objref

◆ m_second_objref

CRhinoObjRef CRhinoSnapEvent::m_second_objref

Second object if snap mode is CRhinoAppSettings::os_intersection and two objects are involved in the snap event. Set also when object-object snapping and snap mode is CRhinoAppSettings::os_tangent or CRhinoAppSettings::os_perpendicular.

◆ m_smart_point_index

int CRhinoSnapEvent::m_smart_point_index

tells which smart point the snap event belongs to if any.

◆ m_snap___point

ON_3dPoint CRhinoSnapEvent::m_snap___point

same as m_near_t for near snaps

location of snap point. When a snap point is an end, midpoint, center, etc., the snap point may differ from the near point.

◆ m_snap_depth

double CRhinoSnapEvent::m_snap_depth

depth of snap point. CRhinoSnapContext::GetSnapDepth(m_snap___point,..) sets m_snap_depth.

◆ m_snap_distance

double CRhinoSnapEvent::m_snap_distance

shortest distance from snap ray to snap point CRhinoSnapContext::GetSnapDepth(m_snap___point,..) sets m_snap_distance.

◆ m_snap_mode

CRhinoAppSettings::osnap_mode CRhinoSnapEvent::m_snap_mode

type of snap

◆ m_snap_point_index

int CRhinoSnapEvent::m_snap_point_index

index that points to a snap_point in case one was hit. -1 if not set.

◆ m_snap_t

double CRhinoSnapEvent::m_snap_t

same as m_near_t for center and near snaps

◆ m_type

int CRhinoSnapEvent::m_type

the inferred line type. 0=notset 1=ortho 2=tan 4=perp 8=tan_parallel 16=perp_parallel can be a combination of the types