Code-style consistency improvement:

Apply clang-format-all.sh using the _clang-format file through all the cpp/.h files.
make sure not to apply it to certain serialization structures, since some parser expects the * as part of the name, instead of type.
This commit contains no other changes aside from adding and applying clang-format-all.sh
This commit is contained in:
erwincoumans
2018-09-23 14:17:31 -07:00
parent b73b05e9fb
commit ab8f16961e
1773 changed files with 1081087 additions and 474249 deletions

View File

@@ -24,97 +24,96 @@
namespace HACD
{
class GraphVertex;
class GraphEdge;
class Graph;
class HACD;
class GraphVertex
{
public:
bool AddEdge(long name)
{
m_edges.insert(name);
return true;
}
bool DeleteEdge(long name);
GraphVertex();
~GraphVertex(){ delete m_convexHull;};
private:
long m_name;
long m_cc;
std::set<long> m_edges;
bool m_deleted;
std::vector<long> m_ancestors;
std::map<long, DPoint> m_distPoints;
class GraphVertex;
class GraphEdge;
class Graph;
class HACD;
Real m_error;
double m_surf;
double m_volume;
double m_perimeter;
double m_concavity;
ICHull * m_convexHull;
std::set<unsigned long long> m_boudaryEdges;
class GraphVertex
{
public:
bool AddEdge(long name)
{
m_edges.insert(name);
return true;
}
bool DeleteEdge(long name);
GraphVertex();
~GraphVertex() { delete m_convexHull; };
friend class GraphEdge;
friend class Graph;
friend class HACD;
};
class GraphEdge
{
public:
GraphEdge();
~GraphEdge(){delete m_convexHull;};
private:
long m_name;
long m_v1;
long m_v2;
std::map<long, DPoint> m_distPoints;
Real m_error;
double m_surf;
double m_volume;
double m_perimeter;
double m_concavity;
ICHull * m_convexHull;
std::set<unsigned long long> m_boudaryEdges;
bool m_deleted;
private:
long m_name;
long m_cc;
std::set<long> m_edges;
bool m_deleted;
std::vector<long> m_ancestors;
std::map<long, DPoint> m_distPoints;
friend class GraphVertex;
friend class Graph;
friend class HACD;
};
class Graph
{
public:
size_t GetNEdges() const { return m_nE;}
size_t GetNVertices() const { return m_nV;}
bool EdgeCollapse(long v1, long v2);
long AddVertex();
long AddEdge(long v1, long v2);
bool DeleteEdge(long name);
bool DeleteVertex(long name);
long GetEdgeID(long v1, long v2) const;
void Clear();
void Print() const;
long ExtractCCs();
Graph();
virtual ~Graph();
void Allocate(size_t nV, size_t nE);
Real m_error;
double m_surf;
double m_volume;
double m_perimeter;
double m_concavity;
ICHull* m_convexHull;
std::set<unsigned long long> m_boudaryEdges;
private:
size_t m_nCCs;
size_t m_nV;
size_t m_nE;
std::vector<GraphEdge> m_edges;
std::vector<GraphVertex> m_vertices;
friend class GraphEdge;
friend class Graph;
friend class HACD;
};
friend class HACD;
};
}
class GraphEdge
{
public:
GraphEdge();
~GraphEdge() { delete m_convexHull; };
private:
long m_name;
long m_v1;
long m_v2;
std::map<long, DPoint> m_distPoints;
Real m_error;
double m_surf;
double m_volume;
double m_perimeter;
double m_concavity;
ICHull* m_convexHull;
std::set<unsigned long long> m_boudaryEdges;
bool m_deleted;
friend class GraphVertex;
friend class Graph;
friend class HACD;
};
class Graph
{
public:
size_t GetNEdges() const { return m_nE; }
size_t GetNVertices() const { return m_nV; }
bool EdgeCollapse(long v1, long v2);
long AddVertex();
long AddEdge(long v1, long v2);
bool DeleteEdge(long name);
bool DeleteVertex(long name);
long GetEdgeID(long v1, long v2) const;
void Clear();
void Print() const;
long ExtractCCs();
Graph();
virtual ~Graph();
void Allocate(size_t nV, size_t nE);
private:
size_t m_nCCs;
size_t m_nV;
size_t m_nE;
std::vector<GraphEdge> m_edges;
std::vector<GraphVertex> m_vertices;
friend class HACD;
};
} // namespace HACD
#endif