17 #if !defined(OPENNURBS_MESH_INC_) 
   18 #define OPENNURBS_MESH_INC_ 
   35     render_mesh_quality   =   2, 
 
   37     render_mesh_custom    =   9,
 
   38     render_mesh_per_object = 10 
 
   72   double Tolerance( 
double relative_tolerance, 
double actual_size );
 
  116     double min_edge_length = 0.0001
 
  220   unsigned int m_reserved2;
 
  269   unsigned int m_reserved3;
 
  283   bool Set( ON::curvature_style,
 
  454         int mesh_vertex_count
 
  457         int mesh_vertex_count,
 
  461         int mesh_vertex_count,
 
  489         int mesh_vertex_count
 
  492         int mesh_vertex_count,
 
  496         int mesh_vertex_count,
 
  536 void ON_SortMeshFaceSidesByVertexIndex( 
 
  551 #if defined(ON_DLL_TEMPLATE) 
  555 #pragma warning( push ) 
  556 #pragma warning( disable : 4231 ) 
  562 #pragma warning( pop ) 
  591   int TopFaceCount() 
const;
 
  784   void EmergencyDestroy();
 
  789     struct memchunk* next;
 
  793   volatile int m_b32IsValid; 
 
  797   int WaitUntilReady(
int sleep_value) 
const; 
 
  848   bool AddNgon(
int N, 
const int* vi, 
const int* fi);
 
  886   int m_ngons_capacity;
 
  888   struct ON_NGON_MEMBLK* m_memblk_list;
 
  934                bool bCompareId = 
true,
 
  935                bool bCompareCRC = 
true,
 
  936                bool bCompareXform = 
true 
  978 #if defined(ON_DLL_TEMPLATE) 
  982 #pragma warning( push ) 
  983 #pragma warning( disable : 4231 ) 
  986 #pragma warning( pop ) 
  995     int   initial_face_array_capacity,   
 
  996     int   initial_vertex_array_capacity, 
 
  997     bool  has_vertex_normals,            
 
  998     bool  has_texture_coordinates        
 
 1029   ON__UINT32 
DataCRC(ON__UINT32 current_remainder) 
const;
 
 1089       int bGrowBox = 
false,
 
 1195       ON_COMPONENT_INDEX ci
 
 1218          ON::curvature_style, 
 
 1270     double angle_tol_radians,
 
 1271     double min_diagonal_length_ratio
 
 1376           const class ON_Xform* mesh_xform = 0,
 
 1388           const class ON_Xform* mesh_xform = 0,
 
 1418           bool bIgnoreVertexNormals = 
false,
 
 1419           bool bIgnoreTextureCoordinates = 
false 
 1495     bool bTopologicalTest,
 
 1496     bool* pbIsOriented = NULL,
 
 1497     bool* pbHasBoundary = NULL
 
 1572     const int* vertex_index, 
 
 1708       int edge_type_partition[5] 
 
 1714       int edge_type_partition[5] 
 
 1721       int edge_type_partition[5] 
 
 1979                               bool bTopologicalConnections, 
 
 2006                               bool bTopologicalConnections, 
 
 2273   double m_srf_scale[2];
 
 2371   char m_mesh_is_closed;   
 
 2372   char m_mesh_is_manifold; 
 
 2373   char m_mesh_is_oriented; 
 
 2374   char m_mesh_is_solid;    
 
 2394   bool SwapEdge_Helper( 
int, 
bool );
 
 2463          int bGrowBox = 
false 
 2528          int bGrowBox = 
false 
 2591          int bGrowBox = 
false 
 2613 ON_Mesh* ON_ControlPolygonMesh( 
 
 2658 bool ON_GetTrianglePlaneEquation(
 
 2666         double* evaluation_tol
 
void Transform(const ON_Xform &xform)
ON_TextureMapping::TYPE m_mapping_type
bool Write(ON_BinaryArchive &) const
bool IsDefaultSurfaceParameterMapping() const
bool Read(ON_BinaryArchive &)
int Compare(const ON_MappingTag &other, bool bCompareId=true, bool bCompareCRC=true, bool bCompareXform=true) const
void Set(const ON_TextureMapping &mapping)
void Dump(ON_TextLog &) const
void SetDefaultSurfaceParameterMappingTag()
ON::curvature_style m_style
bool Set(ON::curvature_style, int, const ON_SurfaceCurvature *, const ON_3fVector *, double=0.0)
ON_MeshCurvatureStats(const ON_MeshCurvatureStats &)
ON_MeshCurvatureStats & operator=(const ON_MeshCurvatureStats &)
bool Write(ON_BinaryArchive &) const
bool Read(ON_BinaryArchive &)
ON_MeshEdgeRef & operator=(const ON_MeshEdgeRef &)
ON_BOOL32 IsValid(ON_TextLog *text_log=NULL) const
ON_BOOL32 GetBBox(double *boxmin, double *boxmax, int bGrowBox=false) const
ON_COMPONENT_INDEX ComponentIndex() const
const ON_MeshTopology * MeshTopology() const
ON::object_type ObjectType() const
unsigned int SizeOf() const
const ON_MeshTopologyEdge * MeshTopologyEdge() const
void Dump(ON_TextLog &) const
ON_BOOL32 Transform(const ON_Xform &xform)
bool IsValid(int mesh_vertex_count, const ON_3fPoint *V) const
bool Repair(int mesh_vertex_count, const ON_3fPoint *V)
bool Repair(int mesh_vertex_count, const ON_3dPoint *V)
bool ComputeFaceNormal(const ON_3fPoint *fV, ON_3dVector &FN) const
bool IsValid(int mesh_vertex_count) const
bool Repair(int mesh_vertex_count)
bool IsValid(int mesh_vertex_count, const ON_3dPoint *V) const
bool ComputeFaceNormal(const ON_3dPoint *dV, ON_3dVector &FN) const
const ON_MeshFace * MeshFace() const
ON_MeshFaceRef & operator=(const ON_MeshFaceRef &)
ON_BOOL32 IsValid(ON_TextLog *text_log=NULL) const
ON::object_type ObjectType() const
ON_BOOL32 Transform(const ON_Xform &xform)
void Dump(ON_TextLog &) const
ON_BOOL32 GetBBox(double *boxmin, double *boxmax, int bGrowBox=false) const
const ON_MeshTopology * MeshTopology() const
ON_COMPONENT_INDEX ComponentIndex() const
unsigned int SizeOf() const
const ON_MeshTopologyFace * MeshTopologyFace() const
ON_SimpleArray< ON_MeshFace > m_F
bool HasDoublePrecisionVertices() const
bool HasPackedTextureRegion() const
int CullDegenerateFaces()
bool GetTightBoundingBox(ON_BoundingBox &tight_bbox, int bGrowBox=false, const ON_Xform *xform=0) const
ON_Mesh & operator=(const ON_Mesh &)
int CullClashingFaces(int what_to_cull)
bool CombineCoincidentVertices(ON_3fVector, double)
bool EvaluateMeshGeometry(const ON_Surface &)
bool SetTriangle(int, int, int, int)
ON_3dPoint Vertex(int vertex_index) const
int GetConnectedComponents(bool bUseVertexConnections, bool bTopologicalConnections, ON_SimpleArray< int > &facet_component_labels) const
ON_BOOL32 Transform(const ON_Xform &)
ON_3dPointArray & DoublePrecisionVertices()
void DestroyRuntimeCache(bool bDelete=true)
bool ComputeFaceNormals()
int GetMeshEdgeList(ON_SimpleArray< ON_2dex > &edge_list, ON_SimpleArray< int > &ci_meshtop_edge_map, int edge_type_partition[5]) const
bool UnitizeFaceNormals()
bool SetVertexNormal(int, const ON_3dVector &)
void SetVertexHiddenFlag(int meshvi, bool bHidden)
void FlipFaceOrientation()
ON_ClassArray< ON_TextureCoordinates > m_TC
ON_SimpleArray< bool > m_H
bool VertexIsHidden(int meshvi) const
ON_BOOL32 Write(ON_BinaryArchive &) const
bool ReverseSurfaceParameters(int dir)
bool TransposeSurfaceParameters()
friend class ON_MeshEdgeRef
void Append(const ON_Mesh &)
bool IsDeformable() const
ON_SimpleArray< ON_Color > m_C
bool ReverseTextureCoordinates(int dir)
ON_3fPointArray & SinglePrecisionVertices()
bool IsSwappableEdge(int topei)
int GetConnectedComponents(bool bUseVertexConnections, bool bTopologicalConnections, ON_SimpleArray< ON_Mesh * > *components) const
ON_MeshVertexRef VertexRef(int mesh_V_index) const
int GetMeshEdgeList(ON_SimpleArray< ON_2dex > &edge_list, int edge_type_partition[5]) const
int GetMeshEdges(ON_SimpleArray< ON_2dex > &edges) const
const ON_MeshParameters * MeshParameters() const
bool HasFaceNormals() const
bool UnitizeVertexNormals()
void InvalidateVertexBoundingBox()
int GetClashingFacePairs(int max_pair_count, ON_SimpleArray< ON_2dex > &clashing_pairs) const
void DestroyTree(bool bDeleteTree=true)
ON_BOOL32 IsValid(ON_TextLog *text_log=NULL) const
int TriangleCount() const
ON_MeshFaceRef FaceRef(int mesh_F_index) const
int SolidOrientation() const
bool CombineIdenticalVertices(bool bIgnoreVertexNormals=false, bool bIgnoreTextureCoordinates=false)
void Dump(ON_TextLog &) const
ON_MeshPartition * m_partition
ON_MeshFaceRef FaceRef(ON_COMPONENT_INDEX ci) const
bool HasPrincipalCurvatures() const
bool GetCurvatureStats(ON::curvature_style, ON_MeshCurvatureStats &) const
bool HasSynchronizedDoubleAndSinglePrecisionVertices() const
ON::object_type ObjectType() const
void InvalidateCurvatureStats()
bool ConvertTrianglesToQuads(double angle_tol_radians, double min_diagonal_length_ratio)
void SetMeshParameters(const ON_MeshParameters &)
int InvalidFaceCount() const
bool ComputeFaceNormal(int)
int GetVertexEdges(int vcount, const int *vertex_index, bool bNoDuplicates, ON_SimpleArray< ON_2dex > &edges) const
void InvalidateTextureCoordinateBoundingBox()
const ON_Object * m_parent
ON_MeshEdgeRef EdgeRef(int tope_index) const
unsigned int SizeOf() const
ON_Mesh * DuplicateFace(int face_index, ON_Mesh *mesh) const
bool ComputeVertexNormals()
int GetMeshEdgeList(ON_SimpleArray< ON_2dex > &edge_list, ON_SimpleArray< int > &ci_meshtop_edge_map, ON_SimpleArray< int > &ci_meshtop_vertex_map, int edge_type_partition[5]) const
void DestroyDoublePrecisionVertices()
int GetMeshFaceSideList(const int *Vid, struct ON_MeshFaceSide *&sides) const
bool FaceIsHidden(int meshvi) const
ON_SimpleArray< ON_SurfaceCurvature > m_K
bool HasVertexNormals() const
bool EvaluatePoint(const class ON_ObjRef &objref, ON_3dPoint &P) const
bool NormalizeTextureCoordinates()
bool HasSurfaceParameters() const
const ON_TextureCoordinates * CachedTextureCoordinates(const ON_UUID &mapping_id) const
ON_MeshEdgeRef EdgeRef(ON_COMPONENT_INDEX ci) const
ON_Mesh(int initial_face_array_capacity, int initial_vertex_array_capacity, bool has_vertex_normals, bool has_texture_coordinates)
ON_MeshVertexRef VertexRef(ON_COMPONENT_INDEX ci) const
int * GetVertexLocationIds(int first_vid, int *Vid, int *Vindex) const
ON__UINT32 DataCRC(ON__UINT32 current_remainder) const
void UpdateDoublePrecisionVertices()
friend class ON_MeshFaceRef
ON_MeshParameters * m_mesh_parameters
bool IsManifold(bool bTopologicalTest, bool *pbIsOriented=NULL, bool *pbHasBoundary=NULL) const
const ON_3fPointArray & SinglePrecisionVertices() const
bool SetQuad(int, int, int, int, int)
const bool * HiddenVertexArray() const
void InvalidateBoundingBoxes()
bool HasTextureCoordinates() const
int HiddenVertexCount() const
ON_BOOL32 Read(ON_BinaryArchive &)
bool CollapseEdge(int topei)
bool SetVertex(int, const ON_3fPoint &)
const ON_MeshPartition * CreatePartition(int, int)
ON_BOOL32 GetBBox(double *, double *, ON_BOOL32=false) const
const class ON_MeshNgonList * NgonList() const
bool SetTextureCoordinates(const class ON_TextureMapping &mapping, const class ON_Xform *mesh_xform=0, bool bLazy=true)
void UpdateSinglePrecisionVertices()
bool SetVertexNormal(int, const ON_3fVector &)
bool DoublePrecisionVerticesAreValid() const
bool ConvertQuadsToTriangles()
bool HasVertexColors() const
bool TopologyExists() const
ON_Mesh * MeshPart(const ON_MeshPart &mesh_part, ON_Mesh *mesh) const
void SetClosed(int closed)
void EnableDoublePrecisionVertices(bool bEnableDoublePrecisionVertices)
bool SetTextureCoord(int, double, double)
class ON_MeshNgonList * ModifyNgonList()
bool SinglePrecisionVerticesAreValid() const
ON_BOOL32 SwapCoordinates(int, int)
bool TransposeTextureCoordinates()
void SetDoublePrecisionVerticesAsValid()
void Append(int count, const ON_Mesh *const *meshes)
bool HasCachedTextureCoordinates() const
const ON_MeshPartition * Partition() const
const ON_TextureCoordinates * SetCachedTextureCoordinates(const class ON_TextureMapping &mapping, const class ON_Xform *mesh_xform=0, bool bLazy=true)
ON_Geometry * MeshComponent(ON_COMPONENT_INDEX ci) const
void InvalidateVertexNormalBoundingBox()
const ON_MeshTopology & Topology() const
void SetSolidOrientation(int solid_orientation)
bool SetVertex(int, const ON_3dPoint &)
void DestroyHiddenVertexArray()
friend class ON_MeshVertexRef
bool DeleteFace(int meshfi)
const ON_3dPointArray & DoublePrecisionVertices() const
void DeleteMeshParameters()
void SetSinglePrecisionVerticesAsValid()
struct ON_MeshNgon * AddNgon(int N)
ON_MeshNgonList & operator=(const ON_MeshNgonList &)
ON_MeshNgon * Ngon(int Ngon_index) const
unsigned int SizeOf() const
bool AddNgon(int N, const int *vi, const int *fi)
ON_MeshNgonList(const ON_MeshNgonList &)
bool ReserveNgonCapacity(int capacity)
bool operator==(const ON_Mesh &) const
ON_DEPRECATED void JaggedAndFasterMeshParameters()
void DefaultAnalysisMeshParameters()
double m_relative_tolerance
static const ON_MeshParameters FastRenderMesh
bool operator!=(const ON_Mesh &) const
bool Write(ON_BinaryArchive &) const
bool m_bCustomSettingsEnabled
double m_grid_aspect_ratio
bool operator!=(const ON_MeshParameters &) const
int CompareGeometrySettings(const ON_MeshParameters &) const
ON_DEPRECATED void SmoothAndSlowerMeshParameters()
void Dump(ON_TextLog &test_log) const
void Set(double density, double min_edge_length=0.0001)
bool Read(ON_BinaryArchive &)
ON__UINT32 DataCRC(ON__UINT32) const
double m_grid_amplification
static double Tolerance(double relative_tolerance, double actual_size)
int Compare(const ON_MeshParameters &) const
static const ON_MeshParameters QualityRenderMesh
static double MinEdgeLength(double max_edge_length, double tolerance)
bool operator==(const ON_MeshParameters &) const
int m_partition_max_vertex_count
ON_SimpleArray< struct ON_MeshPart > m_part
int m_partition_max_triangle_count
ON_Line TopEdgeLine(int tope_index) const
int TopEdge(int vtopi0, int vtopi1) const
ON_SimpleArray< int > m_topv_map
ON_SimpleArray< ON_MeshTopologyEdge > m_tope
bool SortVertexEdges() const
int * GetIntArray(int count)
bool TopVertexIsHidden(int topvi) const
bool TopEdgeIsHidden(int topei) const
bool TopFaceIsHidden(int topfi) const
void Dump(ON_TextLog &) const
ON_3fPoint TopVertexPoint(int topv_index) const
bool GetTopFaceVertices(int topfi, int topvi[4]) const
int TopVertexCount() const
ON_SimpleArray< ON_MeshTopologyVertex > m_topv
bool SortVertexEdges(int topvi) const
ON_SimpleArray< ON_MeshTopologyFace > m_topf
ON::object_type ObjectType() const
ON_COMPONENT_INDEX ComponentIndex() const
ON_MeshVertexRef & operator=(const ON_MeshVertexRef &)
ON_BOOL32 IsValid(ON_TextLog *text_log=NULL) const
const ON_MeshTopology * MeshTopology() const
ON_BOOL32 GetBBox(double *boxmin, double *boxmax, int bGrowBox=false) const
unsigned int SizeOf() const
void Dump(ON_TextLog &) const
ON_BOOL32 Transform(const ON_Xform &xform)
const ON_MeshTopologyVertex * MeshTopologyVertex() const
ON_SimpleArray< ON_3fPoint > m_T