Rhino C++ API  7.22
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
ON_SubDSectorType Class Reference

#include <opennurbs_subd.h>

Public Types

enum  : unsigned int { MaximumCornerAngleIndex = 72 }
 

Public Member Functions

 ON_SubDSectorType ()=default
 
 ON_SubDSectorType (const ON_SubDSectorType &)=default
 
unsigned int ComponentRingCount () const
 
unsigned int CornerSectorAngleIndex () const
 
double CornerSectorAngleRadians () const
 
unsigned int EdgeCount () const
 
unsigned int FaceCount () const
 
unsigned int FacetEdgeCount () const
 
unsigned int GetAllEigenvalues (double *eigenvalues, size_t eigenvalues_capacity)
 
unsigned int GetSubdivisionMatrix (double **S, size_t matrix_capacity) const
 
unsigned int GetSubdivisionMatrix (double *S, size_t S_capacity) const
 
double GetSubdominantEigenvectors (double *E1, size_t E1_capacity, double *E2, size_t E2_capacity) const
 
unsigned int GetSurfaceEvaluationCoefficients (double *LPev, size_t LPev_capacity, double *LT0ev, size_t LT0ev_capacity, double *LT1ev, size_t LT1ev_capacity) const
 
bool IsConcaveCornerSector () const
 
bool IsConvexCornerSector () const
 
bool IsCornerSector () const
 
bool IsCreaseSector () const
 
bool IsDartSector () const
 
bool IsSmoothSector () const
 
bool IsValid () const
 
ON_SubDSectorTypeoperator= (const ON_SubDSectorType &)=default
 
unsigned int PointRingCount () const
 
double SectorCoefficient () const
 
ON_SubDSectorRingSubD (double radius, double sector_angle_radians, ON_SubD *subd) const
 
unsigned int SectorTypeHash () const
 
double SubdominantEigenvalue () const
 
unsigned int SubdominantEigenvalueMulitiplicity () const
 
bool SurfaceEvaluationCoefficientsAvailable () const
 
double SurfaceNormalSign () const
 SurfaceNormalSign() is a debugging tool - slow and not useful in general. More...
 
ON_SubDVertexTag VertexTag () const
 

Static Public Member Functions

static double AngleRadiansFromCornerAngleIndex (unsigned int corner_angle_index)
 
static double ClampCornerSectorAngleRadians (double corner_sector_angle_radians)
 
static int Compare (const ON_SubDSectorType &a, const ON_SubDSectorType &b)
 
static int Compare (const ON_SubDSectorType *, const ON_SubDSectorType *)
 
static unsigned int CornerAngleIndexFromCornerAngleRadians (double angle_radians)
 
static double CornerSectorAngleRadiansFromEdges (ON_SubDEdgePtr sector_boundary_edge0_ptr, ON_SubDEdgePtr sector_boundary_edge1_ptr)
 
static double CornerSectorCoefficient (unsigned int sector_face_count, double corner_sector_angle_radians)
 
static double CreaseSectorCoefficient (unsigned int sector_face_count)
 
static ON_SubDSectorType Create (const class ON_SubDEdge *edge, unsigned int edge_vertex_index)
 
static ON_SubDSectorType Create (const class ON_SubDFace *face, const class ON_SubDVertex *vertex)
 
static ON_SubDSectorType Create (const class ON_SubDFace *face, unsigned int face_vertex_index)
 
static ON_SubDSectorType Create (const ON_SubDSectorIterator &sit)
 
static ON_SubDSectorType Create (ON_SubDVertexTag vertex_tag, unsigned int sector_face_count, double corner_sector_angle_radians)
 
static ON_SubDSectorType CreateCornerSectorType (unsigned int sector_face_count, double sector_corner_angle_radians)
 
static ON_SubDSectorType CreateCreaseSectorType (unsigned int sector_face_count)
 
static ON_SubDSectorType CreateDartSectorType (unsigned int sector_face_count)
 
static ON_SubDSectorType CreateSmoothSectorType (unsigned int sector_face_count)
 
static double DartSectorCoefficient (unsigned int sector_face_count)
 
static bool IsValidCornerSectorAngleRadians (double corner_sector_angle_radians)
 
static bool IsValidSectorCoefficientValue (double coefficient_value, bool bAllowUnsetTaggedEndCoefficient)
 
static unsigned int MinimumSectorEdgeCount (ON_SubDVertexTag vertex_tag)
 
static unsigned int MinimumSectorFaceCount (ON_SubDVertexTag vertex_tag)
 
static double SectorCoefficientCalculationError ()
 
static unsigned int SectorEdgeCountFromFaceCount (ON_SubDVertexTag vertex_tag, unsigned int sector_face_count)
 
static unsigned int SectorFaceCountFromEdgeCount (ON_SubDVertexTag vertex_tag, unsigned int sector_edge_count)
 
static unsigned int SectorPointRingCountFromEdgeCount (ON_SubDVertexTag vertex_tag, unsigned int sector_edge_count)
 
static unsigned int SectorPointRingCountFromFaceCount (ON_SubDVertexTag vertex_tag, unsigned int sector_face_count)
 
static double SmoothSectorCoefficient ()
 

Static Public Attributes

static const ON_SubDSectorType Empty
 
static const double ErrorCornerSectorAngle
 This value is indicate a corner sector angle calculation failed. More...
 
static const double ErrorSectorCoefficient
 This value indicates an edge sector coefficient calculation failed. More...
 
static const double ErrorSectorTheta
 This value is used to indicate a sector theta calculation failed. More...
 
static const double IgnoredCornerSectorAngle
 = 0.0; More...
 
static const double IgnoredSectorCoefficient
 = 0.0; More...
 
static const double MaximumCornerAngleRadians
 ON_SubDSectorType::MaximumCornerAngleRadians = 2.0*ON_PI - ON_SubDSectorType::MinimumCornerAngleRadians;. More...
 
static const double MinimumCornerAngleRadians
 ON_SubDSectorType::MinimumCornerAngleRadians = (2.0*ON_PI)/((double)(ON_SubDSectorType::MaximumCornerAngleIndex));. More...
 
static const double SmoothSectorTheta
 This value is used for smooth sector thetas. More...
 
static const double UnsetCornerSectorAngle
 = -8881.0; More...
 
static const double UnsetSectorCoefficient
 = -8883.0; More...
 
static const double UnsetSectorTheta
 This value is used to indicate a sector theta needs to be set. More...
 

Detailed Description

ON_SubDSectorType

Member Enumeration Documentation

◆ anonymous enum

anonymous enum : unsigned int

Description: An angle index value of ON_SubDSectorType::MaximumCornerAngleIndex indicates the angle is 2pi radians.

Enumerator
MaximumCornerAngleIndex 

Constructor & Destructor Documentation

◆ ON_SubDSectorType() [1/2]

ON_SubDSectorType::ON_SubDSectorType ( )
default

◆ ON_SubDSectorType() [2/2]

ON_SubDSectorType::ON_SubDSectorType ( const ON_SubDSectorType )
default

Member Function Documentation

◆ AngleRadiansFromCornerAngleIndex()

static double ON_SubDSectorType::AngleRadiansFromCornerAngleIndex ( unsigned int  corner_angle_index)
static

Convert and angle index into radians Parameters: corner_angle_index - [in] 0 to ON_SubDSectorType::MaximumCornerAngleIndex. Returns: If angle_index is valid, the corresponding angle in radians is returned. = (angle_index / ((double)ON_SubDSectorType::MaximumCornerAngleIndex)) * ON_2PI Otherwise ON_UNSET_VALUE is returned.

◆ ClampCornerSectorAngleRadians()

static double ON_SubDSectorType::ClampCornerSectorAngleRadians ( double  corner_sector_angle_radians)
static

◆ Compare() [1/2]

static int ON_SubDSectorType::Compare ( const ON_SubDSectorType a,
const ON_SubDSectorType b 
)
static

◆ Compare() [2/2]

static int ON_SubDSectorType::Compare ( const ON_SubDSectorType ,
const ON_SubDSectorType  
)
static

◆ ComponentRingCount()

unsigned int ON_SubDSectorType::ComponentRingCount ( ) const

Returns: 1 + FaceCount() + EdgeCount()

◆ CornerAngleIndexFromCornerAngleRadians()

static unsigned int ON_SubDSectorType::CornerAngleIndexFromCornerAngleRadians ( double  angle_radians)
static

Parameters: angle_radians - in The angle between the bounding crease edges Returns: If angle_radians is valid input, then the value angle_index is returned. The value angle_index is selected so that (0 < angle_index < ON_SubDSectorType::MaximumCornerSectorIndex) and fabs(angle_index*angle_quantum - angle_radians) is as small as possible, where angle_quantum = (2.0*ON_PI)/ON_SubDSectorType::MaximumCornerSectorIndex. Otherwise ON_UNSET_UINT_INDEX is returned.

◆ CornerSectorAngleIndex()

unsigned int ON_SubDSectorType::CornerSectorAngleIndex ( ) const

Returns: a value >= 0 and <= ON_SubDSectorType::MaximumCornerAngleIndex

◆ CornerSectorAngleRadians()

double ON_SubDSectorType::CornerSectorAngleRadians ( ) const

Returns: If the sector vertex tag is ON_SubDVertexTag::Corner, the angle between the corner crease boundary edges is returned.
Otherwise, ON_SubDSectorType::ErrorCornerSectorAngle is returned.

◆ CornerSectorAngleRadiansFromEdges()

static double ON_SubDSectorType::CornerSectorAngleRadiansFromEdges ( ON_SubDEdgePtr  sector_boundary_edge0_ptr,
ON_SubDEdgePtr  sector_boundary_edge1_ptr 
)
static

Parameters: sector_boundary_edge0_ptr - [in] sector_boundary_edge1_ptr - [in] Crease edges that bound the sector containing the smooth edge. The edge direction must identify the corner vertex. corner vertex = sector_boundary_edge0_ptr.RelativeVertex(0) = sector_boundary_edge1_ptr.RelativeVertex(0) Returns: tagged end angle for a smooth edge that 1) ends at a vertex tagged on ON_SubDVertexTag::Corner 2) has two adjacent faces. 3) lies in a sector bounded by 2 distinct crease edges. The angle is convex and positive: 0 < angle <= Pi

◆ CornerSectorCoefficient()

static double ON_SubDSectorType::CornerSectorCoefficient ( unsigned int  sector_face_count,
double  corner_sector_angle_radians 
)
static

◆ CreaseSectorCoefficient()

static double ON_SubDSectorType::CreaseSectorCoefficient ( unsigned int  sector_face_count)
static

Parameters: face_type - [in] sector_face_count - [in] number of faces in the smooth sector. Returns: 0: failed to caclulate coefficient ON_SubDSectorType::UnsetSectorCoefficient: This typically happens when a SubD control net is being created and a facet type is not specified.
The coefficients will be calculated at the first subdivision. 0 < w < 1: 1/2 + 1/3*cos(tagged end sector angle / number of faces) for quadrangle facets Remarks: This is a useful tool when calling AddEdge while a subdivision level is being constructed.

◆ Create() [1/5]

static ON_SubDSectorType ON_SubDSectorType::Create ( const class ON_SubDEdge edge,
unsigned int  edge_vertex_index 
)
static

Description: Create a ON_SubDSectorType for the sector containing the edge. Parameters: subd_type - [in] edge - [in] edge_vertex_index - [in] edge->Vertex(edge_vertex_index) will be the sector's center vertex. Returns: An ON_SubDSectorType for the sector containing the edge.

◆ Create() [2/5]

static ON_SubDSectorType ON_SubDSectorType::Create ( const class ON_SubDFace face,
const class ON_SubDVertex vertex 
)
static

◆ Create() [3/5]

static ON_SubDSectorType ON_SubDSectorType::Create ( const class ON_SubDFace face,
unsigned int  face_vertex_index 
)
static

Description: Create a ON_SubDSectorType for the sector containing the face. Parameters: subd_type - [in] face - [in] face_vertex_index - [in] face->Vertex(face_vertex_index) will be the sector's center vertex. Returns: An ON_SubDSectorType for the sector containing the face.

◆ Create() [4/5]

static ON_SubDSectorType ON_SubDSectorType::Create ( const ON_SubDSectorIterator sit)
static

Description: Create a ON_SubDSectorType from a ON_SubDSectorIterator. Parameters: subd_type - [in] sit - [in] Returns: An ON_SubDSectorType for the sector identified by sit.

◆ Create() [5/5]

static ON_SubDSectorType ON_SubDSectorType::Create ( ON_SubDVertexTag  vertex_tag,
unsigned int  sector_face_count,
double  corner_sector_angle_radians 
)
static

Description: Create a ON_SubDSectorType from a ON_SubDSectorIterator. Parameters: subd_type - [in] vertex_tag - [in] sector_face_count - [in] Number of faces in the sector. corner_sector_angle_radians - [in] If vertex_tag is ON_SubDVertexTag::Corner, this parameter is the angle between the crease edges that bound the corner.
If vertex_tag is not ON_SubDVertexTag::Corner, this parameter is ignored. Returns: An ON_SubDSectorType for the case the input parameters identify.

◆ CreateCornerSectorType()

static ON_SubDSectorType ON_SubDSectorType::CreateCornerSectorType ( unsigned int  sector_face_count,
double  sector_corner_angle_radians 
)
static

Description: Create a corner ON_SubDSectorType. Parameters: subd_type - [in] sector_face_count - [in] Number of faces in the sector. corner_sector_angle_radians - [in] The angle between the crease edges that bound the corner.
Returns: An ON_SubDSectorType for the corner sector case specified by the input parameters.

◆ CreateCreaseSectorType()

static ON_SubDSectorType ON_SubDSectorType::CreateCreaseSectorType ( unsigned int  sector_face_count)
static

Description: Create a crease ON_SubDSectorType. Parameters: subd_type - [in] sector_face_count - [in] Number of faces in the sector. Returns: An ON_SubDSectorType for the crease sector case specified by the input parameters.

◆ CreateDartSectorType()

static ON_SubDSectorType ON_SubDSectorType::CreateDartSectorType ( unsigned int  sector_face_count)
static

Description: Create a dart ON_SubDSectorType. Parameters: subd_type - [in] sector_face_count - [in] Number of faces in the sector. Returns: An ON_SubDSectorType for the dart sector case specified by the input parameters.

◆ CreateSmoothSectorType()

static ON_SubDSectorType ON_SubDSectorType::CreateSmoothSectorType ( unsigned int  sector_face_count)
static

Description: Create a smooth ON_SubDSectorType. Parameters: subd_type - [in] sector_face_count - [in] Number of faces in the sector. Returns: An ON_SubDSectorType for the smooth sector case specified by the input parameters.

◆ DartSectorCoefficient()

static double ON_SubDSectorType::DartSectorCoefficient ( unsigned int  sector_face_count)
static

◆ EdgeCount()

unsigned int ON_SubDSectorType::EdgeCount ( ) const

◆ FaceCount()

unsigned int ON_SubDSectorType::FaceCount ( ) const

◆ FacetEdgeCount()

unsigned int ON_SubDSectorType::FacetEdgeCount ( ) const

◆ GetAllEigenvalues()

unsigned int ON_SubDSectorType::GetAllEigenvalues ( double *  eigenvalues,
size_t  eigenvalues_capacity 
)

Parameters: eigenvalues_capacity - [in] Capacity of the eigenvalues[] array. Must be 0 or >= PointRingCount() eigenvalues - [out] If 0 = eigenvalues_capacity, eigenvalues must be nullptr. If eigenvalues_capacity > 0, is specifies the capactiy of the eigenvalues[] array. Returns: R > 0: A complete set of eigenvalues is available for this sector type. The eigenvalues are (1, lambda, lambda, e3, ..., eR), where 1 > lambda > e3 >= ... >= eR > 0. 0: Invalid input or the eigenvalues for this sector typoe are not available.

◆ GetSubdivisionMatrix() [1/2]

unsigned int ON_SubDSectorType::GetSubdivisionMatrix ( double **  S,
size_t  matrix_capacity 
) const

Description: Get the subdivision matrix for the default subdivison algorithms used by ON_SubD.

The matrix coefficents are ordered so that the matrix acts on the left of the points returned by ON_SubDSectorIterator::GetVertexRing().

For an interior vertex (smooth or dart), the coefficents are ordered so that one iteration of subdivision is given by: S*Transpose(V, E[0], F[0], E[1], F[1], ..., E[N-1], F[N-1]). For a dart vertex, E[0] is the point at the end of the creased edge.

For a boundary vertex (crease or corner), the coefficents are ordered so that one iteration of subdivision is given by: S*Transpose(V, E[0], F[0], E[1], F[1], ..., F[N-2], E[N-1]).

N = edge valence = number of edges in the sector. E[i] = end of i-th edge radiating from V. F[i] = point on the quad that is opposite V. The edges and faces are ordered radially so that the face for F[i] lies between the edges for E[i] and E[(i+1)N].

Parameters: S - [out] subdivision matrix Matrix coefficent (i,j) = S[i][j] 0 <= i < R, 0 <= j < R, R = ON_SubDSectorType.PointRingCount() matrix_capacity - [in] S[] can store any RxR matrix with R <= matrix_capacity.

Returns: R > 0: R = PointRingCount() and S is the RxR subdivision matrix for the sector type. 0: Invalid input

◆ GetSubdivisionMatrix() [2/2]

unsigned int ON_SubDSectorType::GetSubdivisionMatrix ( double *  S,
size_t  S_capacity 
) const

Parameters: S - [out] subdivision matrix. Matrix coefficent (i,j) = S[i*R + j], 0 <= i < R, 0 <= j < R, R = ON_SubDSectorType.PointRingCount() S_capacity - [in] Number of elements in S[] array Returns: 0: Invalid input. >0: Number of rows and columns in S. This number is always ON_SubDSectorType.PointRingCount().

◆ GetSubdominantEigenvectors()

double ON_SubDSectorType::GetSubdominantEigenvectors ( double *  E1,
size_t  E1_capacity,
double *  E2,
size_t  E2_capacity 
) const

Description: With one exception, which is described below, all the subdivision matrices for the ON_SubD built-in subdivision algorithms have eigenvalues (1, lambda, lambda, e4, ..., eR), where lambda is real, 1 > lambda > |e4| >= ... >= |eR| > 0, and the geometric dimension of the lambda eigenspace is 2 (there are two linearly independent lambda eigenvectors).

The subdominant eigenvalue is lamda. This function returns an orthogonal basis, (E1, E2), for the subdominant eigenspace.

An eigenvector for the dominant eigen value 1 has is (1,1,...,1). The domainant eignevector is orthogonal to the subdominant eigenspace.

Put another way, 0 = E1[0] + ... + E1[R-1] 0 = E2[0] + ... + E2[R-1] 0 = E1[0]*E2[0] + ... + E1[R-1]*E2[R-1]

Exceptional case: The Catmull-Clark subdivision matrix for a crease vertex with two crease edges and a single face is a special case.
In this exceptional, this function returns lambda = 1/2, E1 = {0,-1,0,-1} and E2 = {1, -2, -5, -2}. For more information about the exceptional case, see the description of ON_SubDSectorType::SubdominantEigenvalueMulitiplicity().

Parameters: E1_capacity - [in] Capacity of the E1[] array. E1 - [out] E2_capacity - [in] Capacity of the E2[] array. E2 - [out] When E1_capacity > 0 and E2_capacity > 0, two orthoganal eigenvectors spanning the subdivision matrix subdominant eigenspace are returned in E1[] and E2[]. If one of E1_capacity or E2_capacity is > 0, then both must be > 0.

Returns: ON_UNSET_VALUE: Invalid input. e > 0.0 and e < 1.0: subdominant eigenvalue.

◆ GetSurfaceEvaluationCoefficients()

unsigned int ON_SubDSectorType::GetSurfaceEvaluationCoefficients ( double *  LPev,
size_t  LPev_capacity,
double *  LT0ev,
size_t  LT0ev_capacity,
double *  LT1ev,
size_t  LT1ev_capacity 
) const

Parameters: LPev_capacity - [in] Capacity of the LPev[] array. LPev - [out] When LPev_capacity > 0, then the limit surface point evaluation coefficients are returned in LPev[]. Otherwise LPev is ignored. LT0ev_capacity - [in] Capacity of the LPev[] array. LT0ev - [out] LT1ev_capacity - [in] Capacity of the LPev[] array. LT1ev - [out] When LT0ev_capacity > 0 and LT1ev_capacity > 0, then the limit surface tangent coefficients are returned in LT0ev[] and LT1ev[]. Otherwise, LT0ev[] and LT1ev[] are ignored. If one of LT0ev_capacity or LT1ev_capacity is > 0, then both must be > 0. Returns: 0: Invalid input. >0: Number of evaluation coefficients in the L*ev[] arrays. This number is always ON_SubDSectorType.PointRingCount().

◆ IsConcaveCornerSector()

bool ON_SubDSectorType::IsConcaveCornerSector ( ) const

Returns: True if this is a concave corner vertex sector (sector angle > pi)

◆ IsConvexCornerSector()

bool ON_SubDSectorType::IsConvexCornerSector ( ) const

Returns: True if this is a convex corner vertex sector (sector angle <= pi)

◆ IsCornerSector()

bool ON_SubDSectorType::IsCornerSector ( ) const

Returns: True if this is a corner vertex sector

◆ IsCreaseSector()

bool ON_SubDSectorType::IsCreaseSector ( ) const

Returns: True if this is a crease vertex sector

◆ IsDartSector()

bool ON_SubDSectorType::IsDartSector ( ) const

Returns: True if this is a dart interior vertex sector

◆ IsSmoothSector()

bool ON_SubDSectorType::IsSmoothSector ( ) const

Returns: True if this is a smooth interior vertex sector

◆ IsValid()

bool ON_SubDSectorType::IsValid ( ) const

◆ IsValidCornerSectorAngleRadians()

static bool ON_SubDSectorType::IsValidCornerSectorAngleRadians ( double  corner_sector_angle_radians)
static

◆ IsValidSectorCoefficientValue()

static bool ON_SubDSectorType::IsValidSectorCoefficientValue ( double  coefficient_value,
bool  bAllowUnsetTaggedEndCoefficient 
)
static

◆ MinimumSectorEdgeCount()

static unsigned int ON_SubDSectorType::MinimumSectorEdgeCount ( ON_SubDVertexTag  vertex_tag)
static

◆ MinimumSectorFaceCount()

static unsigned int ON_SubDSectorType::MinimumSectorFaceCount ( ON_SubDVertexTag  vertex_tag)
static

◆ operator=()

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

◆ PointRingCount()

unsigned int ON_SubDSectorType::PointRingCount ( ) const

Returns: Number of points in the point ring.
For quad subds, this is 1 + FaceCount() + EdgeCount(). For tri subds, this is 1 + EdgeCount().

◆ SectorCoefficient()

double ON_SubDSectorType::SectorCoefficient ( ) const

Sector Coefficients

In the comment below, F = number of faces in the sector, E = number of edges in the sector.

There are five valid sector configurations of edges and faces. In all configurations, the edges have one end at the center vertex and the faces have one corner at the center vertex.

SMOOTH 1) The center vertex is smooth. 2) F >= 2 3) E = F 4) Every edge is smooth. 5) Every edge is an edge of two different faces in the sector.

DART 1) The center vertex is a dart. 2) F >= 2 3) E = F 4) One edge is a crease. 5) The crease edge is an edge of two geometrically adjacent sector faces.

DART* (The same as "DART", but the crease edge has been duplicated.) 1) The center vertex is a dart. 2) F >= 2 3) E = F+1 4) Two edges are creases that have the same end locations. 5) Each crease edge is an edge of a single face in the sector, these faces are different and are geometrically adjacent.

BOUNDED 1) The center vertex is a crease or corner vertex. 2) F >= 2 3) E = F+1 4) Two edges are crease edges that have different vertices at their ends. 5) Each crease edge is an edge of a single face in the sector, these faces are different and not geometrically adjacent.

BOUNDED* 1) The center vertex is a crease or corner vertex. 2) F = 1 3) E = 2 4) The edges are crease edges that have different vertices at their ends. 5) The edges a edges of the face.

The sector coefficient is used when subdividing smooth edges in sectors with a DART, DART* or BOUNDED configuration. In these cases the sector coefficient is a value strictly between 0.0 and 1.0 that depends on 1) the center vertex tag (crease, corner or dart), 2) the value of F, 3) and when the center vertex is a corner, the angle between the boundary edges.

The sector coefficient is ignored when dividing smooth edges in SMOOTH sectors. The sector coefficient is ignored when subdividing crease edges.

For a smooth edge in a sector with a DART, DART* or BOUNDED configuration, with w = sector coefficient, C = location of the center vertex and P = location of the smooth vertex at the other end of the smooth edge, the point

Q = 3/4 * (w*C + (1-w)*P)

is the contribution of C and P to the edge's subdivision point.

When a smooth edge has smooth vertices at both ends located at A and B, the contribution of A and B to the edge's subdivision point is

Q = 3/8 * (A + B) = 3/4 * (1/2*A + 1/2*B)

A crease edge's subdivision point is always the edge's midpoint. Description: Calculates sector coefficient value for the sector type identified by this ON_SubDSectorType. Returns: w: 0.0 < w < 1.0 w = sector coefficient value. ON_SubDSectorType::IgnoredCornerSectorAngle (= 0.0) This value is used to set sector angles when the actual value is not needed. ON_SubDSectorType::ErrorSectorCoefficient This ON_SubDSectorType is not valid and the calculation failed.

◆ SectorCoefficientCalculationError()

static double ON_SubDSectorType::SectorCoefficientCalculationError ( )
static

Returns: ON_SubDSectorType::ErrorSectorCoefficient and calls debug breakpoint

◆ SectorEdgeCountFromFaceCount()

static unsigned int ON_SubDSectorType::SectorEdgeCountFromFaceCount ( ON_SubDVertexTag  vertex_tag,
unsigned int  sector_face_count 
)
static

◆ SectorFaceCountFromEdgeCount()

static unsigned int ON_SubDSectorType::SectorFaceCountFromEdgeCount ( ON_SubDVertexTag  vertex_tag,
unsigned int  sector_edge_count 
)
static

◆ SectorPointRingCountFromEdgeCount()

static unsigned int ON_SubDSectorType::SectorPointRingCountFromEdgeCount ( ON_SubDVertexTag  vertex_tag,
unsigned int  sector_edge_count 
)
static

Returns: Number of subdivision points in a sector ring facet_type vertex_tag ring count tri smooth N+1 tri crease N+2 quad smooth 2N+1 quad crease 2N+2 (2 * valence + 1) for quad subds (valence + 1) for tri subds

◆ SectorPointRingCountFromFaceCount()

static unsigned int ON_SubDSectorType::SectorPointRingCountFromFaceCount ( ON_SubDVertexTag  vertex_tag,
unsigned int  sector_face_count 
)
static

◆ SectorRingSubD()

ON_SubD* ON_SubDSectorType::SectorRingSubD ( double  radius,
double  sector_angle_radians,
ON_SubD subd 
) const

Description: Create a partial subdivison sector around vertex. The resulting ON_SubD has an outer ring with smooth edges and vertices, which is not valid as a stand-alone subd. This is typically used for testing. Parameters: radius - [in] The center vertex is located at (0,0,0), If radius > 0.0, then the end of the first edge is at (radius,0,0), subsequent edges are in a radial array and quad face points, if any, are 2*radius from the origin. sector_angle_radians - [in] If radius > 0, this->VertexTag() is ON_SubDVertexTag::Crease, crease_sector_angle_radians > 0.0 and crease_sector_angle_radians < 2.0*ON_PI, then this will be the angle between the crease boundary edges. In all other cases, crease_sector_angle_radians is ignored. subd - [in] If subd is not null, the vertex ring is put in this subd. Returns: a pointer to the vertex ring nullptr is returned if the input is not valid.

◆ SectorTypeHash()

unsigned int ON_SubDSectorType::SectorTypeHash ( ) const

◆ SmoothSectorCoefficient()

static double ON_SubDSectorType::SmoothSectorCoefficient ( )
static

◆ SubdominantEigenvalue()

double ON_SubDSectorType::SubdominantEigenvalue ( ) const

Description: All the subdivision matrices for the ON_SubD built-in subdivision algorithms have eigenvalues (1, lambda1, lambda2, e4, ..., eR), where 1 > lambda1 >= lambda2 > |e4| >= ... >= |eR| > 0.

The subdominant eigenvalue is lambda1 and, with one exception, lambda1 = lambda2. The exception is described in the description of ON_SubDSectorType::SubdominantEigenvalueMulitiplicity().

Returns:

0.0:

The subdominant eigenvalue for the subdivision matrix.

ON_UNSET_VALUE: This ON_SubDSectorType is not valid.

◆ SubdominantEigenvalueMulitiplicity()

unsigned int ON_SubDSectorType::SubdominantEigenvalueMulitiplicity ( ) const

Returns: 0: The sector type is not set.

2: The subdominant eigenvalue has algebraic and geometric multiplicty = 2. This is the most common case.

1: The subdominant eigenvalue has algebraic and geometric multiplicty = 1. This occures in Catmull-Clark subdivision at a crease vertex with two crease edges and a single face. The subdivision matrix for this case is S is a 4 x 4 matrix with rows = (3/4, 1/8, 0, 1/8), (1/2, 1/2, 0, 0), (1/4, 1/4, 1/4, 1/4), (1/2, 0, 0, 1/2). S has 4 real eigenvalues = (1, 1/2, 1/4, 1/4), all wtih geometric multiplicity = 1. The three eigenvectors are (1, 1, 1, 1), (0, -1, 0, 1), (0, 0, 1, 0).

◆ SurfaceEvaluationCoefficientsAvailable()

bool ON_SubDSectorType::SurfaceEvaluationCoefficientsAvailable ( ) const

◆ SurfaceNormalSign()

double ON_SubDSectorType::SurfaceNormalSign ( ) const

SurfaceNormalSign() is a debugging tool - slow and not useful in general.

◆ VertexTag()

ON_SubDVertexTag ON_SubDSectorType::VertexTag ( ) const

Member Data Documentation

◆ Empty

const ON_SubDSectorType ON_SubDSectorType::Empty
static

◆ ErrorCornerSectorAngle

const double ON_SubDSectorType::ErrorCornerSectorAngle
static

This value is indicate a corner sector angle calculation failed.

= -9991.0;

◆ ErrorSectorCoefficient

const double ON_SubDSectorType::ErrorSectorCoefficient
static

This value indicates an edge sector coefficient calculation failed.

= -9993.0;

◆ ErrorSectorTheta

const double ON_SubDSectorType::ErrorSectorTheta
static

This value is used to indicate a sector theta calculation failed.

= -9992.0;

◆ IgnoredCornerSectorAngle

const double ON_SubDSectorType::IgnoredCornerSectorAngle
static

= 0.0;

This value is is used to set sector angles when the actual value is not needed. This occurs at both ends of a creased edge and when the end of a smooth edge is a smooth vertex.

◆ IgnoredSectorCoefficient

const double ON_SubDSectorType::IgnoredSectorCoefficient
static

= 0.0;

This value is is used to set edge sector coefficients when the actual value is not needed. This occurs at both ends of a creased edge and when the end of a smooth edge is a smooth vertex.

◆ MaximumCornerAngleRadians

const double ON_SubDSectorType::MaximumCornerAngleRadians
static

◆ MinimumCornerAngleRadians

const double ON_SubDSectorType::MinimumCornerAngleRadians
static

◆ SmoothSectorTheta

const double ON_SubDSectorType::SmoothSectorTheta
static

This value is used for smooth sector thetas.

= 0.5*ON_PI

◆ UnsetCornerSectorAngle

const double ON_SubDSectorType::UnsetCornerSectorAngle
static

= -8881.0;

This value is used to set sector coefficients that could not be correctly set because something in the calculation failed.
It is typically used when an invalid component in SubD object was needed to calculate the coefficient.

◆ UnsetSectorCoefficient

const double ON_SubDSectorType::UnsetSectorCoefficient
static

= -8883.0;

This value is used to mark edge sector coefficients that need to be set in the future when more information is available. It is typically used when creating a subD control net and the facet type is not known. Any value < 0.0 and not equal to ON_UNSET_VALUE would work. The fact that the actual value is -999.0 has no other significance.

◆ UnsetSectorTheta

const double ON_SubDSectorType::UnsetSectorTheta
static

This value is used to indicate a sector theta needs to be set.

= -8882.0;