19 #define ON_SUBD_CENSUS 28 class ON_SUBD_CLASS ON_CensusCounter
31 enum class Class : unsigned int
37 subd_limit_mesh_impl = 4,
43 static void RegisterBirth(ON_CensusCounter::Class,ON__UINT_PTR);
45 static void RegisterDeath(ON_CensusCounter::Class,ON__UINT_PTR);
47 static void CensusReport(
54 class ON_SUBD_CLASS ON_SubDCensusCounter
57 ON_SubDCensusCounter() ON_NOEXCEPT;
58 ~ON_SubDCensusCounter() ON_NOEXCEPT;
59 ON_SubDCensusCounter(const ON_SubDCensusCounter&) ON_NOEXCEPT;
60 ON_SubDCensusCounter& operator=(const ON_SubDCensusCounter&) = default;
65 class ON_SUBD_CLASS ON_SubDRefCensusCounter
68 ON_SubDRefCensusCounter() ON_NOEXCEPT;
69 ~ON_SubDRefCensusCounter() ON_NOEXCEPT;
70 ON_SubDRefCensusCounter(const ON_SubDRefCensusCounter&) ON_NOEXCEPT;
71 ON_SubDRefCensusCounter& operator=(const ON_SubDRefCensusCounter&) = default;
77 class ON_SUBD_CLASS ON_SubDImpleCensusCounter
80 ON_SubDImpleCensusCounter() ON_NOEXCEPT;
81 ~ON_SubDImpleCensusCounter() ON_NOEXCEPT;
82 ON_SubDImpleCensusCounter(const ON_SubDImpleCensusCounter&) ON_NOEXCEPT;
83 ON_SubDImpleCensusCounter& operator=(const ON_SubDImpleCensusCounter&) = default;
88 class ON_SUBD_CLASS ON_SubDLimitMeshCensusCounter
91 ON_SubDLimitMeshCensusCounter() ON_NOEXCEPT;
92 ~ON_SubDLimitMeshCensusCounter() ON_NOEXCEPT;
93 ON_SubDLimitMeshCensusCounter(const ON_SubDLimitMeshCensusCounter&) ON_NOEXCEPT;
94 ON_SubDLimitMeshCensusCounter& operator=(const ON_SubDLimitMeshCensusCounter&) = default;
100 class ON_SUBD_CLASS ON_SubDLimitMeshImplCensusCounter
103 ON_SubDLimitMeshImplCensusCounter() ON_NOEXCEPT;
104 ~ON_SubDLimitMeshImplCensusCounter() ON_NOEXCEPT;
105 ON_SubDLimitMeshImplCensusCounter(const ON_SubDLimitMeshImplCensusCounter&) ON_NOEXCEPT;
106 ON_SubDLimitMeshImplCensusCounter& operator=(const ON_SubDLimitMeshImplCensusCounter&) ON_NOEXCEPT;
107 ON_SubDLimitMeshImplCensusCounter( ON_SubDLimitMeshImplCensusCounter&& ) ON_NOEXCEPT;
108 ON_SubDLimitMeshImplCensusCounter& operator=( ON_SubDLimitMeshImplCensusCounter&& ) ON_NOEXCEPT;
120 #if !defined(OPENNURBS_SUBD_INC_) 121 #define OPENNURBS_SUBD_INC_ 123 #if defined(OPENNURBS_SUBD_WIP) 127 #define ON_SUBD_CLASS ON_CLASS 130 #define ON_SUBD_CLASS 133 class ON_SUBD_CLASS ON_SubDVertexPtr
141 static const ON_SubDVertexPtr Null;
145 class ON_SubDVertex* Vertex()
const;
147 ON__UINT_PTR VertexPtrMark()
const;
152 class ON_SubDVertexPtr Create(
153 const class ON_SubDVertex* vertex
163 class ON_SubDVertexPtr Create(
164 const class ON_SubDVertex* vertex,
165 ON__UINT_PTR vertex_mark
169 class ON_SubDVertexPtr Create(
170 const class ON_SubDComponentPtr& vertex_component
174 class ON_SUBD_CLASS ON_SubDEdgePtr
182 static const ON_SubDEdgePtr Null;
186 class ON_SubDEdge* Edge()
const;
188 ON__UINT_PTR EdgeDirection()
const;
196 ON_SubDEdgePtr Reversed()
const;
198 static ON_SubDEdgePtr Create(
199 const class ON_SubDEdge* edge,
200 ON__UINT_PTR direction
203 static ON_SubDEdgePtr Create(
204 const class ON_SubDComponentPtr& edge_component
208 class ON_SUBD_CLASS ON_SubDFacePtr
216 static const ON_SubDFacePtr Null;
220 class ON_SubDFace* Face()
const;
222 ON__UINT_PTR FaceDirection()
const;
227 class ON_SubDFacePtr Create(
228 const class ON_SubDFace* face,
229 ON__UINT_PTR direction
232 static ON_SubDFacePtr Create(
233 const class ON_SubDComponentPtr& face_component
237 class ON_SUBD_CLASS ON_SubDComponentPtr
245 static const ON_SubDComponentPtr Null;
247 enum class ComponentPtrType : unsigned char
255 static ON_SubDComponentPtr::ComponentPtrType ComponentPtrTypeFromUnsigned(
256 unsigned int component_pointer_type_as_unsigned
267 static int CompareComponentPtrType(
268 ON_SubDComponentPtr::ComponentPtrType a,
269 ON_SubDComponentPtr::ComponentPtrType b
272 static int CompareType(
273 const ON_SubDComponentPtr* a,
274 const ON_SubDComponentPtr* b
278 const ON_SubDComponentPtr* a,
279 const ON_SubDComponentPtr* b
284 bool IsNotNull()
const;
286 ON_SubDComponentPtr::ComponentPtrType ComponentType()
const;
288 class ON_SubDComponentBase* ComponentBase()
const;
289 class ON_SubDVertex* Vertex()
const;
290 class ON_SubDEdge* Edge()
const;
291 class ON_SubDFace* Face()
const;
293 ON_SubDVertexPtr VertexPtr()
const;
294 ON_SubDEdgePtr EdgePtr()
const;
295 ON_SubDFacePtr FacePtr()
const;
297 ON_COMPONENT_INDEX ComponentIndex()
const;
309 ON__UINT_PTR ComponentMark()
const;
318 unsigned int SetStates(
327 unsigned int ClearStates(
340 unsigned int SetStatus(
344 static ON_SubDComponentPtr ClearMark(
345 ON_SubDComponentPtr component_ptr
349 class ON_SubDComponentPtr Create(
350 const class ON_SubDVertex* vertex
354 class ON_SubDComponentPtr Create(
355 const class ON_SubDEdge* edge
359 class ON_SubDComponentPtr Create(
360 const class ON_SubDFace* face
364 class ON_SubDComponentPtr Create(
365 const class ON_SubDVertex* vertex,
366 ON__UINT_PTR vertex_mark
370 class ON_SubDComponentPtr Create(
371 const class ON_SubDEdge* edge,
372 ON__UINT_PTR edge_mark
376 class ON_SubDComponentPtr Create(
377 const class ON_SubDFace* face,
378 ON__UINT_PTR face_mark
382 class ON_SubDComponentPtr Create(
383 ON_SubDVertexPtr vertexptr
387 class ON_SubDComponentPtr Create(
388 ON_SubDEdgePtr edgeptr
392 class ON_SubDComponentPtr Create(
393 ON_SubDFacePtr faceptr
404 enum class ON_SubDComponentLocation : unsigned char
417 ON_OBJECT_DECLARE(ON_SubD);
419 #if defined(ON_SUBD_CENSUS) 421 ON_SubDCensusCounter m_census_counter;
425 static const ON_SubD Empty;
429 maximum_subd_level = 128
432 #pragma region RH_C_SHARED_ENUM [ON_SubD::VertexTag] [Rhino.Geometry.SubD.SubDVertexTag] [nested:byte] 439 enum class VertexTag : unsigned char
477 static ON_SubD::VertexTag VertexTagFromUnsigned(
478 unsigned int vertex_tag_as_unsigned
488 static bool VertexTagIsSet(
489 ON_SubD::VertexTag vertex_tag
492 #pragma region RH_C_SHARED_ENUM [ON_SubD::EdgeTag] [Rhino.Geometry.SubD.SubDEdgeTag] [nested:byte] 497 enum class EdgeTag : unsigned char
551 static ON_SubD::EdgeTag EdgeTagFromUnsigned(
552 unsigned int edge_tag_as_unsigned
563 static bool EdgeTagIsSet(
564 ON_SubD::EdgeTag edge_tag
568 #pragma region RH_C_SHARED_ENUM [ON_SubD::FacetType] [Rhino.Geometry.SubD.SubDFacetType] [nested:byte] 572 enum class FacetType : unsigned char
585 static ON_SubD::FacetType FacetTypeFromUnsigned(
586 unsigned int facet_type_as_unsigned
605 #pragma region RH_C_SHARED_ENUM [ON_SubD::VertexFacetType] [Rhino.Geometry.SubD.VertexFacetType] [nested:byte] 608 enum class VertexFacetType : unsigned char
627 static ON_SubD::VertexFacetType VertexFacetTypeFromUnsigned(
628 unsigned int vertex_facet_type_as_unsigned
631 #pragma region RH_C_SHARED_ENUM [ON_SubD::SubDType] [Rhino.Geometry.SubD.SubDType] [nested:byte] 635 enum class SubDType : unsigned char
650 QuadCatmullClark = 4,
671 static ON_SubD::SubDType SubDTypeFromUnsigned(
672 unsigned int subd_type_as_unsigned
675 static ON_SubD::SubDType DefaultSubDType();
677 static unsigned int FacetEdgeCount(
678 ON_SubD::FacetType facet_type
681 static unsigned int FacetEdgeCount(
682 ON_SubD::SubDType subd_type
725 static unsigned int GetSectorComponentRing(
726 const class ON_SubDSectorIterator& sit,
727 size_t component_ring_capacity,
728 ON_SubDComponentPtr* component_ring
765 static unsigned int GetSectorComponentRing(
766 const class ON_SubDSectorIterator& sit,
774 static unsigned int ComponentRingEdgeCount(
775 size_t component_ring_count
782 static unsigned int ComponentRingFaceCount(
783 size_t component_ring_count
786 static bool ComponentRingIsValid(
787 size_t component_ring_count,
788 const ON_SubDComponentPtr* component_ring
795 static unsigned int GetSectorSubdivsionPointRing(
796 ON_SubD::SubDType subd_type,
797 size_t component_ring_count,
798 const ON_SubDComponentPtr* component_ring,
799 size_t point_ring_capacity,
800 size_t point_ring_stride,
804 static unsigned int GetSectorSubdivisionPointRing(
805 ON_SubD::SubDType subd_type,
806 size_t component_ring_count,
807 const ON_SubDComponentPtr* component_ring,
811 static unsigned int GetSectorPointRing(
812 ON_SubD::SubDType subd_type,
813 bool bSubdivideIfNeeded,
814 size_t component_ring_count,
815 const ON_SubDComponentPtr* component_ring,
816 size_t subd_point_ring_capacity,
817 size_t subd_point_ring_stride,
818 double* subd_point_ring
821 static unsigned int GetSectorPointRing(
822 ON_SubD::SubDType subd_type,
823 bool bSubdivideIfNeeded,
824 size_t component_ring_count,
825 const ON_SubDComponentPtr* component_ring,
829 static unsigned int GetSectorPointRing(
830 ON_SubD::SubDType subd_type,
831 bool bSubdivideIfNeeded,
832 const class ON_SubDSectorIterator& sit,
833 size_t point_ring_capacity,
834 size_t point_ring_stride,
838 static unsigned int GetSectorPointRing(
839 ON_SubD::SubDType subd_type,
840 bool bSubdivideIfNeeded,
841 const class ON_SubDSectorIterator& sit,
880 static unsigned int GetQuadSectorPointRing(
881 ON_SubD::SubDType subd_type,
884 const class ON_SubDVertex* vertex0,
885 size_t component_ring_count,
886 const class ON_SubDComponentPtr* component_ring,
887 size_t point_ring_stride,
925 static unsigned int GetTriSectorPointRing(
926 ON_SubD::SubDType subd_type,
929 const class ON_SubDVertex* vertex0,
930 size_t component_ring_count,
931 const class ON_SubDComponentPtr* component_ring,
932 size_t point_ring_stride,
936 static const class ON_SubDVertex* SubdivideSector(
937 ON_SubD::SubDType subd_type,
938 const class ON_SubDVertex* center_vertex,
939 size_t component_ring_count,
940 const class ON_SubDComponentPtr* component_ring,
941 class ON_SubD_FixedSizeHeap& fsh
948 static bool IsValidSectorEdgeCount(
949 ON_SubD::VertexTag vertex_tag,
950 unsigned int sector_edge_count
953 static bool IsValidSectorFaceCount(
954 ON_SubD::VertexTag vertex_tag,
955 unsigned int sector_face_count
967 static ON_SubD::FacetType FacetTypeFromSubDType(
968 ON_SubD::SubDType subd_type
971 static ON_SubD::SubDType SubDTypeFromFacetType(
972 ON_SubD::FacetType facet_type
975 static bool PointRingHasFacePoints(
976 ON_SubD::SubDType subd_type
983 static bool IsQuadOrTriFacetType(
984 ON_SubD::FacetType facet_type
991 static bool IsQuadOrTriSubDType(
992 ON_SubD::SubDType subd_type
995 ON_SubD() ON_NOEXCEPT;
1002 ON_SubD( const ON_SubD& src );
1008 ON_SubD& operator=(const ON_SubD& src);
1010 #if defined(ON_HAS_RVALUEREF) 1012 ON_SubD( ON_SubD&& ) ON_NOEXCEPT;
1017 ON_SubD& operator=( ON_SubD&& );
1026 void ShareContentsFrom(
1030 static void SwapContents(
1036 void MemoryRelocate()
override;
1039 bool IsValid(
class ON_TextLog* text_log =
nullptr )
const override;
1047 unsigned int SizeOf()
const override;
1051 ON__UINT32 current_remainder
1065 ON::object_type ObjectType()
const override;
1069 unsigned int ClearComponentStates(
1074 unsigned int GetComponentsWithSetStates(
1076 bool bAllEqualStates,
1081 unsigned int SetComponentStates(
1082 ON_COMPONENT_INDEX component_index,
1087 unsigned int ClearComponentStates(
1088 ON_COMPONENT_INDEX component_index,
1093 unsigned int SetComponentStatus(
1094 ON_COMPONENT_INDEX component_index,
1102 void MarkAggregateComponentStatusAsNotCurrent()
const override;
1105 bool DeleteComponents(
1106 const ON_COMPONENT_INDEX* ci_list,
1116 void DestroyRuntimeCache(
1121 int Dimension()
const override;
1124 bool GetBBox(
double* boxmin,
double* boxmax,
bool bGrowBox =
false )
const override;
1127 bool GetTightBoundingBox(
class ON_BoundingBox& tight_bbox,
bool bGrowBox =
false,
const class ON_Xform* xform =
nullptr )
const override;
1139 void ClearBoundingBox()
override;
1147 bool IsDeformable()
const override;
1150 bool MakeDeformable()
override;
1153 bool SwapCoordinates(
1161 bool HasBrepForm()
const override;
1169 ON_COMPONENT_INDEX ComponentIndex()
const override;
1188 static ON_SubD* CreateFromMesh(
1189 const class ON_Mesh* level_zero_mesh,
1190 const class ON_SubDFromMeshOptions* from_mesh_parameters,
1194 unsigned int DumpTopology(
1198 unsigned int DumpTopology(
1199 ON_2udex vertex_id_range,
1200 ON_2udex edge_id_range,
1201 ON_2udex face_id_range,
1219 ON_SubD::SubDType ActiveLevelSubDType()
const;
1226 unsigned int LevelCount()
const;
1233 unsigned int ActiveLevelIndex()
const;
1242 void ClearSubdivisionLevels(
1243 unsigned int max_level_index
1246 bool IsEmpty()
const;
1255 unsigned int EdgeFlags()
const;
1261 ON_SubDComponentPtr ComponentPtrFromComponentIndex(
1262 ON_COMPONENT_INDEX component_index
1265 unsigned int ComponentPtrFromComponentIndex(
1266 const ON_COMPONENT_INDEX* ci_list,
1271 unsigned int ComponentPtrFromComponentIndex(
1272 const ON_COMPONENT_INDEX* ci_list,
1274 bool bIncludeVertices,
1285 unsigned int VertexCount()
const;
1287 const class ON_SubDVertex* FirstVertex()
const;
1289 class ON_SubDVertexIterator VertexIterator() const;
1291 class ON_SubDVertexArray VertexArray() const;
1301 const class ON_SubDVertex* VertexFromId(
1302 unsigned int vertex_id
1310 unsigned int EdgeCount()
const;
1312 const class ON_SubDEdge* FirstEdge()
const;
1314 class ON_SubDEdgeIterator EdgeIterator() const;
1316 class ON_SubDEdgeArray EdgeArray() const;
1326 const class ON_SubDEdge* EdgeFromId(
1327 unsigned int edge_id
1335 unsigned int FaceCount()
const;
1337 const class ON_SubDFace* FirstFace()
const;
1339 class ON_SubDFaceIterator FaceIterator() const;
1341 class ON_SubDFaceArray FaceArray() const;
1351 const class ON_SubDFace* FaceFromId(
1352 unsigned int face_id
1379 unsigned int GetComponentsWithSetStates(
1381 bool bAllEqualStates,
1399 unsigned int SetComponentStates(
1400 ON_SubDComponentPtr component_ptr,
1417 unsigned int ClearComponentStates(
1418 ON_SubDComponentPtr component_ptr,
1433 unsigned int SetComponentStatus(
1434 ON_SubDComponentPtr component_ptr,
1438 bool DeleteComponents(
1439 const ON_SubDComponentPtr* cptr_list,
1449 unsigned int MergeColinearEdges(
1450 double distance_tolerance,
1451 double maximum_aspect,
1452 double sin_angle_tolerance
1455 ON_SubDEdgePtr MergeEdges(
1456 ON_SubDEdgePtr eptr0,
1457 ON_SubDEdgePtr eptr1
1460 static bool EdgesCanBeMerged(
1461 ON_SubDEdgePtr eptr0,
1462 ON_SubDEdgePtr eptr1
1467 unsigned int level_index
1471 bool ReverseOrientation(
1472 unsigned int level_index
1477 unsigned int level_index
1485 bool RepairInvalidSectors(
1486 unsigned int level_index
1504 const class ON_SubDEdge* SplitEdge(
1505 class ON_SubDEdge* edge,
1527 const class ON_SubDEdge* SplitFace(
1528 class ON_SubDFace* face,
1533 const class ON_SubDVertex* TriangulateFace(
1534 class ON_SubDFace* face
1537 const class ON_SubDFace* MergeFaces(
1538 class ON_SubDEdge* edge
1560 unsigned int UpdateAllTagsAndSectorCoefficients(
1561 bool bUnsetValuesOnly
1583 unsigned int UpdateVertexTags(
1584 bool bUnsetVertexTagsOnly
1607 unsigned int UpdateEdgeTags(
1608 bool bUnsetEdgeTagsOnly
1631 unsigned int UpdateEdgeSectorCoefficients(
1632 bool bUnsetSectorCoefficientsOnly
1639 unsigned int ClearComponentMarks(
1640 bool bClearVertexMarks,
1641 bool bClearEdgeMarks,
1642 bool bClearFaceMarks,
1646 unsigned int SetComponentMarks(
1647 bool bClearBeforeSet,
1651 unsigned int GetMarkedComponents(
1652 bool bIncludeVertices,
1669 unsigned int TransformComponents(
1671 const ON_COMPONENT_INDEX* ci_list,
1675 unsigned int TransformComponents(
1677 const ON_SubDComponentPtr* cptr_list,
1681 unsigned int ExtrudeComponents(
1683 const ON_COMPONENT_INDEX* ci_list,
1685 bool bPermitNonManifoldEdgeCreation,
1686 ON_SubD::EdgeTag original_edge_tag,
1687 ON_SubD::EdgeTag moved_edge_tag
1690 unsigned int ExtrudeComponents(
1692 const ON_SubDComponentPtr* cptr_list,
1694 bool bPermitNonManifoldEdgeCreation,
1695 ON_SubD::EdgeTag original_edge_tag,
1696 ON_SubD::EdgeTag moved_edge_tag
1758 ON_SubD::SubDType subd_type,
1759 unsigned int level_index,
1768 ON_SubD::SubDType subd_type
1771 class ON_SubDVertex* AddVertex(
1772 ON_SubD::VertexTag vertex_tag,
1800 static ON_SubD::EdgeTag EdgeTagFromContext(
1801 unsigned int edge_face_count,
1802 const ON_SubD::VertexTag v0_tag,
1803 const ON_SubD::VertexTag v1_tag
1806 static ON_SubD::EdgeTag EdgeTagFromContext(
1807 unsigned int edge_face_count,
1808 const ON_SubDVertex* v0,
1809 const ON_SubDVertex* v1
1836 class ON_SubDEdge* AddEdge(
1837 ON_SubD::EdgeTag edge_tag,
1838 class ON_SubDVertex* v0,
1839 class ON_SubDVertex* v1
1856 class ON_SubDEdge* AddEdgeWithSectorCoefficients(
1857 ON_SubD::EdgeTag edge_tag,
1858 class ON_SubDVertex* v0,
1859 double v0_sector_coefficient,
1860 class ON_SubDVertex* v1,
1861 double v1_sector_coefficient
1864 class ON_SubDFace* AddFace(
1865 unsigned int edge_count,
1866 const class ON_SubDEdgePtr* edge
1885 bool AddFaceEdgeConnection(
1889 ON__UINT_PTR edge_direction
1908 bool AddFaceEdgeConnection(
1928 bool RemoveFaceEdgeConnection(
1947 bool RemoveFaceEdgeConnection(
1966 bool RemoveFaceEdgeConnection(
1969 ON_SubDEdgePtr& removed_edge
1972 bool GrowVertexEdgeArray(
1976 bool GrowVertexFaceArray(
1980 bool GrowEdgeFaceArray(
1984 bool GrowFaceEdgeArray(
1999 class ON_SubDLimitMesh LimitSurfaceMesh() const;
2001 ON_SubDLimitMesh UpdateLimitSurfaceMesh(
2002 unsigned int minimum_display_density
2005 void ClearLimitSurfaceMesh()
const;
2007 void ClearEvaluationCache()
const;
2020 class ON_Mesh* GetLimitSurfaceMesh(
2021 const class ON_SubDDisplayParameters& display_parameters,
2037 class ON_Mesh* GetControlNetMesh(
2065 unsigned int GetLimitSurfaceMeshInFragments(
2066 const class ON_SubDDisplayParameters& display_parameters,
2067 ON__UINT_PTR fragment_callback_context,
2068 bool(*fragment_callback_function)(ON__UINT_PTR ,
const class ON_SubDLimitMeshFragment*)
2076 unsigned int LimitSurfaceMeshFragmentCount()
const;
2102 unsigned int GetLimitSurfaceInPatches(
2103 const class ON_SubDDisplayParameters& display_parameters,
2104 ON__UINT_PTR fragment_callback_context,
2105 bool(*fragment_callback_function)(ON__UINT_PTR ,
const class ON_SubDLimitPatchFragment*)
2124 unsigned int GetLimitSurfacePatches(
2125 const class ON_SubDDisplayParameters& display_parameters,
2126 bool bClampPatchKnots,
2127 const wchar_t* sUserStringPatchKey,
2144 const class ON_SubDimple* SubDimple()
const;
2145 const class ON_SubDLevel& ActiveLevel()
const;
2146 unsigned int SubDimpleUseCount()
const;
2148 void ShareDimple(
const ON_SubD&);
2149 void SwapDimple(ON_SubD&);
2151 void ShareDimple(
const class ON_SubDLimitMeshImpl&);
2152 void SwapDimple(
class ON_SubDLimitMeshImpl& );
2155 class ON_SubDimple* SubDimple(
bool bCreateIfNeeded);
2156 class ON_SubDLevel const * ActiveLevelConstPointer()
const;
2157 class ON_SubDLevel* ActiveLevelPointer();
2159 void CopyHelper(
const ON_SubD&);
2162 friend class ON_SubDRef;
2163 #pragma ON_PRAGMA_WARNING_PUSH 2164 #pragma ON_PRAGMA_WARNING_DISABLE_MSC( 4251 ) 2168 std::shared_ptr<class ON_SubDimple> m_subdimple_sp;
2169 #pragma ON_PRAGMA_WARNING_POP 2174 static unsigned int ErrorCount;
2182 class ON_SUBD_CLASS ON_SubDRef
2184 #if defined(ON_SUBD_CENSUS) 2186 ON_SubDRefCensusCounter m_census_counter;
2190 static const ON_SubDRef Empty;
2192 ON_SubDRef() ON_NOEXCEPT;
2194 ON_SubDRef(const ON_SubDRef& src) ON_NOEXCEPT;
2195 ON_SubDRef& operator=(const ON_SubDRef& src);
2197 #if defined(ON_HAS_RVALUEREF) 2199 ON_SubDRef( ON_SubDRef&& ) ON_NOEXCEPT;
2201 ON_SubDRef& operator=( ON_SubDRef&& );
2204 const class ON_SubD& SubD()
const;
2210 unsigned int ReferenceCount()
const;
2216 class ON_SubD& NewSubD();
2223 class ON_SubD& CopySubD(
2224 const ON_SubDRef& src
2226 class ON_SubD& CopySubD(
2230 class ON_SubD& UniqueSubD();
2240 class ON_SubDVertexIterator VertexIterator() const;
2241 class ON_SubDEdgeIterator EdgeIterator() const;
2242 class ON_SubDFaceIterator FaceIterator() const;
2260 class ON_SubD* SetSubDForExperts(
2261 class ON_SubD*& subd
2275 static ON_SubDRef CreateReferenceForExperts(
2290 const class ON_SubD& subd
2294 #pragma ON_PRAGMA_WARNING_PUSH 2295 #pragma ON_PRAGMA_WARNING_DISABLE_MSC( 4251 ) 2299 std::shared_ptr<class ON_SubD> m_subd_sp;
2300 #pragma ON_PRAGMA_WARNING_POP 2308 class ON_SUBD_CLASS ON_SubDSectorType
2311 ON_SubDSectorType() =
default;
2312 ON_SubDSectorType(
const ON_SubDSectorType&) =
default;
2313 ON_SubDSectorType& operator=(
const ON_SubDSectorType&) =
default;
2315 static const ON_SubDSectorType Empty;
2317 bool IsValid()
const;
2319 unsigned int SectorTypeHash()
const;
2321 static int Compare(
const ON_SubDSectorType*,
const ON_SubDSectorType*);
2414 double SectorWeight()
const;
2417 ON_SubD::SubDType SubDType()
const;
2419 ON_SubD::FacetType FacetType()
const;
2421 unsigned int FacetEdgeCount()
const;
2423 ON_SubD::VertexTag VertexTag()
const;
2426 unsigned int EdgeCount()
const;
2428 unsigned int FaceCount()
const;
2436 unsigned int PointRingCount()
const;
2442 unsigned int ComponentRingCount()
const;
2451 double CornerSectorAngleRadians()
const;
2457 unsigned int CornerSectorAngleIndex()
const;
2464 static const unsigned int MaximumAngleIndex;
2477 static unsigned int AngleIndexFromAngleRadians(
2478 double angle_radians
2492 static double AngleRadiansFromAngleIndex(
2493 unsigned int angle_index
2500 bool IsSmoothSector()
const;
2507 bool IsDartSector()
const;
2514 bool IsCreaseSector()
const;
2520 bool IsCornerSector()
const;
2526 bool IsConvexCornerSector()
const;
2532 bool IsConcaveCornerSector()
const;
2546 static double CornerSectorAngleRadiansFromEdges(
2547 ON_SubDEdgePtr sector_boundary_edge0_ptr,
2548 ON_SubDEdgePtr sector_boundary_edge1_ptr
2551 static bool IsValidCornerSectorAngleRadians(
2552 double corner_sector_angle_radians
2555 static double ClampCornerSectorAngleRadians(
2556 double corner_sector_angle_radians
2570 static unsigned int SectorPointRingCountFromEdgeCount(
2571 ON_SubD::SubDType subd_type,
2572 ON_SubD::VertexTag vertex_tag,
2573 unsigned int sector_edge_count
2576 static unsigned int SectorPointRingCountFromFaceCount(
2577 ON_SubD::SubDType subd_type,
2578 ON_SubD::VertexTag vertex_tag,
2579 unsigned int sector_face_count
2582 static unsigned int SectorFaceCountFromEdgeCount(
2583 ON_SubD::VertexTag vertex_tag,
2584 unsigned int sector_edge_count
2587 static unsigned int SectorEdgeCountFromFaceCount(
2588 ON_SubD::VertexTag vertex_tag,
2589 unsigned int sector_face_count
2592 static unsigned int MinimumSectorEdgeCount(
2593 ON_SubD::VertexTag vertex_tag
2596 static unsigned int MinimumSectorFaceCount(
2597 ON_SubD::VertexTag vertex_tag
2605 static double SmoothSectorWeight();
2628 static double CreaseSectorWeight(
2629 ON_SubD::SubDType subd_type,
2630 unsigned int sector_face_count
2633 static double DartSectorWeight(
2634 ON_SubD::SubDType subd_type,
2635 unsigned int sector_face_count
2638 static double CornerSectorWeight(
2639 ON_SubD::SubDType subd_type,
2640 unsigned int sector_face_count,
2641 double corner_sector_angle_radians
2648 static const double IgnoredCornerSectorAngle;
2654 static const double UnsetCornerSectorAngle;
2657 static const double ErrorCornerSectorAngle;
2661 static const double SmoothSectorTheta;
2664 static const double UnsetSectorTheta;
2667 static const double ErrorSectorTheta;
2674 static const double IgnoredSectorWeight;
2682 static const double UnsetSectorWeight;
2685 static const double ErrorSectorWeight;
2687 static bool IsValidSectorWeightValue(
2688 double weight_value,
2689 bool bAllowUnsetTaggedEndWeight
2696 static double SectorWeightCalculationError();
2717 static ON_SubDSectorType Create(
2718 ON_SubD::SubDType subd_type,
2719 ON_SubD::VertexTag vertex_tag,
2720 unsigned int sector_face_count,
2721 double corner_sector_angle_radians
2734 static ON_SubDSectorType Create(
2735 ON_SubD::SubDType subd_type,
2736 const ON_SubDSectorIterator& sit
2751 static ON_SubDSectorType Create(
2752 ON_SubD::SubDType subd_type,
2753 const class ON_SubDFace* face,
2754 unsigned int face_vertex_index
2757 static ON_SubDSectorType Create(
2758 ON_SubD::SubDType subd_type,
2759 const class ON_SubDFace* face,
2760 const class ON_SubDVertex* vertex
2775 static ON_SubDSectorType Create(
2776 ON_SubD::SubDType subd_type,
2777 const class ON_SubDEdge* edge,
2778 unsigned int edge_vertex_index
2792 static ON_SubDSectorType CreateSmoothSectorType(
2793 ON_SubD::SubDType subd_type,
2794 unsigned int sector_face_count
2808 static ON_SubDSectorType CreateCreaseSectorType(
2809 ON_SubD::SubDType subd_type,
2810 unsigned int sector_face_count
2824 static ON_SubDSectorType CreateDartSectorType(
2825 ON_SubD::SubDType subd_type,
2826 unsigned int sector_face_count
2842 static ON_SubDSectorType CreateCornerSectorType(
2843 ON_SubD::SubDType subd_type,
2844 unsigned int sector_face_count,
2845 double sector_corner_angle_radians
2849 const ON_SubDSectorType& a,
2850 const ON_SubDSectorType& b
2898 unsigned int GetSubdivisionMatrix(
2899 size_t matrix_capacity,
2916 unsigned int GetSubdivisionMatrix(
2939 double SubdominantEigenvalue()
const;
2965 unsigned int SubdominantEigenvalueMulitiplicity()
const;
3012 double GetSubdominantEigenvectors(
3041 unsigned int GetLimitSurfaceEvaluationCoefficients(
3042 size_t LPev_capacity,
3044 size_t LT0ev_capacity,
3046 size_t LT1ev_capacity,
3051 double LimitSurfaceNormalSign()
const;
3053 bool LimitEvaluationCoefficientsAvailable()
const;
3072 unsigned int GetAllEigenvalues(
3073 size_t eigenvalues_capacity,
3090 static unsigned int AllEigenvaluesAvailableKnown(
3091 ON_SubD::SubDType subd_type,
3092 ON_SubD::VertexTag vertex_tag,
3093 unsigned int sector_edge_count
3122 ON_SubD* SectorRingSubD(
3124 double sector_angle_radians,
3129 ON_SubD::SubDType m_subd_type = ON_SubD::SubDType::Unset;
3130 ON_SubD::FacetType m_facet_type = ON_SubD::FacetType::Unset;
3131 ON_SubD::VertexTag m_vertex_tag = ON_SubD::VertexTag::Unset;
3132 unsigned char m_reserved1 = 0;
3133 unsigned int m_hash = 0;
3134 unsigned int m_corner_sector_angle_index = 0;
3135 unsigned int m_sector_face_count = 0;
3136 double m_sector_weight = 0.0;
3137 double m_sector_theta = 0.0;
3138 double m_corner_sector_angle_radians = 0.0;
3153 double SectorTheta()
const;
3165 static double CreaseSectorTheta(
3166 unsigned int sector_face_count
3179 static double DartSectorTheta(
3180 unsigned int sector_face_count
3196 static double CornerSectorThetaFromCornerAngle(
3197 unsigned int sector_face_count,
3198 double corner_sector_angle_radians
3232 static double SectorWeightFromTheta(
3233 ON_SubD::SubDType subd_type,
3244 class ON_SUBD_CLASS ON_SubDLimitMeshFragmentGrid
3254 static const ON_SubDLimitMeshFragmentGrid Empty;
3273 static ON_SubDLimitMeshFragmentGrid Quads(
3274 unsigned int side_segment_count,
3275 unsigned int level_of_detail
3278 static ON_SubDLimitMeshFragmentGrid Tris(
3279 unsigned int side_segment_count,
3280 unsigned int level_of_detail
3283 static ON_SubDLimitMeshFragmentGrid Facets(
3284 ON_SubD::FacetType facet_type,
3285 unsigned int side_segment_count,
3286 unsigned int level_of_detail
3309 static unsigned int SetQuads(
3310 unsigned int side_segment_count,
3311 unsigned int level_of_detail,
3312 size_t quad_capacity,
3314 unsigned int* quads,
3315 size_t side_capacity,
3321 unsigned int SideSegmentCount()
const;
3340 unsigned int GridId()
const;
3346 unsigned int GridFacetSideCount()
const;
3348 bool GetGridParameters(
3349 unsigned int grid_point_index,
3350 double grid_parameters[2]
3355 unsigned char m_reserved;
3359 ON_SubD::FacetType m_F_type;
3360 unsigned char m_side_segment_count;
3361 unsigned short m_F_count;
3362 unsigned short m_F_level_of_detail;
3363 unsigned short m_F_stride;
3364 const unsigned int* m_F;
3365 const unsigned int* m_S;
3366 const ON_SubDLimitMeshFragmentGrid* m_prev_level_of_detail;
3367 const ON_SubDLimitMeshFragmentGrid* m_next_level_of_detail;
3370 class ON_SUBD_CLASS ON_SubDLimitMeshFragment
3382 static const ON_SubDLimitMeshFragment Empty;
3384 static const unsigned int MaximumSideSegmentCount;
3390 static unsigned int SideSegmentCountFromDisplayDensity(
3391 unsigned int display_density
3400 static unsigned int DisplayDensityFromSideSegmentCount(
3401 unsigned int side_segment_count
3418 static unsigned int PointCountFromDisplayDensity(
3419 ON_SubD::FacetType facet_type,
3420 unsigned int display_density
3430 static unsigned int FaceCountFromDisplayDensity(
3431 unsigned int display_density
3439 static bool SideSegmentCountIsValid(
3440 unsigned int side_segment_count
3448 static unsigned int SidePointCountFromSideCount(
3449 unsigned int side_segment_count
3457 static unsigned int QuadGridPointCountFromSideCount(
3458 unsigned int side_segment_count
3466 static unsigned int QuadGridQuadCountFromSideCount(
3467 unsigned int side_segment_count
3471 const class ON_SubDFace* m_face;
3484 unsigned short m_face_vertex_index[4];
3494 const class ON_SubDEdgePtr EdgePtr(
3495 unsigned int grid_side_index
3497 const class ON_SubDEdge* Edge(
3498 unsigned int grid_side_index
3501 const class ON_SubDVertexPtr VertexPtr(
3502 unsigned int grid_corner_index
3504 const class ON_SubDVertex* Vertex(
3505 unsigned int grid_corner_index
3509 unsigned int grid_corner_index
3522 bool IsSubFragment()
const;
3528 bool IsCompleteFragment()
const;
3534 unsigned short m_face_fragment_count;
3535 unsigned short m_face_fragment_index;
3551 unsigned short m_P_count;
3552 unsigned short m_P_capacity;
3568 ON_SubDLimitMeshFragmentGrid m_grid;
3572 ON_SubDLimitMeshFragment* m_next_fragment;
3573 ON_SubDLimitMeshFragment* m_prev_fragment;
3576 class ON_SUBD_CLASS ON_SubDManagedLimitMeshFragment :
public ON_SubDLimitMeshFragment
3579 ON_SubDManagedLimitMeshFragment() ON_NOEXCEPT;
3580 ~ON_SubDManagedLimitMeshFragment() ON_NOEXCEPT;
3581 ON_SubDManagedLimitMeshFragment(const ON_SubDManagedLimitMeshFragment&) ON_NOEXCEPT;
3582 ON_SubDManagedLimitMeshFragment& operator=(const ON_SubDManagedLimitMeshFragment&) ON_NOEXCEPT;
3584 static ON_SubDManagedLimitMeshFragment Create(const ON_SubDLimitMeshFragment& src) ON_NOEXCEPT;
3586 #if defined(ON_HAS_RVALUEREF) 3588 ON_SubDManagedLimitMeshFragment( ON_SubDManagedLimitMeshFragment&& ) ON_NOEXCEPT;
3591 ON_SubDManagedLimitMeshFragment& operator=( ON_SubDManagedLimitMeshFragment&& ) ON_NOEXCEPT;
3594 void Clear() ON_NOEXCEPT;
3596 void Destroy() ON_NOEXCEPT;
3598 bool ReserveCapacity(
3599 ON_SubD::FacetType facet_type,
3600 unsigned int mesh_density
3604 void CopyHelper(const ON_SubDLimitMeshFragment& src);
3605 size_t m_storage_capacity = 0;
3606 double* m_storage =
nullptr;
3616 class ON_SUBD_CLASS ON_SubDDisplayParameters
3619 static const ON_SubDDisplayParameters Empty;
3622 static const ON_SubDDisplayParameters DefaultDisplayMeshParameters;
3630 static ON_SubDDisplayParameters CreateFromDisplayDensity(
3631 unsigned int display_density
3634 ON_SubDDisplayParameters() =
default;
3635 ~ON_SubDDisplayParameters() =
default;
3636 ON_SubDDisplayParameters(
const ON_SubDDisplayParameters&) =
default;
3637 ON_SubDDisplayParameters& operator=(
const ON_SubDDisplayParameters&) =
default;
3639 unsigned int m_display_density = 0;
3641 bool m_bUseMultipleThreads =
false;
3652 class ON_SUBD_CLASS ON_SubDLimitMesh
3654 #if defined(ON_SUBD_CENSUS) 3656 ON_SubDLimitMeshCensusCounter m_census_counter;
3660 static const ON_SubDLimitMesh Empty;
3670 unsigned int ContentSerialNumber()
const;
3674 DefaultDisplayDensity = 4,
3675 MaximumDisplayDensity = 8
3680 static ON_SubDLimitMesh* Create(
3681 const ON_SubD& subd,
3682 const class ON_SubDDisplayParameters& limit_mesh_parameters,
3683 ON_SubDLimitMesh* destination_mesh
3691 static ON_SubDLimitMesh* Create(
3692 ON_SubDFaceIterator fit,
3693 const class ON_SubDDisplayParameters& limit_mesh_parameters,
3694 ON_SubDLimitMesh* destination_mesh
3697 ON_SubDLimitMesh() =
default;
3698 ~ON_SubDLimitMesh() =
default;
3699 ON_SubDLimitMesh(
const ON_SubDLimitMesh&) =
default;
3700 ON_SubDLimitMesh& operator=(
const ON_SubDLimitMesh&) =
default;
3703 #if defined(ON_HAS_RVALUEREF) 3705 ON_SubDLimitMesh( ON_SubDLimitMesh&& ) ON_NOEXCEPT;
3707 ON_SubDLimitMesh& operator=( ON_SubDLimitMesh&& );
3710 ON_SubDLimitMesh Copy()
const;
3712 ON_SubDLimitMesh& CopyFrom(
3713 const ON_SubDLimitMesh& src
3717 ON_SubDLimitMesh& a,
3725 unsigned int DisplayDensity()
const;
3726 ON_SubDDisplayParameters DisplayParameters()
const;
3727 unsigned int FragmentCount()
const;
3728 const ON_SubDLimitMeshFragment* FirstFragment()
const;
3743 const ON_RTree& FragmentTree()
const;
3758 bool IsEmpty()
const;
3760 ON_SubD::FacetType GridType()
const;
3764 bool GetTightBoundingBox(
3770 ON_SubDRef SubDRef()
const;
3771 ON_SubD SubD()
const;
3786 class ON_SubDLimitMeshImpl* SubLimple()
const;
3787 unsigned int SubLimpleUseCount()
const;
3790 #pragma ON_PRAGMA_WARNING_PUSH 3791 #pragma ON_PRAGMA_WARNING_DISABLE_MSC( 4251 ) 3792 friend class ON_SubDLimitMeshImpl;
3796 std::shared_ptr< class ON_SubDLimitMeshImpl > m_impl_sp;
3797 #pragma ON_PRAGMA_WARNING_POP 3803 class ON_SUBD_CLASS ON_SubDLimitPatchFragment
3815 static const ON_SubDLimitPatchFragment Empty;
3819 static const ON_SubDLimitPatchFragment Unset;
3823 static const ON_SubDLimitPatchFragment Nan;
3825 #pragma region RH_C_SHARED_ENUM [SubD::PatchType] [Rhino.Geometry.SubD.PatchType] [internal:nested:byte] 3826 enum class PatchType : unsigned char
3835 BicubicQuadrant = 2,
3838 ApproximateBicubic = 3,
3841 ApproximateBicubicQuadrant = 4,
3849 double m_patch_cv[5][5][3];
3850 const double* m_patch_knots[2];
3852 const class ON_SubDFace* m_level0_face;
3864 ON_SubDLimitPatchFragment::PatchType m_patch_type[4];
3866 unsigned short m_patch_level;
3870 unsigned short m_level0_face_region_count;
3871 unsigned short m_level0_face_region_index;
3873 unsigned short m_face_subdivision_count;
3874 unsigned short m_face_region_index[10];
3877 ON_SubDLimitPatchFragment* m_next_fragment;
3878 ON_SubDLimitPatchFragment* m_prev_fragment;
3882 class ON_SUBD_CLASS ON_SubDSectorLimitPoint
3888 static const ON_SubDSectorLimitPoint Unset;
3889 static const ON_SubDSectorLimitPoint Nan;
3890 static const ON_SubDSectorLimitPoint Zero;
3897 bool IsUnset()
const;
3911 bool IsZero()
const;
3927 double m_limitT1[3];
3928 double m_limitT2[3];
3936 const class ON_SubDSectorLimitPoint* m_next_sector_limit_point;
3937 const class ON_SubDFace* m_sector_face;
3946 class ON_SUBD_CLASS ON_SubDComponentBase
3949 static const ON_SubDComponentBase Unset;
3960 ON_SubDComponentBase() =
default;
3961 ~ON_SubDComponentBase() =
default;
3962 ON_SubDComponentBase(
const ON_SubDComponentBase&) =
default;
3963 ON_SubDComponentBase& operator=(
const ON_SubDComponentBase&) =
default;
3976 const class ON_SubDVertex* m_subd_point1 =
nullptr;
3989 unsigned int m_id = 0;
3993 mutable unsigned int m_archive_id = 0;
3996 unsigned short m_level = 0;
4019 bool SetSavedSubdivisionPoint(
4020 ON_SubD::SubDType subd_type,
4021 const double subdivision_point[3]
4024 bool GetSavedSubdivisionPoint(
4025 ON_SubD::SubDType subd_type,
4026 double subdivision_point[3]
4029 ON_SubD::SubDType SavedSubdivisionPointType()
const;
4035 void ClearSavedSubdivisionPoint()
const;
4041 bool SetDisplacement(
4042 ON_SubD::SubDType subd_type,
4043 const double displacement[3]
4046 bool GetDisplacement(
4047 ON_SubD::SubDType subd_type,
4048 double displacement[3]
4051 ON_SubD::SubDType DisplacementType()
const;
4053 void ClearDisplacement()
const;
4062 mutable unsigned char m_saved_points_flags = 0U;
4069 unsigned int m_group_id = 0U;
4073 mutable double m_saved_subd_point1[3];
4077 double m_displacement_V[3];
4090 unsigned int ArchiveId()
const 4092 return m_archive_id;
4096 unsigned int archive_id
4100 if ( ON_UNSET_UINT_INDEX != archive_id )
4101 m_archive_id = archive_id;
4106 const ON_SubDComponentBase* src
4114 class ON_SUBD_CLASS ON_SubDVertex :
public ON_SubDComponentBase
4117 static const ON_SubDVertex Empty;
4125 class ON_SubD& subd,
4126 class ON_SubDVertex*& vertex
4147 bool bTransformationSavedSubdivisionPoint,
4153 bool bClearNeighborhoodCache
4163 ON_COMPONENT_INDEX ComponentIndex()
const;
4164 ON_SubDComponentPtr ComponentPtr()
const;
4167 const class ON_SubDVertex* m_prev_vertex =
nullptr;
4168 const class ON_SubDVertex* m_next_vertex =
nullptr;
4171 ON_SubD::VertexTag m_vertex_tag = ON_SubD::VertexTag::Unset;
4176 unsigned char m_reserved1 = 0;
4177 unsigned short m_reserved2 = 0;
4178 unsigned int m_reserved3 = 0;
4181 unsigned short m_edge_count = 0;
4182 unsigned short m_face_count = 0;
4184 unsigned short m_edge_capacity = 0;
4185 unsigned short m_face_capacity = 0;
4192 class ON_SubDEdgePtr* m_edges =
nullptr;
4197 const class ON_SubDFace** m_faces =
nullptr;
4213 mutable ON_SubDSectorLimitPoint m_limit_point = ON_SubDSectorLimitPoint::Unset;
4216 static const unsigned int MaximumEdgeCount;
4217 static const unsigned int MaximumFaceCount;
4219 static int CompareUnorderedEdges(
4220 const ON_SubDVertex* a,
4221 const ON_SubDVertex* b
4224 static int CompareUnorderedFaces(
4225 const ON_SubDVertex* a,
4226 const ON_SubDVertex* b
4229 static int CompareUnorderedEdgesAndFaces(
4230 const ON_SubDVertex* a,
4231 const ON_SubDVertex* b
4243 unsigned int EdgeCount(
4244 ON_SubD::EdgeTag edge_tag
4247 unsigned int EdgeCount()
const;
4249 const class ON_SubDEdge* Edge(
4253 const ON_SubDEdgePtr EdgePtr(
4257 ON__UINT_PTR EdgeDirection(
4261 unsigned int EdgeArrayIndex(
4262 const ON_SubDEdge* edge
4265 unsigned int FaceCount()
const;
4267 const class ON_SubDFace* Face(
4271 unsigned int FaceArrayIndex(
4272 const ON_SubDFace* face
4275 ON_SubD::FacetType FirstFaceFacetType()
const;
4281 bool IsTagged()
const;
4321 bool IsSmooth()
const;
4327 bool IsCrease()
const;
4333 bool IsCorner()
const;
4339 bool IsDart()
const;
4345 bool IsSmoothOrCrease()
const;
4351 bool IsCreaseOrCorner()
const;
4357 bool IsCreaseOrCornerOrDart()
const;
4363 bool IsSmoothOrDart()
const;
4384 ON_SubD::SubDType subd_type
4399 bool GetSubdivisionPoint(
4400 ON_SubD::SubDType subdivision_point_type,
4401 bool bUseSavedSubdivisionPoint,
4402 double subdivision_point[3]
4417 ON_SubD::SubDType subd_type,
4418 const ON_SubDFace* sector_face,
4419 bool bUseSavedLimitPoint,
4420 class ON_SubDSectorLimitPoint& limit_point
4433 bool SetSavedLimitPoint(
4434 ON_SubD::SubDType subd_type,
4435 const ON_SubDSectorLimitPoint limit_point
4438 void ClearSavedLimitPoints()
const;
4449 ON_SubD::SubDType SavedLimitPointType()
const;
4455 ON_SubD::VertexFacetType VertexFacetTypes()
const;
4463 void VertexModifiedNofification()
const;
4466 static bool GetQuadPoint(
4467 const class ON_SubDVertex* vertex,
4468 bool bUseSavedSubdivisionPoint,
4469 double vertex_point[3]
4472 static bool GetTriPoint(
4473 const class ON_SubDVertex* vertex,
4474 bool bUseSavedSubdivisionPoint,
4475 double vertex_point[3]
4478 static unsigned int GetFacePointSum(
4479 const ON_SubDFace* face,
4480 const ON_SubDVertex* vertex,
4497 static bool GetGeneralQuadSubdivisionPoint(
4498 const class ON_SubDVertex* vertex,
4499 bool bUseSavedSubdivisionPoint,
4500 double vertex_point[3]
4504 friend class ON_SubDArchiveIdMap;
4506 const ON_SubDVertex* src,
4507 bool bCopyEdgeArray,
4508 bool bCopyFaceArray,
4509 bool bCopyLimitPointList
4517 class ON_SUBD_CLASS ON_SubDEdge :
public ON_SubDComponentBase
4520 static const ON_SubDEdge Empty;
4528 class ON_SubD& subd,
4529 class ON_SubDEdge*& edge
4551 bool bTransformationSavedSubdivisionPoint,
4566 void EdgeModifiedNofification()
const;
4570 ON_COMPONENT_INDEX ComponentIndex()
const;
4571 ON_SubDComponentPtr ComponentPtr()
const;
4574 const class ON_SubDEdge* m_prev_edge =
nullptr;
4575 const class ON_SubDEdge* m_next_edge =
nullptr;
4583 ON_SubD::EdgeTag m_edge_tag = ON_SubD::EdgeTag::Unset;
4586 unsigned char m_reserved1 = 0;
4587 unsigned short m_reserved2 = 0;
4603 static const unsigned int MaximumFaceCount;
4604 unsigned short m_face_count = 0;
4605 unsigned short m_facex_capacity = 0;
4606 ON_SubDFacePtr m_face2[2];
4607 ON_SubDFacePtr* m_facex =
nullptr;
4611 const class ON_SubDVertex* m_vertex[2];
4654 double m_sector_coefficient[2];
4662 double m_sharpness = 0.0;
4665 unsigned int FaceCount()
const;
4667 ON_SubDFacePtr FacePtr(
4671 ON_SubDFacePtr FacePtr(
4672 const class ON_SubDFace* f
4675 const class ON_SubDFace* Face(
4679 ON__UINT_PTR FaceDirection(
4683 unsigned int FaceArrayIndex(
4684 const class ON_SubDFace* f
4694 bool RemoveFaceFromArray(
4695 const ON_SubDFace* f
4705 bool RemoveFaceFromArray(
4707 ON_SubDFacePtr& removed_face
4719 bool AddFaceToArray(
4720 ON_SubDFacePtr face_ptr
4723 const class ON_SubDVertex* Vertex(
4738 const ON_SubDVertex* OtherEndVertex(
4739 const ON_SubDVertex* vertex
4758 const ON_SubDFace* NeighborFace(
4759 const ON_SubDFace* face,
4779 const ON_SubDFacePtr NeighborFacePtr(
4780 const ON_SubDFace* face,
4793 bool bEdgeTagXresult
4803 bool bEdgeTagXresult
4812 unsigned int DartCount()
const;
4818 unsigned int EdgeFlags()
const;
4832 bool GetSubdivisionPoint(
4833 ON_SubD::SubDType subdivision_point_type,
4834 bool bUseSavedSubdivisionPoint,
4835 double subdivision_point[3]
4850 unsigned int GetSectorBoundaryEdges(
4851 unsigned int edge_vertex_index,
4852 ON_SubDEdgePtr* edge_ptr0,
4853 ON_SubDEdgePtr* edge_ptr1
4863 unsigned int TaggedEndIndex()
const;
4866 static unsigned int GetFacePointSum(
4867 const ON_SubDFace* face,
4868 const ON_SubDEdge* edge,
4873 friend class ON_SubDArchiveIdMap;
4875 const ON_SubDEdge* src,
4877 bool bCopyVertexArray,
4886 class ON_SUBD_CLASS ON_SubDFace :
public ON_SubDComponentBase
4889 static const ON_SubDFace Empty;
4897 class ON_SubD& subd,
4898 class ON_SubDFace*& face
4920 bool bTransformationSavedSubdivisionPoint,
4930 ON_COMPONENT_INDEX ComponentIndex()
const;
4931 ON_SubDComponentPtr ComponentPtr()
const;
4938 void FaceModifiedNofification()
const;
4942 const class ON_SubDFace* m_prev_face =
nullptr;
4943 const class ON_SubDFace* m_next_face =
nullptr;
4946 unsigned int m_zero_face_id = 0;
4947 unsigned int m_parent_face_id = 0;
4950 unsigned int m_reserved = 0;
4967 static const unsigned int MaximumEdgeCount;
4968 unsigned short m_edge_count = 0;
4969 unsigned short m_edgex_capacity = 0;
4971 ON_SubDEdgePtr m_edge4[4];
4972 ON_SubDEdgePtr* m_edgex =
nullptr;
4975 unsigned int EdgeCount()
const;
4977 ON_SubDEdgePtr EdgePtr(
4981 ON_SubDEdgePtr EdgePtr(
4982 const class ON_SubDEdge* e
4985 const class ON_SubDVertex* Vertex(
4989 unsigned int VertexIndex(
4990 const ON_SubDVertex* vertex
4993 const class ON_SubDEdge* Edge(
4997 ON__UINT_PTR EdgeDirection(
5001 unsigned int EdgeArrayIndex(
5002 const ON_SubDEdge* e
5012 bool RemoveEdgeFromArray(
5013 const ON_SubDEdge* e
5023 bool RemoveEdgeFromArray(
5025 ON_SubDEdgePtr& removed_edge
5040 bool ReplaceEdgeInArray(
5042 ON_SubDEdge* edge_to_remove,
5043 ON_SubDEdge* edge_to_insert
5058 bool ReplaceEdgeInArray(
5060 ON_SubDEdge* edge_to_remove,
5061 ON_SubDEdgePtr edgeptr_to_insert
5064 const ON_SubDEdge* PrevEdge(
5065 const ON_SubDEdge* edge
5068 const ON_SubDEdge* NextEdge(
5069 const ON_SubDEdge* edge
5072 unsigned int PrevEdgeArrayIndex(
5073 unsigned int edge_array_index
5076 unsigned int NextEdgeArrayIndex(
5077 unsigned int edge_array_index
5091 const ON_SubDVertex* QuadOppositeVertex(
5092 const ON_SubDVertex* vertex
5106 const ON_SubDEdge* QuadOppositeEdge(
5107 const ON_SubDEdge* edge
5135 bool GetSubdivisionPoint(
5136 ON_SubD::SubDType subdivision_point_type,
5137 bool bUseSavedSubdivisionPoint,
5138 double subdivision_point[3]
5146 bool ReverseEdgeList();
5166 bool GetQuadLimitSurface(
5167 size_t limit_surface_cv_stride0,
5168 size_t limit_surface_cv_stride1,
5169 double* limit_surface_cv
5172 bool GetQuadLimitSurface(
5176 bool GetQuadLimitSurface(
5181 friend class ON_SubDArchiveIdMap;
5183 const ON_SubDFace* src,
5192 class ON_SUBD_CLASS ON_SubDVertexArray
5198 ON_SubDVertexArray() =
default;
5199 ON_SubDVertexArray(
const ON_SubDVertexArray&) =
default;
5200 ON_SubDVertexArray& operator=(
const ON_SubDVertexArray&) =
default;
5202 #if defined(ON_HAS_RVALUEREF) 5204 ON_SubDVertexArray(ON_SubDVertexArray&&) ON_NOEXCEPT;
5207 ON_SubDVertexArray& operator=(ON_SubDVertexArray&&);
5210 const ON_SubD& SubD()
const 5215 unsigned int VertexCount()
const 5217 return m_vertex_count;
5220 const class ON_SubDVertex* operator[](
unsigned int i)
const 5222 return (i < m_vertex_count) ? m_a[i] :
nullptr;
5227 const class ON_SubDVertex*
const* m_a =
nullptr;
5228 unsigned int m_vertex_count = 0;
5230 #pragma ON_PRAGMA_WARNING_PUSH 5231 #pragma ON_PRAGMA_WARNING_DISABLE_MSC( 4251 ) 5235 std::shared_ptr< const class ON_SubDVertex* > m_sp;
5236 #pragma ON_PRAGMA_WARNING_POP 5243 class ON_SUBD_CLASS ON_SubDEdgeArray
5249 ON_SubDEdgeArray() =
default;
5250 ON_SubDEdgeArray(
const ON_SubDEdgeArray&) =
default;
5251 ON_SubDEdgeArray& operator=(
const ON_SubDEdgeArray&) =
default;
5253 #if defined(ON_HAS_RVALUEREF) 5255 ON_SubDEdgeArray(ON_SubDEdgeArray&&) ON_NOEXCEPT;
5258 ON_SubDEdgeArray& operator=(ON_SubDEdgeArray&&);
5261 const ON_SubD& SubD()
const 5266 unsigned int EdgeCount()
const 5268 return m_edge_count;
5271 const class ON_SubDEdge* operator[](
unsigned int i)
const 5273 return (i < m_edge_count) ? m_a[i] :
nullptr;
5278 const class ON_SubDEdge*
const* m_a =
nullptr;
5279 unsigned int m_edge_count = 0;
5281 #pragma ON_PRAGMA_WARNING_PUSH 5282 #pragma ON_PRAGMA_WARNING_DISABLE_MSC( 4251 ) 5286 std::shared_ptr< const class ON_SubDEdge* > m_sp;
5287 #pragma ON_PRAGMA_WARNING_POP 5294 class ON_SUBD_CLASS ON_SubDFaceArray
5300 ON_SubDFaceArray() =
default;
5301 ON_SubDFaceArray(
const ON_SubDFaceArray&) =
default;
5302 ON_SubDFaceArray& operator=(
const ON_SubDFaceArray&) =
default;
5304 #if defined(ON_HAS_RVALUEREF) 5306 ON_SubDFaceArray(ON_SubDFaceArray&&) ON_NOEXCEPT;
5309 ON_SubDFaceArray& operator=(ON_SubDFaceArray&&);
5312 const ON_SubD& SubD()
const 5317 unsigned int FaceCount()
const 5319 return m_face_count;
5322 const class ON_SubDFace* operator[](
unsigned int i)
const 5324 return (i < m_face_count) ? m_a[i] :
nullptr;
5329 const class ON_SubDFace*
const* m_a =
nullptr;
5330 unsigned int m_face_count = 0;
5332 #pragma ON_PRAGMA_WARNING_PUSH 5333 #pragma ON_PRAGMA_WARNING_DISABLE_MSC( 4251 ) 5337 std::shared_ptr< const class ON_SubDFace* > m_sp;
5338 #pragma ON_PRAGMA_WARNING_POP 5345 class ON_SUBD_CLASS ON_SubDVertexIterator
5351 ON_SubDVertexIterator(
5352 const class ON_SubD& subd
5354 ON_SubDVertexIterator(
5355 const class ON_SubDRef& subd_ref
5359 ON_SubDVertexIterator(
5360 const class ON_SubD& subd,
5361 const class ON_SubDVertex& vertex
5365 ON_SubDVertexIterator(
5366 const class ON_SubDRef& subd_ref,
5367 const class ON_SubDVertex& vertex
5371 ON_SubDVertexIterator(
5372 const class ON_SubD& subd,
5373 const class ON_SubDEdge& edge
5377 ON_SubDVertexIterator(
5378 const class ON_SubDRef& subd_ref,
5379 const class ON_SubDEdge& edge
5383 ON_SubDVertexIterator(
5384 const class ON_SubD& subd,
5385 const class ON_SubDFace& face
5389 ON_SubDVertexIterator(
5390 const class ON_SubDRef& subd_ref,
5391 const class ON_SubDFace& face
5394 ON_SubDVertexIterator() =
default;
5395 ON_SubDVertexIterator(
const ON_SubDVertexIterator&) =
default;
5396 ON_SubDVertexIterator& operator=(
const ON_SubDVertexIterator&) =
default;
5398 #if defined(ON_HAS_RVALUEREF) 5400 ON_SubDVertexIterator( ON_SubDVertexIterator&& ) ON_NOEXCEPT;
5402 ON_SubDVertexIterator& operator=( ON_SubDVertexIterator&& );
5409 const class ON_SubD& SubD()
const 5411 return m_subd_ref.SubD();
5414 const class ON_SubDRef& SubDRef()
const 5427 const class ON_SubDVertex* operator++()
5429 const class ON_SubDVertex* v = m_v_current;
5438 unsigned int VertexCount()
const 5440 return m_vertex_count;
5447 unsigned int CurrentVertexIndex()
const 5449 return m_vertex_index;
5458 const class ON_SubDVertex* FirstVertex()
5461 return (m_v_current = m_v_first);
5472 const class ON_SubDVertex* NextVertex()
5475 if (m_vertex_index < m_vertex_count)
5477 if (0 == m_component_ptr.m_ptr)
5479 if (
nullptr != m_v_current)
5480 m_v_current = m_v_current->m_next_vertex;
5484 const ON_SubDEdge* edge = m_component_ptr.Edge();
5485 if (
nullptr != edge)
5487 m_v_current = edge->Vertex(m_vertex_index);
5491 const ON_SubDFace* face = m_component_ptr.Face();
5492 if (
nullptr != face)
5493 m_v_current = face->Vertex(m_vertex_index);
5495 m_v_current =
nullptr;
5501 m_vertex_index = m_vertex_count;
5502 m_v_current =
nullptr;
5511 const class ON_SubDVertex* CurrentVertex()
const 5522 const class ON_SubDVertex* LastVertex()
5524 m_vertex_index = (m_vertex_count > 0) ? (m_vertex_count - 1) : 0;
5525 return (m_v_current = m_v_last);
5530 const ON_SubDRef& subd_ref,
5531 unsigned int vertex_count,
5532 const ON_SubDVertex* first,
5533 const ON_SubDVertex* last,
5534 ON_SubDComponentPtr component_ptr
5536 ON_SubDRef m_subd_ref;
5537 const ON_SubDVertex* m_v_first =
nullptr;
5538 const ON_SubDVertex* m_v_last =
nullptr;
5539 const ON_SubDVertex* m_v_current =
nullptr;
5540 unsigned int m_vertex_index = 0;
5541 unsigned int m_vertex_count = 0;
5542 ON_SubDComponentPtr m_component_ptr = ON_SubDComponentPtr::Null;
5549 class ON_SUBD_CLASS ON_SubDEdgeIterator
5555 ON_SubDEdgeIterator(
5556 const class ON_SubD& subd
5562 ON_SubDEdgeIterator(
5563 const class ON_SubDRef& subd_ref
5567 ON_SubDEdgeIterator(
5568 const class ON_SubD& subd,
5569 const class ON_SubDEdge& edge
5573 ON_SubDEdgeIterator(
5574 const class ON_SubDRef& subd_ref,
5575 const class ON_SubDEdge& edge
5579 ON_SubDEdgeIterator(
5580 const class ON_SubD& subd,
5581 const class ON_SubDVertex& vertex
5585 ON_SubDEdgeIterator(
5586 const class ON_SubDRef& subd_ref,
5587 const class ON_SubDVertex& vertex
5591 ON_SubDEdgeIterator(
5592 const class ON_SubD& subd,
5593 const class ON_SubDFace& face
5597 ON_SubDEdgeIterator(
5598 const class ON_SubDRef& subd_ref,
5599 const class ON_SubDFace& face
5602 ON_SubDEdgeIterator() =
default;
5603 ON_SubDEdgeIterator(
const ON_SubDEdgeIterator&) =
default;
5604 ON_SubDEdgeIterator& operator=(
const ON_SubDEdgeIterator&) =
default;
5606 #if defined(ON_HAS_RVALUEREF) 5608 ON_SubDEdgeIterator( ON_SubDEdgeIterator&& ) ON_NOEXCEPT;
5610 ON_SubDEdgeIterator& operator=( ON_SubDEdgeIterator&& );
5617 const class ON_SubD& SubD()
const 5619 return m_subd_ref.SubD();
5622 const class ON_SubDRef& SubDRef()
const 5635 const class ON_SubDEdge* operator++()
5637 const class ON_SubDEdge* e = m_e_current;
5646 unsigned int EdgeCount()
const 5648 return m_edge_count;
5655 unsigned int CurrentEdgeIndex()
const 5657 return m_edge_index;
5666 const class ON_SubDEdge* FirstEdge()
5669 return m_e_current = m_e_first;
5680 const class ON_SubDEdge* NextEdge()
5683 if (m_edge_index < m_edge_count)
5685 if (0 == m_component_ptr.m_ptr)
5687 if (
nullptr != m_e_current)
5688 m_e_current = m_e_current->m_next_edge;
5692 const ON_SubDVertex* vertex = m_component_ptr.Vertex();
5693 if (
nullptr != vertex)
5695 m_e_current = vertex->Edge(m_edge_index);
5699 const ON_SubDFace* face = m_component_ptr.Face();
5700 if (
nullptr != face)
5701 m_e_current = face->Edge(m_edge_index);
5703 m_e_current =
nullptr;
5709 m_edge_index = m_edge_count;
5710 m_e_current =
nullptr;
5719 const class ON_SubDEdge* CurrentEdge()
const 5730 const class ON_SubDEdge* LastEdge()
5732 m_edge_index = (m_edge_count > 0) ? (m_edge_count - 1) : 0;
5733 return m_e_current = m_e_last;
5738 const ON_SubDRef& subd_ref,
5739 unsigned int edge_count,
5740 const ON_SubDEdge* first,
5741 const ON_SubDEdge* last,
5742 ON_SubDComponentPtr component_ptr
5744 ON_SubDRef m_subd_ref;
5745 const ON_SubDEdge* m_e_first =
nullptr;
5746 const ON_SubDEdge* m_e_last =
nullptr;
5747 const ON_SubDEdge* m_e_current =
nullptr;
5748 unsigned int m_edge_index = 0;
5749 unsigned int m_edge_count = 0;
5750 ON_SubDComponentPtr m_component_ptr = ON_SubDComponentPtr::Null;
5757 class ON_SUBD_CLASS ON_SubDFaceIterator
5763 ON_SubDFaceIterator(
5764 const class ON_SubD& subd
5770 ON_SubDFaceIterator(
5771 const class ON_SubDRef& subd_ref
5775 ON_SubDFaceIterator(
5776 const class ON_SubD& subd,
5777 const class ON_SubDFace& face
5781 ON_SubDFaceIterator(
5782 const class ON_SubDRef& subd_ref,
5783 const class ON_SubDFace& face
5787 ON_SubDFaceIterator(
5788 const class ON_SubD& subd,
5789 const class ON_SubDVertex& vertex
5793 ON_SubDFaceIterator(
5794 const class ON_SubDRef& subd_ref,
5795 const class ON_SubDVertex& vertex
5799 ON_SubDFaceIterator(
5800 const class ON_SubD& subd,
5801 const class ON_SubDEdge& edge
5805 ON_SubDFaceIterator(
5806 const class ON_SubDRef& subd_ref,
5807 const class ON_SubDEdge& edge
5810 ON_SubDFaceIterator() =
default;
5811 ON_SubDFaceIterator(
const ON_SubDFaceIterator&) =
default;
5812 ON_SubDFaceIterator& operator=(
const ON_SubDFaceIterator&) =
default;
5814 #if defined(ON_HAS_RVALUEREF) 5816 ON_SubDFaceIterator( ON_SubDFaceIterator&& ) ON_NOEXCEPT;
5818 ON_SubDFaceIterator& operator=( ON_SubDFaceIterator&& );
5825 const class ON_SubD& SubD()
const 5827 return m_subd_ref.SubD();
5830 const class ON_SubDRef& SubDRef()
const 5843 const class ON_SubDFace* operator++()
5845 const class ON_SubDFace* f = m_face_current;
5854 unsigned int FaceCount()
const 5856 return m_face_count;
5863 unsigned int CurrentFaceIndex()
const 5865 return m_face_index;
5875 const class ON_SubDFace* FirstFace()
5878 return (m_face_current = m_face_first);
5889 const class ON_SubDFace* NextFace()
5892 if (m_face_index < m_face_count)
5894 if (0 == m_component_ptr.m_ptr)
5896 if (
nullptr != m_face_current)
5897 m_face_current = m_face_current->m_next_face;
5901 const ON_SubDVertex* vertex = m_component_ptr.Vertex();
5902 if (
nullptr != vertex)
5904 m_face_current = vertex->Face(m_face_index);
5908 const ON_SubDEdge* edge = m_component_ptr.Edge();
5909 if (
nullptr != edge)
5910 m_face_current = edge->Face(m_face_index);
5912 m_face_current =
nullptr;
5918 m_face_index = m_face_count;
5919 m_face_current =
nullptr;
5921 return m_face_current;
5928 const class ON_SubDFace* CurrentFace()
const 5930 return m_face_current;
5939 const class ON_SubDFace* LastFace()
5941 m_face_index = (m_face_count > 0) ? (m_face_count - 1) : 0;
5942 return (m_face_current = m_face_last);
5945 unsigned int LimitSurfaceMeshFragmentCount(
5946 ON_SubD::FacetType facet_type
5951 const ON_SubDRef& subd_ref,
5952 unsigned int face_count,
5953 const ON_SubDFace* first,
5954 const ON_SubDFace* last,
5955 ON_SubDComponentPtr component_ptr
5957 ON_SubDRef m_subd_ref;
5958 const ON_SubDFace* m_face_first =
nullptr;
5959 const ON_SubDFace* m_face_last =
nullptr;
5960 const ON_SubDFace* m_face_current =
nullptr;
5961 unsigned int m_face_index = 0;
5962 unsigned int m_face_count = 0;
5963 ON_SubDComponentPtr m_component_ptr = ON_SubDComponentPtr::Null;
5970 class ON_SUBD_CLASS ON_SubDComponentIterator
5973 static const ON_SubDComponentIterator Empty;
5978 ON_SubDComponentIterator(
5979 const class ON_SubD& subd
5981 ON_SubDComponentIterator(
5982 const class ON_SubDRef& subd_ref
5985 ON_SubDComponentIterator() =
default;
5986 ON_SubDComponentIterator(
const ON_SubDComponentIterator&) =
default;
5987 ON_SubDComponentIterator& operator=(
const ON_SubDComponentIterator&) =
default;
5989 #if defined(ON_HAS_RVALUEREF) 5991 ON_SubDComponentIterator( ON_SubDComponentIterator&& ) ON_NOEXCEPT;
5993 ON_SubDComponentIterator& operator=( ON_SubDComponentIterator&& );
6000 const class ON_SubD& SubD()
const 6002 return m_subd_ref.SubD();
6005 const class ON_SubDRef& SubDRef()
const 6014 unsigned int SubDLevel()
const 6016 return m_subd_level;
6027 const class ON_SubDComponentPtr operator++()
6029 const class ON_SubDComponentPtr cptr = m_cptr_current;
6040 const class ON_SubDComponentPtr FirstComponent();
6050 const class ON_SubDComponentPtr NextComponent();
6056 const class ON_SubDComponentPtr CurrentComponent() const
6058 return m_cptr_current;
6067 const class ON_SubDComponentPtr LastComponent();
6070 ON_SubDRef m_subd_ref;
6071 unsigned int m_subd_level = 0;
6072 const ON_SubDVertex* m_vertex_first =
nullptr;
6073 const ON_SubDVertex* m_vertex_last =
nullptr;
6074 const ON_SubDEdge* m_edge_first =
nullptr;
6075 const ON_SubDEdge* m_edge_last =
nullptr;
6076 const ON_SubDFace* m_face_first =
nullptr;
6077 const ON_SubDFace* m_face_last =
nullptr;
6078 ON_SubDComponentPtr m_cptr_current = ON_SubDComponentPtr::Null;
6086 class ON_SUBD_CLASS ON_SubDSectorIterator
6089 static const ON_SubDSectorIterator Empty;
6091 ON_SubDSectorIterator() =
default;
6092 ~ON_SubDSectorIterator() =
default;
6093 ON_SubDSectorIterator(
const ON_SubDSectorIterator&) =
default;
6094 ON_SubDSectorIterator& operator=(
const ON_SubDSectorIterator&) =
default;
6105 const ON_SubDVertex* Initialize(
6106 const ON_SubDVertex* center_vertex
6123 const ON_SubDVertex* Initialize(
6124 const ON_SubDFace* initial_face,
6125 ON__UINT_PTR iterator_orientation,
6126 const ON_SubDVertex* center_vertex
6144 const ON_SubDVertex* Initialize(
6145 const ON_SubDFace* initial_face,
6146 ON__UINT_PTR iterator_orientation,
6147 unsigned int face_vertex_index
6150 bool InitializeToCurrentFace();
6159 int CurrentRingIndex()
const;
6161 const ON_SubDVertex* CenterVertex()
const;
6163 const ON_SubDFace* InitialFace()
const;
6165 unsigned int InitialFaceCenterVertexIndex()
const;
6167 const ON_SubDFace* CurrentFace()
const;
6169 unsigned int CurrentFaceDirection()
const;
6171 ON_SubDFacePtr CurrentFacePtr()
const;
6173 unsigned int CurrentFaceCenterVertexIndex()
const;
6184 ON_SubDEdgePtr CurrentEdgePtr(
6185 unsigned int face_side_index
6213 const ON_SubDEdge* CurrentEdge(
6214 unsigned int face_side_index
6217 ON__UINT_PTR CurrentEdgeDirection(
6218 unsigned int face_side_index
6226 const ON_SubDVertex* CurrentEdgeRingVertex(
6227 unsigned int face_side_index
6254 const ON_SubDFace* NextFace(
6283 const ON_SubDFace* PrevFace(
6314 const ON_SubDFace* IncrementFace(
6315 int increment_direction,
6331 const ON_SubDFace* IncrementToCrease(
6332 int increment_direction
6339 const ON_SubDFace* FirstFace();
6341 bool IsValid()
const;
6344 const ON_SubDVertex* m_center_vertex =
nullptr;
6345 const ON_SubDFace* m_initial_face =
nullptr;
6346 const ON_SubDFace* m_current_face =
nullptr;
6352 ON_SubDEdgePtr m_current_eptr[2];
6354 unsigned int m_initial_fvi = 0;
6355 unsigned int m_current_fvi = 0;
6356 unsigned int m_current_fei[2];
6361 unsigned int m_initial_face_dir = 0;
6368 unsigned int m_current_face_dir = 0;
6370 int m_current_ring_index = 0;
6378 class ON_SUBD_CLASS ON_SubDFaceEdgeIterator
6381 ON_SubDFaceEdgeIterator();
6391 ON_SubDFaceEdgeIterator(
6392 const ON_SubDFace* face
6395 ON_SubDFaceEdgeIterator(
6396 const ON_SubDFace* face,
6397 const ON_SubDEdge* first_edge
6409 unsigned int Initialize(
6410 const ON_SubDFace* face
6413 unsigned int Initialize(
6414 const ON_SubDFace* face,
6415 const ON_SubDEdge* first_edge
6418 unsigned int EdgeCount()
const;
6424 const ON_SubDEdge* FirstEdge();
6430 const ON_SubDEdge* NextEdge();
6436 const ON_SubDEdge* PrevEdge();
6442 const ON_SubDEdge* CurrentEdge()
const;
6444 unsigned int FirstEdgeIndex()
const;
6446 unsigned int CurrentEdgeIndex()
const;
6449 const ON_SubDFace* m_face;
6450 unsigned int m_edge_count;
6451 unsigned int m_edge_index0;
6452 unsigned int m_edge_index;
6459 class ON_SUBD_CLASS ON_SubDFromMeshOptions
6464 ON_SubDFromMeshOptions() =
default;
6465 ~ON_SubDFromMeshOptions() =
default;
6466 ON_SubDFromMeshOptions(
const ON_SubDFromMeshOptions&) =
default;
6467 ON_SubDFromMeshOptions& operator=(
const ON_SubDFromMeshOptions&) =
default;
6475 static const ON_SubDFromMeshOptions Smooth;
6480 static const ON_SubDFromMeshOptions InteriorCreaseAtMeshCrease;
6483 static const ON_SubDFromMeshOptions InteriorCreaseAtMeshEdge;
6489 #pragma region RH_C_SHARED_ENUM [SubD::InteriorCreaseOption] [Rhino.Geometry.SubD.InteriorCreaseOption] [nested:byte] 6493 enum class InteriorCreaseOption : unsigned char
6512 static ON_SubDFromMeshOptions::InteriorCreaseOption InteriorCreaseOptionFromUnsigned(
6513 unsigned int interior_crease_option_as_unsigned
6520 void SetInteriorCreaseOption(
6521 ON_SubDFromMeshOptions::InteriorCreaseOption interior_crease_option
6528 ON_SubDFromMeshOptions::InteriorCreaseOption InteriorCreaseTest()
const;
6547 void SetMinimumCreaseAngleRadians(
6548 double minimum_crease_angle_radians
6565 double MinimumCreaseAngleRadians()
const;
6575 ON_SubDFromMeshOptions::InteriorCreaseOption CopyInteriorCreaseTest(
6576 ON_SubDFromMeshOptions source_options
6587 static const ON_SubDFromMeshOptions ConvexCornerAtMeshCorner;
6593 #pragma region RH_C_SHARED_ENUM [SubD::ConvexCornerOption] [Rhino.Geometry.SubD.ConvexCornerOption] [nested:byte] 6597 enum class ConvexCornerOption : unsigned char
6613 static ON_SubDFromMeshOptions::ConvexCornerOption ConvexCornerOptionFromUnsigned(
6614 unsigned int convex_corner_option_as_unsigned
6621 void SetConvexCornerOption(
6622 ON_SubDFromMeshOptions::ConvexCornerOption convex_corner_option
6629 ON_SubDFromMeshOptions::ConvexCornerOption ConvexCornerTest()
const;
6640 void SetMaximumConvexCornerEdgeCount(
6641 unsigned int maximum_convex_corner_edge_count
6653 unsigned int MaximumConvexCornerEdgeCount()
const;
6665 void SetMaximumConvexCornerAngleRadians(
6666 double maximum_convex_corner_angle_radians
6678 double MaximumConvexCornerAngleRadians()
const;
6688 ON_SubDFromMeshOptions::ConvexCornerOption CopyConvexCornerTest(
6689 ON_SubDFromMeshOptions source_parameters
6697 ON_SubD::SubDType SubDType()
const;
6700 ON_SubD::SubDType subd_type
6704 ON_SubD::SubDType m_subd_type = ON_SubD::SubDType::Unset;
6705 unsigned char m_reserved1 = 0;
6706 unsigned short m_reserved2 = 0;
6708 ON_SubDFromMeshOptions::InteriorCreaseOption m_interior_crease_option = ON_SubDFromMeshOptions::InteriorCreaseOption::None;
6709 ON_SubDFromMeshOptions::ConvexCornerOption m_convex_corner_option = ON_SubDFromMeshOptions::ConvexCornerOption::None;
6710 unsigned short m_maximum_convex_corner_edge_count = 2U;
6712 double m_minimum_crease_angle_radians = ON_PI/6.0;
6713 double m_maximum_convex_corner_angle_radians = 0.501*ON_PI;
6723 class ON_SUBD_CLASS ON_SubDComponentRef :
public ON_Geometry 6725 ON_OBJECT_DECLARE(ON_SubDComponentRef);
6727 static const ON_SubDComponentRef Empty;
6729 ON_SubDComponentRef() =
default;
6730 ~ON_SubDComponentRef() =
default;
6731 ON_SubDComponentRef(
const ON_SubDComponentRef&) ON_NOEXCEPT;
6732 ON_SubDComponentRef& operator=(
const ON_SubDComponentRef&);
6734 #if defined(ON_HAS_RVALUEREF) 6736 ON_SubDComponentRef( ON_SubDComponentRef&& ) ON_NOEXCEPT;
6741 ON_SubDComponentRef& operator=( ON_SubDComponentRef&& );
6752 static ON_SubDComponentRef Create(
6753 const ON_SubDRef& subd_ref,
6754 ON_COMPONENT_INDEX component_index,
6755 ON_SubDComponentLocation component_location
6758 static ON_SubDComponentRef Create(
6759 const ON_SubDRef& subd_ref,
6760 ON_SubDComponentPtr component_ptr,
6761 ON_SubDComponentLocation component_location
6764 static ON_SubDComponentRef Create(
6765 const ON_SubDRef& subd_ref,
6766 const class ON_SubDVertex* vertex,
6767 ON_SubDComponentLocation component_location
6770 static ON_SubDComponentRef Create(
6771 const ON_SubDRef& subd_ref,
6772 const class ON_SubDEdge* edge,
6773 ON_SubDComponentLocation component_location
6776 static ON_SubDComponentRef Create(
6777 const ON_SubDRef& subd_ref,
6778 const class ON_SubDFace* face,
6779 ON_SubDComponentLocation component_location
6784 ON_SubDRef SubDRef()
const;
6786 const class ON_SubD& SubD()
const;
6788 ON_COMPONENT_INDEX ComponentIndex()
const override;
6790 ON_SubDComponentPtr ComponentPtr()
const;
6792 ON_SubDComponentLocation ComponentLocation()
const;
6794 const class ON_SubDVertex* Vertex()
const;
6796 const class ON_SubDEdge* Edge()
const;
6798 const class ON_SubDFace* Face()
const;
6801 ON_SubDRef m_subd_ref;
6802 ON_SubDComponentPtr m_component_ptr = ON_SubDComponentPtr::Null;
6803 ON_COMPONENT_INDEX m_component_index = ON_COMPONENT_INDEX::UnsetComponentIndex;
6804 ON_SubDComponentLocation m_component_location = ON_SubDComponentLocation::Unset;
6808 bool IsValid(
class ON_TextLog* text_log =
nullptr )
const override;
6810 unsigned int SizeOf()
const override;
6811 ON::object_type ObjectType()
const override;
6814 int Dimension()
const override;
6817 bool GetBBox(
double* boxmin,
double* boxmax,
bool bGrowBox =
false )
const override;
6826 class ON_SUBD_CLASS ON_SubDComponentPoint
6829 static const ON_SubDComponentPoint Unset;
6831 ON_SubDComponentPoint() =
default;
6832 ~ON_SubDComponentPoint() =
default;
6833 ON_SubDComponentPoint(
const ON_SubDComponentPoint&) =
default;
6834 ON_SubDComponentPoint& operator=(
const ON_SubDComponentPoint&) =
default;
6841 static int CompareComponentPtr(
6842 const ON_SubDComponentPoint* a,
6843 const ON_SubDComponentPoint* b
6847 ON_SubDComponentPtr m_component_ptr = ON_SubDComponentPtr::Null;
6865 class ON_SUBD_CLASS ON_SubDMatrix
6868 ON_SubDMatrix() =
default;
6870 static const ON_SubDMatrix Empty;
6884 static bool EvaluateCosAndSin(
6891 bool IsValid()
const;
6893 bool IsValidPointRing(
6894 size_t point_ring_count,
6895 size_t point_ring_stride,
6896 const double* point_ring
6899 bool EvaluateSubdivisionPoint(
6900 unsigned int component_index,
6901 size_t point_ring_count,
6902 size_t point_ring_stride,
6903 const double* point_ring,
6904 double subd_point[3]
6907 bool EvaluateLimitPoint(
6908 size_t point_ring_count,
6909 size_t point_ring_stride,
6910 const double* point_ring,
6911 double limit_point[3],
6912 double limit_tangent1[3],
6913 double limit_tangent2[3],
6914 double limit_normal[3]
6917 bool EvaluateLimitPoint(
6918 size_t point_ring_count,
6919 size_t point_ring_stride,
6920 const double* point_ring,
6921 class ON_SubDSectorLimitPoint& limit_point
6939 static const ON_SubDMatrix& FromCache(
6940 ON_SubDSectorType sector_type
6943 ON_SubDSectorType m_sector_type;
6945 unsigned int m_R = 0;
6984 const double*
const* m_S =
nullptr;
6992 const double* m_LP =
nullptr;
7010 const double* m_L1 =
nullptr;
7011 const double* m_L2 =
nullptr;
7027 unsigned int SetFromSectorType(
7028 ON_SubDSectorType sector_type
7041 double TestMatrix()
const;
7050 double TestEvaluation()
const;
7069 static double TestEvaluation(
7070 ON_SubDSectorType sector_type,
7071 unsigned int minimum_sector_face_count,
7072 unsigned int maximum_sector_face_count,
7076 double TestComponentRing(
7077 size_t component_ring_count,
7078 const ON_SubDComponentPtr* component_ring
7097 static double TestEvaluation(
7098 ON_SubD::SubDType subd_type,
7099 const unsigned int subd_recursion_count,
7100 ON_SubDSectorIterator sit,
7103 class ON_SubDSectorLimitPoint& limit_point
7107 unsigned int m__max_R = 0;
7117 class ON_SUBD_CLASS ON_SubD_FixedSizeHeap
7120 static unsigned int m__sn_factory;
7124 const unsigned int m_sn = ++m__sn_factory;
7127 ON_SubD_FixedSizeHeap() =
default;
7128 ~ON_SubD_FixedSizeHeap();
7138 bool ReserveSubDWorkspace(
7139 ON_SubD::SubDType subd_type,
7140 unsigned int extraordinary_valence
7143 bool ReserveSubDWorkspace(
7144 size_t vertex_capacity,
7145 size_t edge_capacity,
7146 size_t face_capacity,
7147 size_t array_capacity
7164 ON_SubDVertex* AllocateVertex(
7165 const double vertexP[3],
7166 unsigned int edge_capacity,
7167 unsigned int face_capacity
7170 ON_SubDVertex* AllocateVertex(
7171 const ON_SubDVertex* vertex0,
7172 ON_SubD::SubDType subd_type,
7173 bool bUseSavedSubdivisionPoint,
7174 unsigned int edge_capacity,
7175 unsigned int face_capacity
7178 ON_SubDVertex* AllocateVertex(
7179 const ON_SubDEdge* edge0,
7180 ON_SubD::SubDType subd_type,
7181 bool bUseSavedSubdivisionPoint,
7182 unsigned int edge_capacity,
7183 unsigned int face_capacity
7186 ON_SubDVertex* AllocateVertex(
7187 const ON_SubDFace* face0,
7188 ON_SubD::SubDType subd_type,
7189 bool bUseSavedSubdivisionPoint,
7190 unsigned int edge_capacity,
7191 unsigned int face_capacity
7218 ON_SubDEdge* AllocateEdge(
7220 double v0_sector_weight,
7222 double v1_sector_weight
7229 ON_SubDFace* AllocateFace(
7230 unsigned int zero_face_id,
7231 unsigned int parent_face_id
7234 ON_SubDFace* AllocateQuad(
7235 unsigned int zero_face_id,
7236 unsigned int parent_face_id,
7237 const ON_SubDEdgePtr eptrs[4]
7240 ON_SubDFace* AllocateTri(
7241 unsigned int zero_face_id,
7242 unsigned int parent_face_id,
7243 const ON_SubDEdgePtr eptrs[3]
7256 ON__UINT_PTR* AllocatePtrArray(
7257 unsigned int capacity,
7272 bool ReturnPtrArray(
7273 unsigned int capacity,
7280 ON_SubDVertex* m_v =
nullptr;
7281 unsigned int m_v_capacity = 0;
7282 unsigned int m_v_index = 0;
7284 ON_SubDEdge* m_e =
nullptr;
7285 unsigned int m_e_capacity = 0;
7286 unsigned int m_e_index = 0;
7288 ON_SubDFace* m_f =
nullptr;
7289 unsigned int m_f_capacity = 0;
7290 unsigned int m_f_index = 0;
7292 ON__UINT_PTR* m_p =
nullptr;
7293 unsigned int m_p_capacity = 0;
7294 unsigned int m_p_index = 0;
7298 ON_SubD_FixedSizeHeap(
const ON_SubD_FixedSizeHeap&) =
delete;
7299 ON_SubD_FixedSizeHeap& operator=(
const ON_SubD_FixedSizeHeap&) =
delete;
7302 #if defined(ON_COMPILING_OPENNURBS) 7307 class ON_SubDMeshProxyUserData :
public ON_UserData 7314 static ON_Mesh* MeshProxyFromSubD(
7322 static ON_SubD* SubDFromMeshProxy(
7330 static bool IsSubDMeshProxy(
7334 static const ON_SubDDisplayParameters MeshProxyDisplayParameters();
7337 ON_OBJECT_DECLARE(ON_SubDMeshProxyUserData);
7340 ON_SubDMeshProxyUserData();
7341 ~ON_SubDMeshProxyUserData();
7342 ON_SubDMeshProxyUserData(
const ON_SubDMeshProxyUserData&);
7343 ON_SubDMeshProxyUserData& operator=(
const ON_SubDMeshProxyUserData&);
7349 bool IsValid(
class ON_TextLog* text_log =
nullptr )
const override;
7351 bool ParentMeshValid()
const;
7355 bool GetDescription(
ON_wString& description)
override;
7356 bool WriteToArchive(
7363 mutable ON_SubD* m_subd =
nullptr;
7367 mutable unsigned int m_mesh_face_count = 0;
7368 mutable unsigned int m_mesh_vertex_count = 0;
7373 void Internal_CopyFrom(
const ON_SubDMeshProxyUserData& src);
7374 void Internal_Destroy();
7375 static const bool Internal_MeshHasFaces(
const ON_Mesh* mesh);
Definition: opennurbs_progress_reporter.h:25
static const ON_SHA1_Hash EmptyContentHash
Definition: opennurbs_sha1.h:23
Definition: opennurbs_nurbssurface.h:62
Definition: opennurbs_rtree.h:398
static const ON_Interval ZeroToOne
Definition: opennurbs_point.h:50
Definition: opennurbs_array.h:36
Definition: opennurbs_sha1.h:19
Definition: opennurbs_string.h:2020
static const ON_PickPoint Unset
Definition: opennurbs_xform.h:1323
Base class for all geometry classes that must provide runtime class id. Provides interface for common...
Definition: opennurbs_geometry.h:37
Definition: opennurbs_xform.h:1320
Definition: opennurbs_compstat.h:396
Definition: opennurbs_bounding_box.h:25
Definition: opennurbs_mesh.h:2188
Definition: opennurbs_compstat.h:88
Definition: opennurbs_matrix.h:22
Definition: opennurbs_brep.h:1472
Pure virtual base class for all classes that must provide runtime class id or support object level 3D...
Definition: opennurbs_object.h:460
Definition: opennurbs_terminator.h:20
Definition: opennurbs_textlog.h:20
Definition: opennurbs_archive.h:1783
Definition: opennurbs_bezier.h:1061
Definition: opennurbs_userdata.h:20
static const ON_ComponentStatus NoneSet
Definition: opennurbs_compstat.h:92
Definition: opennurbs_objref.h:163
Definition: opennurbs_point.h:460
Definition: opennurbs_point.h:46