Rhino C++ API  8.13
Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
ON_SubDComponentTest Class Reference

#include <opennurbs_subd.h>

Inheritance diagram for ON_SubDComponentTest:
ON_SubDComponentIdList

Public Member Functions

 ON_SubDComponentTest ()=default
 
 ON_SubDComponentTest (const ON_SubDComponentTest &)=default
 
 ON_SubDComponentTest (ON__UINT_PTR ptr)
 
virtual ~ON_SubDComponentTest ()
 
ON_SubDComponentTestoperator= (const ON_SubDComponentTest &)=default
 
bool Passes (const class ON_SubDEdge *e) const
 
bool Passes (const class ON_SubDFace *f) const
 
bool Passes (const class ON_SubDVertex *v) const
 
virtual bool Passes (const ON_SubDComponentPtr cptr) const
 

Static Public Attributes

static const ON_SubDComponentTest AllFail
 Passes() returns false for every component. More...
 
static const ON_SubDComponentTest AllPass
 Passes() returns true for every non nullptr component. More...
 

Protected Attributes

ON__UINT_PTR m_ptr = 0
 classes derived from ON_SubDVertexFilter may use m_ptr as they see fit including to completely ignore it. More...
 

Detailed Description

ON_SubDComponentTest Description: ON_SubDComponentTest is used in contexts where custom testing or filtering of SubD components is required.

Constructor & Destructor Documentation

◆ ON_SubDComponentTest() [1/3]

ON_SubDComponentTest::ON_SubDComponentTest ( )
default

◆ ~ON_SubDComponentTest()

virtual ON_SubDComponentTest::~ON_SubDComponentTest ( )
virtual

◆ ON_SubDComponentTest() [2/3]

ON_SubDComponentTest::ON_SubDComponentTest ( const ON_SubDComponentTest )
default

◆ ON_SubDComponentTest() [3/3]

ON_SubDComponentTest::ON_SubDComponentTest ( ON__UINT_PTR  ptr)

Sets m_ptr=ptr

Member Function Documentation

◆ operator=()

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

◆ Passes() [1/4]

bool ON_SubDComponentTest::Passes ( const class ON_SubDEdge e) const

Returns: this->Passes(nullptr != e ? e->ComponentPtr() : ON_SubDComponentPtr::Null);

◆ Passes() [2/4]

bool ON_SubDComponentTest::Passes ( const class ON_SubDFace f) const

Returns: this->Passes(nullptr != f ? f->ComponentPtr() : ON_SubDComponentPtr::Null);

◆ Passes() [3/4]

bool ON_SubDComponentTest::Passes ( const class ON_SubDVertex v) const

Returns: this->Passes(nullptr != v ? v->ComponentPtr() : ON_SubDComponentPtr::Null);

◆ Passes() [4/4]

virtual bool ON_SubDComponentTest::Passes ( const ON_SubDComponentPtr  cptr) const
virtual

Description: Typically, a derived class overrides this function, uses it to inspect vertex properties, and returns true or false. Parameters: v - [in] vertex being tested. Returns: true if the vertex "passes" the test. false if the vertex "fails" the text. Remarks: The default implementation returns (cptr.IsNotNull() && 0 != m_ptr);

Reimplemented in ON_SubDComponentIdList.

Member Data Documentation

◆ AllFail

const ON_SubDComponentTest ON_SubDComponentTest::AllFail
static

Passes() returns false for every component.

◆ AllPass

const ON_SubDComponentTest ON_SubDComponentTest::AllPass
static

Passes() returns true for every non nullptr component.

◆ m_ptr

ON__UINT_PTR ON_SubDComponentTest::m_ptr = 0
protected

classes derived from ON_SubDVertexFilter may use m_ptr as they see fit including to completely ignore it.