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

#include <rhinoSdkPick.h>

Public Member Functions

 CRhinoSubDPickSettings ()=default
 
 CRhinoSubDPickSettings (const CRhinoSubDPickSettings &)=default
 
 ~CRhinoSubDPickSettings ()=default
 
bool ComponentIsEligible (ON_SubDComponentPtr component_ptr) const
 
bool ComponentsAreEligible () const
 
bool EdgeIsEligible (const ON_SubDEdge *subd_edge) const
 
bool EdgesAreEligible () const
 
bool EntireObjectIsEligible () const
 
bool FaceFromWireframeEdgeIsEligible (const ON_SubDFace *subd_face, const ON_SubDEdge *subd_edge) const
 
bool FaceIsEligible (const ON_SubDFace *subd_face) const
 
bool FacesAreEligible () const
 
bool NothingIsEligible () const
 
CRhinoSubDPickSettingsoperator= (const CRhinoSubDPickSettings &)=default
 
bool ProxyBrepComponentsAreEligible () const
 
bool ProxyBrepIsEligible () const
 
bool ProxyBrepResults () const
 
bool SubDComponentsAreEligible () const
 
bool SubDIsEligible () const
 
bool SubDResults () const
 
bool VertexIsEligible (const ON_SubDVertex *subd_vertex) const
 
bool VerticesAreEligible () const
 
bool WireFrameSelection () const
 

Static Public Member Functions

static CRhinoSubDPickSettings CreateFromObjectAndGetObjectContext (const class CRhinoSubDObject &subd_object, const class CRhinoGetObject &go, bool bCheckSubObjects)
 
static CRhinoSubDPickSettings CreateFromObjectAndGetObjectFilters (const class ON_SubD &subd, bool bExcludeComponents, bool bExcludeProxyBrep, unsigned int go_geometry_filter, unsigned int go_attribute_filter)
 
static CRhinoSubDPickSettings CreateFromObjectAndPickContext (const class CRhinoSubDObject &subd_object, const class CRhinoPickContext &pick_context)
 

Public Attributes

bool m_bReturnMultipleSubobjects = false
 
unsigned int m_edge_component_attribute_filter = 0
 
unsigned int m_rhino_doc_sn = 0
 
unsigned int m_rhino_object_sn = 0
 

Static Public Attributes

static const CRhinoSubDPickSettings Defaults
 

Constructor & Destructor Documentation

◆ CRhinoSubDPickSettings() [1/2]

CRhinoSubDPickSettings::CRhinoSubDPickSettings ( )
default

◆ ~CRhinoSubDPickSettings()

CRhinoSubDPickSettings::~CRhinoSubDPickSettings ( )
default

◆ CRhinoSubDPickSettings() [2/2]

CRhinoSubDPickSettings::CRhinoSubDPickSettings ( const CRhinoSubDPickSettings )
default

Member Function Documentation

◆ ComponentIsEligible()

bool CRhinoSubDPickSettings::ComponentIsEligible ( ON_SubDComponentPtr  component_ptr) const

Description: Determine if the component_ptr attributes make it eligible to be selected. Parameters: component_ptr - [in] Returns: true if the subd component is eligible for selection. false if subd component is not eligible for selection. Remarks: This function inspects the component attributes information and values of CRhinoSubDPickSettings.m_bExclude* to determine if the component is eligible for selection. Any additional tests, like the frustum tests required for a point/window/crossing selection, must be checked as well.

◆ ComponentsAreEligible()

bool CRhinoSubDPickSettings::ComponentsAreEligible ( ) const

Returns: True if SubD or proxy brep vertices, edges, or faces are eligible to be selected as subobjects.

◆ CreateFromObjectAndGetObjectContext()

static CRhinoSubDPickSettings CRhinoSubDPickSettings::CreateFromObjectAndGetObjectContext ( const class CRhinoSubDObject subd_object,
const class CRhinoGetObject go,
bool  bCheckSubObjects 
)
static

◆ CreateFromObjectAndGetObjectFilters()

static CRhinoSubDPickSettings CRhinoSubDPickSettings::CreateFromObjectAndGetObjectFilters ( const class ON_SubD subd,
bool  bExcludeComponents,
bool  bExcludeProxyBrep,
unsigned int  go_geometry_filter,
unsigned int  go_attribute_filter 
)
static

Parameters: subd - [in] bExcludeComponents - [in] if true, vertices, edges, and faces (either as subd components or proxy brep components) cannot be selected. bExcludeProxyBrep - [in] if true, a proxy brep or its components cannot be used. if false, go_geometry_filter and go_attribute_filter determine when a proxy brep might be allowed.

◆ CreateFromObjectAndPickContext()

static CRhinoSubDPickSettings CRhinoSubDPickSettings::CreateFromObjectAndPickContext ( const class CRhinoSubDObject subd_object,
const class CRhinoPickContext pick_context 
)
static

◆ EdgeIsEligible()

bool CRhinoSubDPickSettings::EdgeIsEligible ( const ON_SubDEdge subd_edge) const

Description: Determine if the subd_edge is eligible to be selected as an edge subobject.

Parameters: subd_edge - [in]

Returns: true if the subd_edge is eligible for selection. false if subd_edge is not eligible for selection.

Remarks: Do not use this function to determine if attached faces or attached vertices are eligible.

This function inspects the values of CRhinoSubDPickSettings.m_bExcludeEdges, subd_edge->m_status.IsHidden(), and subd_edge->ComponentAttributes() to determine if the edge is eligible for selection. Any additional tests, like the frustum tests required for a point/window/crossing selection, must be checked as well.

◆ EdgesAreEligible()

bool CRhinoSubDPickSettings::EdgesAreEligible ( ) const

Returns: True if SubD or proxy brep edges are eligible to be selected.

◆ EntireObjectIsEligible()

bool CRhinoSubDPickSettings::EntireObjectIsEligible ( ) const

Returns: True if the SubD or proxy brep as an entire object is eligible to be selected.

◆ FaceFromWireframeEdgeIsEligible()

bool CRhinoSubDPickSettings::FaceFromWireframeEdgeIsEligible ( const ON_SubDFace subd_face,
const ON_SubDEdge subd_edge 
) const

Description: Determine if the subd_face attributes make it eligible to be selected in a wireframe pick that hits subd_edge Parameters: subd_face - [in] Face to test subd_edge - [in] Edge to pick in wireframe Returns: true if the subd_face is eligible for selection. false if subd_face is not eligible for selection. Remarks: This function inspects the values of CRhinoSubDPickSettings.m_bExcludeFaces, subd_face->m_status.IsHidden(), and subd_face->ComponentAttributes() to determine if the face is eligible for selection. Any additional tests, like the frustum tests required for a point/window/crossing selection, must be checked as well.

◆ FaceIsEligible()

bool CRhinoSubDPickSettings::FaceIsEligible ( const ON_SubDFace subd_face) const

Description: Determine if the subd_face attributes make it eligible to be selected. Parameters: subd_face - [in] Returns: true if the subd_face is eligible for selection. false if subd_face is not eligible for selection. Remarks: This function inspects the values of CRhinoSubDPickSettings.m_bExcludeFaces, subd_face->m_status.IsHidden(), and subd_face->ComponentAttributes() to determine if the face is eligible for selection. Any additional tests, like the frustum tests required for a point/window/crossing selection, must be checked as well.

◆ FacesAreEligible()

bool CRhinoSubDPickSettings::FacesAreEligible ( ) const

Returns: True if SubD or proxy brep faces are eligible to be selected.

◆ NothingIsEligible()

bool CRhinoSubDPickSettings::NothingIsEligible ( ) const

Returns: True if nothing is eligible to be selected.

◆ operator=()

CRhinoSubDPickSettings& CRhinoSubDPickSettings::operator= ( const CRhinoSubDPickSettings )
default

◆ ProxyBrepComponentsAreEligible()

bool CRhinoSubDPickSettings::ProxyBrepComponentsAreEligible ( ) const

Returns: true if one or more individual proxy brep components are eligbile to be selected as brep components. Remarks: At most one of SubDComponentsAreEligible() and ProxyBrepComponentsAreEligible() will be true;

◆ ProxyBrepIsEligible()

bool CRhinoSubDPickSettings::ProxyBrepIsEligible ( ) const

Returns: True if the entire proxy brep is eligible to be selected as a brep object. Remarks: At most one of SubDResults() and ProxyBrepResults() will be true;

◆ ProxyBrepResults()

bool CRhinoSubDPickSettings::ProxyBrepResults ( ) const

Returns: True if the pick must eventually return references to the proxy brep or its components. Remarks: At most one of SubDResults() and ProxyBrepResults() will be true;

◆ SubDComponentsAreEligible()

bool CRhinoSubDPickSettings::SubDComponentsAreEligible ( ) const

Returns: true if one or more individual subd components are eligbile to be selected as subd components. Remarks: At most one of SubDComponentsAreEligible() and ProxyBrepComponentsAreEligible() will be true;

◆ SubDIsEligible()

bool CRhinoSubDPickSettings::SubDIsEligible ( ) const

Returns: True if the entire subd is eligible to be selected as a subd object. Remarks: At most one of SubDResults() and ProxyBrepResults() will be true;

◆ SubDResults()

bool CRhinoSubDPickSettings::SubDResults ( ) const

Returns: True if the pick must eventually return references to the subd or its components. Remarks: At most one of SubDResults() and ProxyBrepResults() will be true;

◆ VertexIsEligible()

bool CRhinoSubDPickSettings::VertexIsEligible ( const ON_SubDVertex subd_vertex) const

Description: Determine if the subd_vertex attributes make it eligible to be selected. Parameters: subd_vertex - [in] Returns: true if the subd_vertex is eligible for selection. false if subd_vertex is not eligible for selection. Remarks: This function inspects the values of CRhinoSubDPickSettings.m_bExcludeVertices, subd_vertex->m_status.IsHidden(), and subd_vertex->ComponentAttributes() to determine if the vertex is eligible for selection. Any additional tests, like the frustum tests required for a point/window/crossing selection, must be checked as well.

◆ VerticesAreEligible()

bool CRhinoSubDPickSettings::VerticesAreEligible ( ) const

Returns: True if SubD or proxy brep vertices are eligible to be selected.

◆ WireFrameSelection()

bool CRhinoSubDPickSettings::WireFrameSelection ( ) const

Returns: True if the selection can only "see" edges and vertices.

Member Data Documentation

◆ Defaults

const CRhinoSubDPickSettings CRhinoSubDPickSettings::Defaults
static

◆ m_bReturnMultipleSubobjects

bool CRhinoSubDPickSettings::m_bReturnMultipleSubobjects = false

If m_bReturnMultipleSubobjects is true, then every eligible prt of the ON_SubD that is hit will be returned. If m_bReturnMultipleSubobjects is false, then the a single best best pick is returned.

◆ m_edge_component_attribute_filter

unsigned int CRhinoSubDPickSettings::m_edge_component_attribute_filter = 0

Component attribute filters

If a filter is not zero and the corresponding component is not excluded, then the filter restricts properties a component must have to be selected. Set the bits of properties you will accept. The filters are bit fields set using values from ON_ComponentAttributes::EdgeAttributes enums.

If 0 != m_edge_topology_attribute_filter and m_bExcludeEdges is false, then and edge is eligible only if 0 != (m_edge_component_attribute_filter & edge->EdgeAttributes()).

◆ m_rhino_doc_sn

unsigned int CRhinoSubDPickSettings::m_rhino_doc_sn = 0

The values of m_bExcludeSubD/m_bExcludeVertices/m_bExcludeEdges/m_bExcludeFaces control what parts of an ON_SubD are eligible to be selected. The m_bExcludeSubD/m_bExcludeVertices/m_bExcludeEdges/m_bExcludeFaces values are not used to determine what display information is inspected during mouse point/window/crossing selection.

If all four of the m_bExclude* values are true, every possibility is excluded and nothing can be selected. Identifies the Rhino document being queried. Use CRhinoDoc::FromRuntimeSerialNumber(m_rhino_doc_sn) to get a pointer if one is needed.

◆ m_rhino_object_sn

unsigned int CRhinoSubDPickSettings::m_rhino_object_sn = 0

If not zero, the top level Rhino object that is being queried. Note that this may be a CRhinoSubDObject, an CRhinoInstanceObject, or something else in complex situations. Use CRhinoObject::FromRuntimeSerialNumber(m_rhino_doc_sn,m_rhino_object_sn) to get a pointer if one is needed.