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

#include <opennurbs_subd.h>

Public Member Functions

 ON_SubDComponentParameter ()=default
 
 ON_SubDComponentParameter (const class ON_SubDEdge *e, double p, const class ON_SubDFace *active_face)
 
 ON_SubDComponentParameter (const class ON_SubDFace *quad_face, double quad_s, double quad_t)
 
 ON_SubDComponentParameter (const class ON_SubDFacePtr quad_fptr, double quad_s, double quad_t)
 
 ON_SubDComponentParameter (const class ON_SubDVertex *v, const class ON_SubDEdge *active_edge, const class ON_SubDFace *active_face)
 
 ON_SubDComponentParameter (const ON_SubDComponentParameter &)=default
 
 ON_SubDComponentParameter (const ON_SubDEdgePtr eptr, double p, const class ON_SubDFace *active_face)
 
 ON_SubDComponentParameter (const ON_SubDFace *face, ON_SubDFaceParameter fp)
 
 ON_SubDComponentParameter (const ON_SubDFacePtr fptr, ON_SubDFaceParameter fp)
 
 ON_SubDComponentParameter (const ON_SubDVertexPtr vptr, const class ON_SubDEdge *active_edge, const class ON_SubDFace *active_face)
 
 ON_SubDComponentParameter (ON_SubDComponentId cid)
 
 ON_SubDComponentParameter (ON_SubDComponentId edge_id, double p, ON_SubDComponentId active_face_id)
 
 ON_SubDComponentParameter (ON_SubDComponentId face_id, ON_SubDFaceParameter fp)
 
 ON_SubDComponentParameter (ON_SubDComponentId vertex_id, ON_SubDComponentId active_edge_id, ON_SubDComponentId active_face_id)
 
 ON_SubDComponentParameter (ON_SubDComponentPtr cptr)
 
 ~ON_SubDComponentParameter ()=default
 
unsigned ComponentDirection () const
 
unsigned ComponentId () const
 
const ON_SubDComponentId ComponentIdAndType () const
 
const ON_SubDComponentPtr ComponentPtr (const class ON_SubD &subd) const
 If the subd has a component with the same type and id, then that component is returned. More...
 
const ON_SubDComponentPtr ComponentPtr (const class ON_SubD *subd) const
 If the subd has a component with the same type and id, then that component is returned. More...
 
ON_SubDComponentPtr::Type ComponentType () const
 
const ON_SubDEdgeEdge (const ON_SubD *subd) const
 If this parameter references an edge and the subd has an edge with this->ComponentId(), then that edge is returned. More...
 
const ON_SubDComponentId EdgeFace () const
 In some cases, a face attached to this parameter's edge is required. In that case, this face is used. More...
 
unsigned EdgeId () const
 
double EdgeParameter () const
 Returns a parameter between 0 and 1 that identifies a point on the edge. This is always an intrisic parameter; ComponentDirection() is not taken into account. If the reference component is not an edge, then ON_DBL_QNAN is returned. More...
 
const ON_SubDEdgePtr EdgePtr (const ON_SubD *subd) const
 If this parameter references an edge and the subd has an edge with this->ComponentId(), then that edge is returned. More...
 
const ON_SubDFaceFace (const ON_SubD *subd) const
 If this parameter references a face and the subd has a face with this->ComponentId(), then that face is returned. More...
 
unsigned FaceId () const
 
const ON_SubDFaceParameter FaceParameter () const
 
const ON_SubDFacePtr FacePtr (const ON_SubD *subd) const
 If this parameter references a face and the subd has a face with this->ComponentId(), then that face is returned. More...
 
bool IsEdgeParameter () const
 
bool IsFaceParameter () const
 
bool IsSet () const
 
bool IsVertexParameter () const
 
ON_SubDComponentParameteroperator= (const ON_SubDComponentParameter &)=default
 
const ON_wString ToString (bool bUnsetIsEmptyString) const
 
const ON_SubDVertexVertex (const ON_SubD *subd) const
 If this parameter references a vertex and the subd has a vertex with this->ComponentId(), then that vertex is returned. More...
 
const ON_SubDComponentId VertexEdge () const
 In some cases, an edge attached to this parameter's vertex is required. In that case, this edge is used. More...
 
const ON_SubDComponentId VertexFace () const
 In some cases, a face attached to this parameter's vertex is required. In these cases this face is used. More...
 
unsigned VertexId () const
 
const ON_SubDVertexPtr VertexPtr (const ON_SubD *subd) const
 If this parameter references a vertex and the subd has a vertex with this->ComponentId(), then that vertex is returned. More...
 

Static Public Member Functions

static int Compare (const ON_SubDComponentParameter *lhs, const ON_SubDComponentParameter *rhs)
 Dictionary compares component type, component id, component direction, first parameter, second parameter and safely sorts nullptr to end. More...
 
static int CompareAll (const ON_SubDComponentParameter &lhs, const ON_SubDComponentParameter &rhs)
 Dictionary compares component type, component id, component direction, first parameter, second parameter. More...
 
static int CompareComponentTypeAndId (const ON_SubDComponentParameter &lhs, const ON_SubDComponentParameter &rhs)
 Dictionary compares component type and component id. More...
 
static int CompareComponentTypeAndIdAndDirection (const ON_SubDComponentParameter &lhs, const ON_SubDComponentParameter &rhs)
 Dictionary compares component type, component id, and component dir. More...
 

Static Public Attributes

static const ON_SubDComponentParameter Unset
 

Constructor & Destructor Documentation

◆ ON_SubDComponentParameter() [1/15]

ON_SubDComponentParameter::ON_SubDComponentParameter ( )
default

◆ ~ON_SubDComponentParameter()

ON_SubDComponentParameter::~ON_SubDComponentParameter ( )
default

◆ ON_SubDComponentParameter() [2/15]

ON_SubDComponentParameter::ON_SubDComponentParameter ( const ON_SubDComponentParameter )
default

◆ ON_SubDComponentParameter() [3/15]

ON_SubDComponentParameter::ON_SubDComponentParameter ( ON_SubDComponentId  cid)

◆ ON_SubDComponentParameter() [4/15]

ON_SubDComponentParameter::ON_SubDComponentParameter ( ON_SubDComponentPtr  cptr)

◆ ON_SubDComponentParameter() [5/15]

ON_SubDComponentParameter::ON_SubDComponentParameter ( ON_SubDComponentId  vertex_id,
ON_SubDComponentId  active_edge_id,
ON_SubDComponentId  active_face_id 
)

◆ ON_SubDComponentParameter() [6/15]

ON_SubDComponentParameter::ON_SubDComponentParameter ( const class ON_SubDVertex v,
const class ON_SubDEdge active_edge,
const class ON_SubDFace active_face 
)

◆ ON_SubDComponentParameter() [7/15]

ON_SubDComponentParameter::ON_SubDComponentParameter ( const ON_SubDVertexPtr  vptr,
const class ON_SubDEdge active_edge,
const class ON_SubDFace active_face 
)

◆ ON_SubDComponentParameter() [8/15]

ON_SubDComponentParameter::ON_SubDComponentParameter ( ON_SubDComponentId  edge_id,
double  p,
ON_SubDComponentId  active_face_id 
)

◆ ON_SubDComponentParameter() [9/15]

ON_SubDComponentParameter::ON_SubDComponentParameter ( const class ON_SubDEdge e,
double  p,
const class ON_SubDFace active_face 
)

Parameters
e
p0 <= p <= 1.
active_facenullptr or a face attached to the edge.

◆ ON_SubDComponentParameter() [10/15]

ON_SubDComponentParameter::ON_SubDComponentParameter ( const ON_SubDEdgePtr  eptr,
double  p,
const class ON_SubDFace active_face 
)

Parameters
eptr
p0 <= p <= 1. NOTE WELL: p is relative to the direction of eptr.


Parameters
active_facenullptr or a face attached to the edge.

◆ ON_SubDComponentParameter() [11/15]

ON_SubDComponentParameter::ON_SubDComponentParameter ( ON_SubDComponentId  face_id,
ON_SubDFaceParameter  fp 
)

◆ ON_SubDComponentParameter() [12/15]

ON_SubDComponentParameter::ON_SubDComponentParameter ( const ON_SubDFace face,
ON_SubDFaceParameter  fp 
)

◆ ON_SubDComponentParameter() [13/15]

ON_SubDComponentParameter::ON_SubDComponentParameter ( const ON_SubDFacePtr  fptr,
ON_SubDFaceParameter  fp 
)

◆ ON_SubDComponentParameter() [14/15]

ON_SubDComponentParameter::ON_SubDComponentParameter ( const class ON_SubDFace quad_face,
double  quad_s,
double  quad_t 
)

◆ ON_SubDComponentParameter() [15/15]

ON_SubDComponentParameter::ON_SubDComponentParameter ( const class ON_SubDFacePtr  quad_fptr,
double  quad_s,
double  quad_t 
)

Member Function Documentation

◆ Compare()

static int ON_SubDComponentParameter::Compare ( const ON_SubDComponentParameter lhs,
const ON_SubDComponentParameter rhs 
)
static

Dictionary compares component type, component id, component direction, first parameter, second parameter and safely sorts nullptr to end.

Parameters
lhs
rhs
Returns

◆ CompareAll()

static int ON_SubDComponentParameter::CompareAll ( const ON_SubDComponentParameter lhs,
const ON_SubDComponentParameter rhs 
)
static

Dictionary compares component type, component id, component direction, first parameter, second parameter.

Parameters
lhs
rhs
Returns
-1: lhs < rhs 0: lhs = rhs +1: lhs > rhs

◆ CompareComponentTypeAndId()

static int ON_SubDComponentParameter::CompareComponentTypeAndId ( const ON_SubDComponentParameter lhs,
const ON_SubDComponentParameter rhs 
)
static

Dictionary compares component type and component id.

Parameters
lhs
rhs
Returns

◆ CompareComponentTypeAndIdAndDirection()

static int ON_SubDComponentParameter::CompareComponentTypeAndIdAndDirection ( const ON_SubDComponentParameter lhs,
const ON_SubDComponentParameter rhs 
)
static

Dictionary compares component type, component id, and component dir.

Parameters
lhs
rhs
Returns

◆ ComponentDirection()

unsigned ON_SubDComponentParameter::ComponentDirection ( ) const

◆ ComponentId()

unsigned ON_SubDComponentParameter::ComponentId ( ) const

◆ ComponentIdAndType()

const ON_SubDComponentId ON_SubDComponentParameter::ComponentIdAndType ( ) const

◆ ComponentPtr() [1/2]

const ON_SubDComponentPtr ON_SubDComponentParameter::ComponentPtr ( const class ON_SubD subd) const

If the subd has a component with the same type and id, then that component is returned.

Parameters
subd
Returns
The referenced component in subd along with the direction value.

◆ ComponentPtr() [2/2]

const ON_SubDComponentPtr ON_SubDComponentParameter::ComponentPtr ( const class ON_SubD subd) const

If the subd has a component with the same type and id, then that component is returned.

Parameters
subd
Returns
The referenced component in subd along with the direction value.

◆ ComponentType()

ON_SubDComponentPtr::Type ON_SubDComponentParameter::ComponentType ( ) const

◆ Edge()

const ON_SubDEdge* ON_SubDComponentParameter::Edge ( const ON_SubD subd) const

If this parameter references an edge and the subd has an edge with this->ComponentId(), then that edge is returned.

Parameters
subd
Returns
The referenced edge in subd.

◆ EdgeFace()

const ON_SubDComponentId ON_SubDComponentParameter::EdgeFace ( ) const

In some cases, a face attached to this parameter's edge is required. In that case, this face is used.

Returns
The prefered edge attached to this vertex.

◆ EdgeId()

unsigned ON_SubDComponentParameter::EdgeId ( ) const
Returns
If IsEdgeParameter() is true, then the edge's id is returned. Otherwise 0 is returned.

◆ EdgeParameter()

double ON_SubDComponentParameter::EdgeParameter ( ) const

Returns a parameter between 0 and 1 that identifies a point on the edge. This is always an intrisic parameter; ComponentDirection() is not taken into account. If the reference component is not an edge, then ON_DBL_QNAN is returned.

Returns
Returns a parameter between 0 and 1 identifying the point on the edge. Note that ComponentDirection() is not taken into account. If this does not reference an edge or the parameter is not set, then ON_DBL_QNAN is returned.

◆ EdgePtr()

const ON_SubDEdgePtr ON_SubDComponentParameter::EdgePtr ( const ON_SubD subd) const

If this parameter references an edge and the subd has an edge with this->ComponentId(), then that edge is returned.

Parameters
subd
Returns
The referenced edge in subd along with the direction value.

◆ Face()

const ON_SubDFace* ON_SubDComponentParameter::Face ( const ON_SubD subd) const

If this parameter references a face and the subd has a face with this->ComponentId(), then that face is returned.

Parameters
subd
Returns
The referenced face in subd.


◆ FaceId()

unsigned ON_SubDComponentParameter::FaceId ( ) const
Returns
If IsFaceParameter() is true, then the face's id is returned. Otherwise 0 is returned.

◆ FaceParameter()

const ON_SubDFaceParameter ON_SubDComponentParameter::FaceParameter ( ) const
Returns
If a valid face and face parameter were passed to the constructor, then that face parameter is returned. Otherwise ON_SubDFaceParameter::Nan is returned.

◆ FacePtr()

const ON_SubDFacePtr ON_SubDComponentParameter::FacePtr ( const ON_SubD subd) const

If this parameter references a face and the subd has a face with this->ComponentId(), then that face is returned.

Parameters
subd
Returns
The referenced face in subd along with the direction value.

◆ IsEdgeParameter()

bool ON_SubDComponentParameter::IsEdgeParameter ( ) const
Returns
True if the referenced component is an edge.

◆ IsFaceParameter()

bool ON_SubDComponentParameter::IsFaceParameter ( ) const
Returns
True if the referenced component is a face.

◆ IsSet()

bool ON_SubDComponentParameter::IsSet ( ) const

◆ IsVertexParameter()

bool ON_SubDComponentParameter::IsVertexParameter ( ) const
Returns
True if the referenced component is a vertex.

◆ operator=()

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

◆ ToString()

const ON_wString ON_SubDComponentParameter::ToString ( bool  bUnsetIsEmptyString) const

◆ Vertex()

const ON_SubDVertex* ON_SubDComponentParameter::Vertex ( const ON_SubD subd) const

If this parameter references a vertex and the subd has a vertex with this->ComponentId(), then that vertex is returned.

Parameters
subd
Returns
The referenced vertex in subd.

◆ VertexEdge()

const ON_SubDComponentId ON_SubDComponentParameter::VertexEdge ( ) const

In some cases, an edge attached to this parameter's vertex is required. In that case, this edge is used.

Returns
The prefered edge attached to this vertex.

◆ VertexFace()

const ON_SubDComponentId ON_SubDComponentParameter::VertexFace ( ) const

In some cases, a face attached to this parameter's vertex is required. In these cases this face is used.

Returns
The prefered face attached to this vertex.

◆ VertexId()

unsigned ON_SubDComponentParameter::VertexId ( ) const
Returns
If IsVertexParameter() is true, then the vertex's id is returned. Otherwise 0 is returned.

◆ VertexPtr()

const ON_SubDVertexPtr ON_SubDComponentParameter::VertexPtr ( const ON_SubD subd) const

If this parameter references a vertex and the subd has a vertex with this->ComponentId(), then that vertex is returned.

Parameters
subd
Returns
The referenced vertex in subd along with the direction value.

Member Data Documentation

◆ e_active_f

ON_SubDComponentId ON_SubDComponentParameter::e_active_f

edge's active face

◆ eptr_s

double ON_SubDComponentParameter::eptr_s

Relative with respect to m_cid.Direction().

◆ f_corner_s

double ON_SubDComponentParameter::f_corner_s

0 <= f_corner_s <= 1/2

◆ f_corner_t

double ON_SubDComponentParameter::f_corner_t

0 <= f_corner_t <= 1/2

◆ Unset

const ON_SubDComponentParameter ON_SubDComponentParameter::Unset
static

◆ v_active_e

ON_SubDComponentId ON_SubDComponentParameter::v_active_e

vertex's active edge

◆ v_active_f

ON_SubDComponentId ON_SubDComponentParameter::v_active_f

vertex's active face