17 #if !defined(OPENNURBS_MESH_INC_) 18 #define OPENNURBS_MESH_INC_ 42 render_mesh_quality = 2,
44 render_mesh_custom = 9,
45 render_mesh_per_object = 10
49 unsigned int mesh_style_as_unsigned
60 unspecified_mesh_parameter_id = 0,
66 bComputeCurvature_parameter_id = 1,
67 bSimplePlanes_parameter_id = 2,
68 bRefine_parameter_id = 3,
69 bJaggedSeams_parameter_id = 4,
70 bDoublePrecision_parameter_id = 5,
71 mesher_parameter_id = 6,
72 texture_range_parameter_id = 7,
73 tolerance_parameter_id = 8,
74 relative_tolerance_parameter_id = 9,
75 min_tolerance_parameter_id = 10,
76 min_edge_length_parameter_id = 11,
77 max_edge_length_parameter_id = 12,
78 grid_aspect_ratio_parameter_id = 13,
79 grid_min_count_parameter_id = 14,
80 grid_max_count_parameter_id = 15,
81 grid_angle_parameter_id = 16,
82 grid_amplification_parameter_id = 17,
83 refine_angle_parameter_id = 18,
84 face_type_parameter_id = 19,
85 srf_domain_parameter_id = 20,
86 bClosedObjectPostProcess_id = 21,
99 crv_tess_min_num_segments_parameter_id = 23,
100 crv_tess_angle_tol_in_degrees_parameter_id = 24,
101 crv_tess_max_dist_between_points_parameter_id = 25,
104 crv_tess_min_parametric_ratio_parameter_id = 26,
105 bEvaluatorBasedTessellation_parameter_id = 27,
106 srf_tess_chord_height_parameter_id = 28,
109 srf_tess_angle_tol_in_degrees_parameter_id = 29,
110 srf_tess_max_edge_length_parameter_id = 30,
111 srf_tess_min_edge_length_parameter_id = 31,
112 srf_tess_min_edge_length_ratio_uv_parameter_id = 32,
113 srf_tess_max_aspect_ratio_parameter_id = 33,
114 smoothing_passes_parameter_id = 34,
120 max_mesh_parameter_id
124 unsigned int mesh_parameter_id_as_unsigned
172 double ToleranceFromObjectSize(
double relative_tolerance,
double actual_size );
188 double MinimumEdgeLengthFromTolerance(
double max_edge_length,
double tolerance );
208 double min_edge_length = ON_UNSET_VALUE
231 static int CompareGeometrySettings(
268 const int GeometrySettingsDensityPercentage(
269 int no_match_found_result
275 ON__UINT32 DataCRC(ON__UINT32)
const;
295 const bool CustomSettings()
const;
296 void SetCustomSettings(
312 const bool CustomSettingsEnabled()
const;
313 void SetCustomSettingsEnabled(
314 bool bCustomSettingsEnabled
329 const bool ComputeCurvature()
const;
330 void SetComputeCurvature(
331 bool bComputeCurvature
339 const bool SimplePlanes()
const;
340 void SetSimplePlanes(
347 const bool Refine()
const;
359 const bool JaggedSeams()
const;
371 const bool DoublePrecision()
const;
372 void SetDoublePrecision(
373 bool bDoublePrecision
377 const unsigned int Mesher()
const;
403 const unsigned int TextureRange()
const;
404 void SetTextureRange(
405 unsigned int texture_range
407 const bool TextureRangeIsValid()
const;
408 void SetTextureRangePictureFrameHack();
415 const bool ClosedObjectPostProcess()
const;
416 void SetClosedObjectPostProcess(
417 bool bClosedObjectPostProcess
423 const double Tolerance()
const;
437 const double RelativeTolerance()
const;
438 void SetRelativeTolerance(
439 double relative_tolerance
442 const double MinimumTolerance()
const;
443 void SetMinimumTolerance(
444 double minimum_tolerance
450 const double MinimumEdgeLength()
const;
451 void SetMinimumEdgeLength(
452 double minimum_edge_length
466 unsigned int SubDDisplayMeshDensity()
const;
472 const double MaximumEdgeLength()
const;
473 void SetMaximumEdgeLength(
474 double maximum_edge_length
486 const double GridAspectRatio()
const;
487 void SetGridAspectRatio(
488 double grid_aspect_ratio
492 const int GridMinCount()
const;
493 void SetGridMinCount(
498 const int GridMaxCount()
const;
499 void SetGridMaxCount(
506 const double GridAngleRadians()
const;
507 void SetGridAngleRadians(
508 double grid_angle_radians
514 const double GridAngleDegrees()
const;
515 void SetGridAngleDegrees(
516 double grid_angle_degrees
524 const double GridAmplification()
const;
525 void SetGridAmplification(
526 double grid_amplification
537 const double RefineAngleRadians()
const;
538 void SetRefineAngleRadians(
539 double refine_angle_radians
541 const double RefineAngleDegrees()
const;
542 void SetRefineAngleDegrees(
543 double refine_angle_degrees
554 const unsigned int FaceType()
const;
556 unsigned int face_type
561 void Internal_SetBoolHelper(
bool b,
bool* dest);
562 void Internal_SetCharHelper(
unsigned int u,
unsigned char minc,
unsigned char maxc,
unsigned char*);
563 void Internal_SetDoubleHelper(
double x,
double minx,
double maxx,
double* dest);
564 void Internal_SetIntHelper(
int i,
int mini,
int maxi,
int* dest);
571 bool m_bCustomSettings =
false;
572 bool m_bCustomSettingsEnabled =
true;
573 bool m_bComputeCurvature =
false;
574 bool m_bSimplePlanes =
false;
576 bool m_bRefine =
true;
577 bool m_bJaggedSeams =
false;
578 bool m_bDoublePrecision =
false;
579 bool m_bClosedObjectPostProcess =
false;
581 ON_UUID m_mesher_id = ON_nil_uuid;
583 unsigned char m_mesher = 0;
584 unsigned char m_texture_range = 2;
585 unsigned char m_face_type = 0;
587 unsigned char m_reserved1 = 0;
589 int m_grid_min_count = 0;
590 int m_grid_max_count = 0;
593 ON__UINT32 m_reserved2 = 0;
595 double m_tolerance = 0.0;
596 double m_relative_tolerance = 0.0;
597 double m_min_tolerance = 0.0;
598 double m_min_edge_length = 0.0001;
599 double m_max_edge_length = 0.0;
600 double m_grid_aspect_ratio = 6.0;
601 double m_grid_angle_radians = 20.0*ON_PI/180.0;
602 double m_grid_amplification = 1.0;
603 double m_refine_angle_radians = 20.0*ON_PI/180.0;
610 bool m_reserved3 =
false;
611 bool m_reserved4 =
false;
619 bool m_bEvaluatorBasedTessellation =
false;
620 int m_curve_tess_min_num_segments = 0;
621 double m_curve_tess_angle_tol_in_degrees = 20.0;
622 double m_curve_tess_max_dist_between_points = 0.0;
623 double m_curve_tess_min_parametric_ratio = 0.00001;
624 double m_surface_tess_angle_tol_in_degrees = 20.0;
625 double m_surface_tess_max_edge_length = 0.0;
626 double m_surface_tess_min_edge_length = 0.0;
627 double m_surface_tess_min_edge_length_ratio_uv = 0.0001;
628 double m_surface_tess_max_aspect_ratio = 0.0;
629 int m_smoothing_passes = 0;
632 void Internal_AccumulatePangolinParameters(
643 ON__UINT_PTR m_reserved5 = 0;
661 void EmergencyDestroy();
663 bool Set( ON::curvature_style,
673 ON::curvature_style m_style;
677 int m_count_infinite;
773 bool IsTriangle()
const;
793 bool IsValid( )
const;
810 bool IsTriangle()
const;
837 int mesh_vertex_count
840 unsigned int mesh_vertex_count
843 int mesh_vertex_count,
847 int mesh_vertex_count,
875 int mesh_vertex_count
878 int mesh_vertex_count,
882 int mesh_vertex_count,
920 double planar_tolerance,
921 double angle_tolerance_radians,
938 unsigned int GetCornerNormals(
943 bool GetPlaneEquation(
956 unsigned int m_vi[3];
974 size_t mesh_vertex_count
978 size_t mesh_vertex_count,
983 size_t mesh_vertex_count,
1009 bool GetTriangleNormal(
1014 bool GetTriangleNormal(
1019 bool GetTriangleNormal(
1024 static bool GetTriangleNormal(
1037 : m_bQuadFaces(
false)
1049 unsigned int SetFromTriangleList(
1050 size_t triangle_count,
1051 size_t triangle_stride,
1052 const unsigned int* triangles
1055 unsigned int SetFromQuadList(
1058 const unsigned int* quads
1061 unsigned int SetFromMesh(
1065 inline const unsigned int* Fvi(
unsigned int face_index)
const 1067 return (face_index < m_face_count) ? (m_faces + (face_index*m_face_stride)) : 0;
1070 inline unsigned int* QuadFvi(
unsigned int face_index,
unsigned int buffer[4])
const 1072 if ( face_index < m_face_count )
1074 const unsigned int* p = m_faces + (face_index*m_face_stride);
1078 buffer[3] = m_bQuadFaces ? *(++p) : buffer[2];
1082 buffer[0] = buffer[1] = buffer[2] = buffer[3] = 0;
1088 inline bool IsQuad(
unsigned int face_index)
const 1090 if ( m_bQuadFaces && face_index < m_face_count )
1092 const unsigned int* p = m_faces + (face_index*m_face_stride);
1093 return p[2] != p[3];
1098 inline unsigned int FaceCount()
const 1100 return m_face_count;
1103 inline unsigned int FaceVertexCount()
const 1105 return m_bQuadFaces?4:3;
1108 size_t FaceStride()
const 1110 return m_face_stride;
1127 unsigned int GetVertexIndexInterval(
1128 unsigned int minimum_valid_vertex_index,
1129 unsigned int maximum_valid_vertex_index,
1130 unsigned int* minimum_vertex_index,
1131 unsigned int* maximum_vertex_index
1136 unsigned int m_face_count;
1137 unsigned int m_face_stride;
1138 const unsigned int* m_faces;
1147 ON_MeshVertexFaceMap& operator=(const ON_MeshVertexFaceMap&);
1149 #if defined(ON_HAS_RVALUEREF) 1151 ON_MeshVertexFaceMap( ON_MeshVertexFaceMap&& ) ON_NOEXCEPT;
1152 ON_MeshVertexFaceMap& operator=( ON_MeshVertexFaceMap&& ) ON_NOEXCEPT;
1157 bool bMapInvalidFaces
1160 bool SetFromFaceList(
1161 unsigned int vertex_count,
1163 bool bMapInvalidFaces
1172 unsigned int VertexCount()
const;
1178 unsigned int FaceCount()
const;
1189 unsigned int VertexFaceCount(
1190 unsigned int vertex_index
1205 const unsigned int* VertexFaceList(
1206 unsigned int vertex_index
1222 const unsigned int *
const* VertexFaceMap()
const;
1225 unsigned int m_vertex_count;
1226 unsigned int m_face_count;
1227 const unsigned int *
const* m_vertex_face_map;
1229 void m_copy(
const ON_MeshVertexFaceMap&);
1230 void* m_alloc(
size_t);
1244 unsigned int face_index
1249 unsigned int face_index
1253 const unsigned int triangle_vertex_indices[3],
1254 unsigned int face_index
1258 const unsigned int quad_vertex_indices[4],
1259 unsigned int face_index
1263 ON__UINT_PTR m_ngon_buffer[10];
1270 unsigned int m_Vcount;
1271 unsigned int m_Fcount;
1292 unsigned int Capacity()
const;
1303 ON__UINT32 CRC32()
const;
1318 unsigned int BoundaryEdgeCount(
1329 unsigned int BoundaryEdgeCount(
1337 unsigned int OuterBoundaryEdgeCount()
const;
1387 void ReverseOuterBoundary();
1407 unsigned int GetOuterBoundaryPoints(
1409 bool bAppendStartPoint,
1432 unsigned int GetOuterBoundaryPoints(
1434 bool bAppendStartPoint,
1455 unsigned int GetBoundarySides(
1465 static unsigned int FindPlanarNgons(
1468 const unsigned int *
const* vertex_face_map,
1469 double planar_tolerance,
1470 unsigned int minimum_ngon_vertex_count,
1471 unsigned int minimum_ngon_face_count,
1498 static unsigned int FindNgonOuterBoundary(
1501 const unsigned int *
const* vertex_face_map,
1502 size_t ngon_fi_count,
1503 const unsigned int* ngon_fi,
1533 unsigned int mesh_face_index,
1534 const unsigned int* fvi
1560 unsigned int mesh_face_index,
1561 const unsigned int* fvi
1584 ON_COMPONENT_INDEX ci,
1644 unsigned int ngon_index,
1646 unsigned int mesh_vertex_count,
1647 unsigned int mesh_face_count,
1653 unsigned int ngon_index,
1655 unsigned int mesh_vertex_count,
1656 unsigned int mesh_face_count,
1674 unsigned int Vcount,
1685 unsigned int Vcount,
1695 bool DeallocateNgon(
1715 void DeallocateAllNgons();
1717 #if defined(ON_HAS_RVALUEREF) 1741 unsigned int m_vi[2];
1743 unsigned char m_side;
1745 unsigned char m_dir;
1746 unsigned short m_value;
1769 static int CompareFaceIndex(
1792 static int CompareVertexIndex(
1809 static void SortByVertexIndex(
1811 size_t face_sides_count
1826 static void SortByFaceIndex(
1828 size_t face_sides_count
1880 static unsigned int GetFaceSideList(
1881 size_t mesh_vertex_count,
1883 const unsigned int* fi_list,
1884 size_t fi_list_count,
1885 const unsigned int* vertex_id_map,
1901 #if defined(ON_DLL_TEMPLATE) 1918 bool IsValid()
const;
1928 int TopVertexCount()
const;
1932 int TopEdgeCount()
const;
1936 int TopFaceCount()
const;
1939 ON_COMPONENT_INDEX ci
1978 bool GetTopFaceVertices(
1995 unsigned int NgonIndexFromTopologyVertexIndex(
1997 const unsigned int* mesh_facedex_to_ngondex_map
2012 unsigned int NgonIndexFromTopologyEdgeIndex(
2014 const unsigned int* mesh_facedex_to_ngondex_map
2030 bool SortVertexEdges(
int topvi )
const;
2042 bool SortVertexEdges()
const;
2055 bool TopVertexIsHidden(
int topvi )
const;
2068 bool TopEdgeIsHidden(
int topei )
const;
2081 bool TopFaceIsHidden(
int topfi )
const;
2092 ON_SimpleArray<ON_MeshTopologyVertex> m_topv;
2097 ON_SimpleArray<ON_MeshTopologyEdge> m_tope;
2106 ON_SimpleArray<ON_MeshTopologyFace> m_topf;
2119 int* GetIntArray(
int count);
2126 void EmergencyDestroy();
2131 struct memchunk* next;
2135 volatile int m_b32IsValid;
2139 int WaitUntilReady(
int sleep_value)
const;
2156 int m_partition_max_vertex_count;
2158 int m_partition_max_triangle_count;
2168 ON_SimpleArray<struct ON_MeshPart> m_part;
2181 void Transform(
const ON_Xform& xform );
2189 void SetDefaultSurfaceParameterMappingTag();
2192 bool bCompareId =
true,
2193 bool bCompareCRC =
true,
2194 bool bCompareXform =
true 2209 bool IsDefaultSurfaceParameterMapping()
const;
2221 ON__UINT32 m_mapping_crc;
2236 #if defined(ON_DLL_TEMPLATE) 2248 int initial_face_array_capacity,
2249 int initial_vertex_array_capacity,
2250 bool has_vertex_normals,
2251 bool has_texture_coordinates
2259 void MemoryRelocate()
override;
2262 void DestroyRuntimeCache(
bool bDelete =
true )
override;
2265 void EmergencyDestroy();
2275 void DestroyTree(
bool bDeleteTree =
true );
2281 unsigned int SizeOf()
const override;
2284 ON__UINT32 DataCRC(ON__UINT32 current_remainder)
const override;
2286 bool IsValid(
class ON_TextLog* text_log =
nullptr )
const override;
2294 ON::object_type ObjectType()
const override;
2299 int Dimension()
const override;
2302 bool GetBBox(
double* boxmin,
double* boxmax,
bool bGrowBox =
false )
const override;
2305 bool GetTightBoundingBox(
class ON_BoundingBox& tight_bbox,
bool bGrowBox =
false,
const class ON_Xform* xform =
nullptr )
const override;
2307 bool GetTightBoundingBox(
2319 bool IsDeformable()
const override;
2322 bool MakeDeformable()
override;
2324 bool SwapCoordinates(
2341 bool IsEmpty()
const;
2352 bool SetVertexNormal(
2356 bool SetVertexNormal(
2360 bool SetTextureCoord(
2389 unsigned int AppendDuplicateVertex(
2390 unsigned int vertex_index
2406 bool ReserveVertexCapacity(
2407 size_t new_vertex_capacity
2417 bool IsValidMeshComponentIndex(
2418 ON_COMPONENT_INDEX ci
2422 ON_COMPONENT_INDEX ci
2435 ON_COMPONENT_INDEX ci
2466 bool DeleteComponents(
2467 const ON_COMPONENT_INDEX* ci_list,
2469 bool bIgnoreInvalidComponents,
2470 bool bRemoveDegenerateFaces,
2471 bool bRemoveUnusedVertices,
2472 bool bRemoveEmptyNgons
2483 bool DeleteComponents(
2484 const ON_COMPONENT_INDEX* ci_list,
2496 bool DeleteComponents(
2508 bool DeleteComponent(
2509 ON_COMPONENT_INDEX ci
2530 const ON_COMPONENT_INDEX* ci_list,
2532 class ON_Mesh* destination_mesh
2553 class ON_Mesh* destination_mesh
2557 int VertexCount()
const;
2558 unsigned int VertexUnsignedCount()
const;
2559 int FaceCount()
const;
2560 unsigned int FaceUnsignedCount()
const;
2561 int QuadCount()
const;
2562 int TriangleCount()
const;
2563 int InvalidFaceCount()
const;
2564 bool HasVertexNormals()
const;
2565 bool HasFaceNormals()
const;
2566 bool HasTextureCoordinates()
const;
2567 bool HasSurfaceParameters()
const;
2568 bool HasPrincipalCurvatures()
const;
2569 bool HasVertexColors()
const;
2575 bool HasNgons()
const;
2581 int HiddenVertexCount()
const;
2583 bool GetCurvatureStats(
2584 ON::curvature_style,
2588 void InvalidateVertexBoundingBox();
2590 void InvalidateVertexNormalBoundingBox();
2592 void InvalidateTextureCoordinateBoundingBox();
2594 void InvalidateCurvatureStats();
2596 void InvalidateBoundingBoxes();
2601 void FlipVertexNormals();
2602 void FlipFaceNormals();
2603 void FlipFaceOrientation();
2604 void FlipNgonOrientation();
2608 void DeleteMeshParameters();
2611 bool UnitizeVertexNormals();
2612 bool UnitizeFaceNormals();
2619 bool ConvertQuadsToTriangles();
2668 unsigned int ConvertNonPlanarQuadsToTriangles(
2669 double planar_tolerance,
2670 double angle_tolerance_radians,
2671 unsigned int split_method
2674 unsigned int ConvertNonPlanarQuadsToTriangles(
2675 double planar_tolerance,
2676 double angle_tolerance_radians,
2677 unsigned int split_method,
2678 bool bDeleteNgonsContainingSplitQuads
2696 bool ConvertTrianglesToQuads(
2697 double angle_tol_radians,
2698 double min_diagonal_length_ratio
2701 bool ComputeFaceNormals();
2702 bool ComputeFaceNormal(
int);
2719 int GetClashingFacePairs(
2745 int CullClashingFaces(
int what_to_cull );
2747 unsigned int CullDegenerateFaces();
2749 int CullUnusedVertices();
2770 bool bRemoveDegenerateFaces,
2786 bool ComputeVertexNormals();
2791 bool NormalizeTextureCoordinates();
2798 bool TransposeTextureCoordinates();
2799 bool TransposeSurfaceParameters();
2809 bool ReverseTextureCoordinates(
int dir );
2810 bool ReverseSurfaceParameters(
int dir );
2831 bool SetTextureCoordinates(
2833 const class ON_Xform* mesh_xform = 0,
2837 bool HasCachedTextureCoordinates()
const;
2845 const class ON_Xform* mesh_xform = 0,
2849 bool EvaluateMeshGeometry(
const ON_Surface& );
2853 bool CombineCoincidentVertices(
2874 bool CombineIdenticalVertices(
2875 bool bIgnoreVertexNormals =
false,
2876 bool bIgnoreTextureCoordinates =
false 2879 void Append(
const ON_Mesh& );
2893 void Append(
int count,
const ON_Mesh*
const* meshes );
2909 void SetClosed(
int closed);
2915 bool IsClosed()
const;
2921 bool IsManifold()
const;
2928 bool IsOriented()
const;
2952 bool bTopologicalTest,
2953 bool* pbIsOriented =
nullptr,
2954 bool* pbHasBoundary =
nullptr 2974 void SetSolidOrientation(
int solid_orientation);
2986 int SolidOrientation()
const;
2999 bool IsSolid()
const;
3027 bool bStrictlyInside
3058 const int* vertex_index,
3105 unsigned int* GetVertexLocationIds(
3106 unsigned int first_vid,
3108 unsigned int* Vindex
3139 unsigned int GetMeshFaceSideList(
3140 const unsigned int* Vid,
3159 bool CollapseEdge(
int topei );
3172 bool IsSwappableEdge(
int topei );
3186 bool SwapEdge(
int topei );
3201 bool DeleteFace(
int meshfi );
3207 void DestroyHiddenVertexArray();
3216 const bool* HiddenVertexArray()
const;
3225 void SetVertexHiddenFlag(
int meshvi,
bool bHidden );
3236 bool VertexIsHidden(
int meshvi )
const;
3250 bool FaceIsHidden(
int meshvi )
const;
3271 void DestroyTopology();
3280 bool TopologyExists()
const;
3281 bool HasMeshTopology()
const;
3297 void DestroyPartition();
3349 const class ON_V4V5_MeshNgonList* V4V5_NgonList()
const;
3359 class ON_V4V5_MeshNgonList* V4V5_ModifyNgonList();
3365 void V4V5_DestroyNgonList();
3399 int GetConnectedComponents(
bool bUseVertexConnections,
3400 bool bTopologicalConnections,
3426 int GetConnectedComponents(
bool bUseVertexConnections,
3427 bool bTopologicalConnections,
3442 bool HasSynchronizedDoubleAndSinglePrecisionVertices()
const;
3452 bool HasDoublePrecisionVertices()
const;
3454 bool HasSinglePrecisionVertices()
const;
3465 void UpdateSinglePrecisionVertices();
3475 void UpdateDoublePrecisionVertices();
3481 void DestroyDoublePrecisionVertices();
3550 ON_SimpleArray<ON_MeshFace> m_F;
3569 int NgonCount()
const;
3574 unsigned int NgonUnsignedCount()
const;
3600 unsigned int ngon_index
3610 unsigned int NgonBoundaryEdgeCount(
3611 unsigned int ngon_index
3616 ON_COMPONENT_INDEX ci
3637 unsigned int Vcount,
3638 const unsigned int* ngon_vi,
3639 unsigned int Fcount,
3640 const unsigned int* ngon_fi
3644 unsigned int ngon_index,
3645 unsigned int Vcount,
3646 const unsigned int* ngon_vi,
3647 unsigned int Fcount,
3648 const unsigned int* ngon_fi
3652 unsigned int ngon_index,
3662 unsigned int ngon_index,
3671 unsigned int ngon_index
3687 unsigned int ngon_index
3713 unsigned int GetNgonBoundaryPoints(
3715 bool bAppendStartPoint,
3735 unsigned int GetNgonBoundaryPoints(
3737 bool bAppendStartPoint,
3766 unsigned int ngon_index
3769 unsigned int RemoveNgons(
3770 unsigned int ngon_index_count,
3771 const unsigned int* ngon_index_list
3778 void RemoveEmptyNgons();
3786 void RemoveAllNgons();
3801 unsigned int ngon_count
3814 unsigned int NgonIndexFromFaceIndex(
3815 unsigned int face_index
3827 const unsigned int* NgonMap()
const;
3829 const unsigned int* NgonMap(
3830 bool bCreateIfMissing
3841 bool IsValidNewNgonInformation(
3842 unsigned int Vcount,
3843 const unsigned int* ngon_vi,
3844 unsigned int Fcount,
3845 const unsigned int* ngon_fi
3888 unsigned int AddPlanarNgons(
3889 const unsigned int *
const* vertex_face_map,
3890 double planar_tolerance,
3891 unsigned int minimum_ngon_vertex_count,
3892 unsigned int minimum_ngon_face_count,
3927 unsigned int** vertex_face_map,
3928 unsigned int ngon_index0,
3929 unsigned int ngon_index1
3953 bool SetNgonVertexNormals(
3954 unsigned int ngon_index0,
3955 unsigned int ngon_index1
3990 bool RemoveNgonInteriorVertices(
3991 const unsigned int *
const* vertex_face_map,
3992 unsigned int ngon_index0,
3993 unsigned int ngon_index1
4010 unsigned int GetNgonOuterBoundary(
4011 unsigned int ngon_fi_count,
4012 const unsigned int* ngon_fi,
4029 unsigned int Vcount,
4040 bool DeallocateNgon(
4054 unsigned int AddNgon(
4070 const unsigned int* CreateNgonMap();
4081 void RemoveNgonMap();
4094 ON_SimpleArray<ON_MeshNgon*> m_Ngon;
4132 ON_ClassArray<ON_TextureCoordinates> m_TC;
4169 double m_srf_scale[2];
4209 bool m_packed_tex_rotate;
4219 bool HasPackedTextureRegion()
const;
4237 bool SetSurfaceParamtersFromTextureCoodinates();
4277 int m_invalid_count;
4279 int m_triangle_count;
4282 char m_mesh_is_closed;
4283 char m_mesh_is_manifold;
4284 char m_mesh_is_oriented;
4285 char m_mesh_is_solid;
4316 bool SwapEdge_Helper(
int,
bool );
4328 static const ON_UUID RenderMeshId;
4329 static const ON_UUID AnalysisMeshId;
4330 static const ON_UUID PreviewMeshId;
4331 static const ON_UUID AnyMeshId;
4334 static const ON_UUID CoarseMeshId;
4337 static const ON_UUID FineMeshId;
4345 static ON_UUID MeshIdFromMeshType(
4346 ON::mesh_type mesh_type
4355 #if defined(ON_HAS_RVALUEREF) 4371 const std::shared_ptr<ON_Mesh>& mesh_sp
4374 ON::mesh_type mesh_type,
4375 const std::shared_ptr<ON_Mesh>& mesh_sp
4388 ON::mesh_type mesh_type
4391 void ClearAllMeshes();
4421 ON::mesh_type mesh_type,
4437 void ClearAllMeshes(
4450 ON::mesh_type mesh_type
4459 std::shared_ptr<ON_Mesh> MeshSharedPtr(
4463 std::shared_ptr<ON_Mesh> MeshSharedPtr(
4464 ON::mesh_type mesh_type
4467 unsigned int MeshCount()
const;
4486 void Internal_CopyHelper(
4487 const class ON_MeshCacheItem* src_item_list
4490 class ON_MeshCacheItem* Internal_FindHelper(
4494 class ON_MeshCacheItem* Internal_CreateItem();
4495 class ON_MeshCacheItem* Internal_CopyItem(
const class ON_MeshCacheItem& src_item);
4497 void Internal_DeleteItem(
class ON_MeshCacheItem*,
bool bDeleteMesh);
4499 class ON_MeshCacheItem* m_impl =
nullptr;
4540 const unsigned int* meshfdex_to_meshngondex_map
4601 ON_COMPONENT_INDEX CurrentNgonComponentIndex()
const;
4612 bool CurrentNgonIsMeshFace()
const;
4620 bool CurrentNgonIsMeshNgon()
const;
4639 unsigned int Count()
const;
4642 const class ON_Mesh* m_mesh =
nullptr;
4643 const unsigned int* m_facedex_to_ngondex_map =
nullptr;
4644 ON__UINT_PTR m_current_ngon = 0;
4646 ON_COMPONENT_INDEX m_current_ngon_ci = ON_COMPONENT_INDEX::UnsetComponentIndex;
4647 unsigned int m_mesh_face_count = 0;
4648 unsigned int m_mesh_ngon_count = 0;
4649 unsigned int m_iterator_index = 0;
4661 ON_COMPONENT_INDEX ci
4671 ON_COMPONENT_INDEX m_mesh_ci;
4676 ON_COMPONENT_INDEX ci
4683 const class ON_Mesh* Mesh()
const;
4693 ON_COMPONENT_INDEX ComponentIndex()
const override;
4709 unsigned int VertexIndex()
const;
4727 unsigned int GetVertexPoint(
4747 unsigned int MeshTopologyVertexIndex()
const;
4756 unsigned int GetMeshTopologyVertexPoint(
4767 unsigned int GetMeshTopologyVertex(
4778 unsigned int GetMeshTopologyVertexAndPoint(
4789 unsigned int MeshTopologyEdgeIndex()
const;
4798 unsigned int GetMeshTopologyEdge(
4802 unsigned int GetMeshTopologyEdgeLine(
4814 unsigned int GetMeshTopologyEdgeAndLine(
4841 unsigned int MeshFaceIndex()
const;
4863 unsigned int GetMeshFace(
4877 unsigned int MeshNgonIndex()
const;
4892 bool IsValid(
class ON_TextLog* text_log =
nullptr )
const override;
4894 unsigned int SizeOf()
const override;
4895 ON::object_type ObjectType()
const override;
4898 int Dimension()
const override;
4901 bool GetBBox(
double* boxmin,
double* boxmax,
bool bGrowBox =
false )
const override;
4924 ON_Mesh* ON_ControlPolygonMesh(
4970 bool ON_GetTrianglePlaneEquation(
4978 double* evaluation_tol
Definition: opennurbs_point.h:2231
Definition: opennurbs_mesh.h:1866
Definition: opennurbs_point.h:2374
Definition: opennurbs_fpoint.h:832
ON_UUID is a 16 byte universally unique identifier.
Definition: opennurbs_uuid.h:32
Definition: opennurbs_point.h:1933
Definition: opennurbs_bounding_box.h:606
void AppendToString(class ON_String &s) const
Definition: opennurbs_mesh.h:2172
Definition: opennurbs_mesh.h:4494
Definition: opennurbs_mesh.h:720
Definition: opennurbs_nurbssurface.h:62
Definition: opennurbs_mesh.h:2123
Definition: opennurbs_mesh.h:4351
Definition: opennurbs_mesh.h:1847
static const ON_UUID PangolinMesherId
{EB6F6F3F-F975-4546-9D1C-64E9423BEB7F}
Definition: opennurbs_mesh.h:34
Definition: opennurbs_sha1.h:19
Definition: opennurbs_point.h:2356
Definition: opennurbs_mesh.h:4193
TYPE
Definition: opennurbs_texture_mapping.h:75
ON_wString ToWideString() const
MESH_STYLE
Definition: opennurbs_mesh.h:36
Definition: opennurbs_fpoint.h:211
Definition: opennurbs_string.h:2020
static const ON_BoundingBox UnsetBoundingBox
Definition: opennurbs_bounding_box.h:29
static unsigned int IsValid(const ON_MeshNgon *ngon, unsigned int ngon_index, ON_TextLog *text_log, unsigned int mesh_vertex_count, unsigned int mesh_face_count, const ON_MeshFace *mesh_F)
Test ngon to see if the vertex and face references are valid and pass partial boundary validity check...
Base class for all geometry classes that must provide runtime class id. Provides interface for common...
Definition: opennurbs_geometry.h:37
static class ON_MeshNgon ** NgonListFromMeshFace(class ON_MeshNgonBuffer &ngon_buffer, unsigned int mesh_face_index, const unsigned int *fvi)
Create an array of a single ngon pointer that contains a triangle (3-gon) or quad (4-gon) from a mesh...
Definition: opennurbs_fsp.h:19
Definition: opennurbs_mesh.h:1245
Definition: opennurbs_mesh.h:706
Definition: opennurbs_point.h:2018
static const ON_UUID RhinoLegacyMesherId
surface meshing perameters
Definition: opennurbs_mesh.h:31
Definition: opennurbs_mesh.h:1124
MESH_PARAMETER_ID
Definition: opennurbs_mesh.h:58
Definition: opennurbs_bounding_box.h:25
Definition: opennurbs_mesh.h:1692
Definition: opennurbs_string.h:852
Definition: opennurbs_mesh.h:24
Definition: opennurbs_point.h:1996
Definition: opennurbs_mesh.h:1213
ON_SHA1 is a small class for calculating the SHA-1 hash of a sequence of bytes. It may be use increme...
Definition: opennurbs_sha1.h:242
void Dump(class ON_TextLog &text_log) const
Definition: opennurbs_mesh.h:684
Definition: opennurbs_mesh.h:2188
Definition: opennurbs_texture_mapping.h:37
Definition: opennurbs_line.h:20
Definition: opennurbs_mesh.h:645
static unsigned int NgonListFromMeshFaceOrNgonComponent(class ON_MeshNgonBuffer &ngon_buffer, ON_COMPONENT_INDEX ci, const class ON_Mesh *mesh, const class ON_MeshNgon *const *&ngon_list)
If a component index identifies a face or ngon, Get an array Create an array of a single ngon pointer...
ON_String ToString() const
Definition: opennurbs_mesh.h:790
Definition: opennurbs_mesh.h:938
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_mesh.h:1627
static class ON_MeshNgon * NgonFromMeshFace(class ON_MeshNgonBuffer &ngon_buffer, unsigned int mesh_face_index, const unsigned int *fvi)
Create an ngon pointer that contains a triangle (3-gon) or quad (4-gon) from a mesh face...
Definition: opennurbs_textlog.h:20
Definition: opennurbs_archive.h:1783
Definition: opennurbs_objref.h:163
Definition: opennurbs_point.h:460
Definition: opennurbs_mesh.h:1017
Definition: opennurbs_surface.h:57
Typically the vector portion is a unit vector and m_d = -(x*P.x + y*P.y + z*P.z) for a point P on the...
Definition: opennurbs_point.h:1433
static const ON_SHA1_Hash ZeroDigest
Definition: opennurbs_sha1.h:22
Definition: opennurbs_point.h:1152
Definition: opennurbs_point.h:46
Definition: opennurbs_mesh.h:2099
Definition: opennurbs_point.h:1973