15 #include <boost/serialization/assume_abstract.hpp> 26 namespace serialization
37 friend class boost::serialization::access;
40 static BSHP<TrTin>
New();
44 virtual void SetPoints(BSHP<VecPt3d> a_pts) = 0;
45 virtual void SetTriangles(BSHP<VecInt> a_tris) = 0;
46 virtual void SetTrianglesAdjacentToPoints(BSHP<VecInt2d> a_trisAdjToPts) = 0;
47 virtual void SetGeometry(BSHP<VecPt3d> a_pts,
49 BSHP<VecInt2d> a_trisAdjToPts) = 0;
53 virtual VecInt& Triangles() = 0;
54 virtual VecInt2d& TrisAdjToPts() = 0;
56 virtual const VecPt3d& Points()
const = 0;
57 virtual const VecInt& Triangles()
const = 0;
58 virtual const VecInt2d& TrisAdjToPts()
const = 0;
60 virtual BSHP<VecPt3d> PointsPtr() = 0;
61 virtual BSHP<VecInt> TrianglesPtr() = 0;
63 virtual int NumPoints()
const = 0;
64 virtual int NumTriangles()
const = 0;
67 virtual bool TriangleFromEdge(
int a_pt1,
71 int& a_localPt2)
const = 0;
72 virtual int TriangleAdjacentToEdge(
int a_pt1,
int a_pt2)
const = 0;
73 virtual int LocalIndex(
int a_tri,
int a_pt)
const = 0;
74 virtual int GlobalIndex(
int a_triIdx,
int a_localPt)
const = 0;
75 virtual bool VerticesAreAdjacent(
int a_pt1,
int a_pt2)
const = 0;
76 virtual int CommonEdgeIndex(
int a_tri,
int a_adjTri)
const = 0;
77 virtual int AdjacentTriangle(
int a_triIdx,
int a_edgeIdx)
const = 0;
78 virtual Pt3d TriangleCentroid(
int a_tri)
const = 0;
79 virtual double TriangleArea(
int a_tri)
const = 0;
81 virtual int NextBoundaryPoint(
int a_point)
const = 0;
82 virtual int PreviousBoundaryPoint(
int a_point)
const = 0;
83 virtual void GetBoundaryPoints(
VecInt& a_boundaryPoints)
const = 0;
84 virtual void GetBoundaryPolys(
VecInt2d& a_polys)
const = 0;
85 virtual bool GetExtents(
Pt3d& a_mn,
Pt3d& a_mx)
const = 0;
86 virtual void ExportTinFile(std::ostream& a_os)
const = 0;
89 virtual bool SwapEdge(
int a_triA,
int a_triB,
bool a_checkAngle =
true) = 0;
90 virtual void DeleteTriangles(
const SetInt& a_triangles) = 0;
91 virtual void DeletePoints(
const SetInt& a_points) = 0;
92 virtual bool OptimizeTriangulation() = 0;
93 virtual bool RemoveLongThinTrianglesOnPerimeter(
const double a_ratio) = 0;
94 virtual void BuildTrisAdjToPts() = 0;
95 virtual void Clear() = 0;
97 virtual std::string ToString()
const = 0;
98 virtual void FromString(
const std::string&) = 0;
99 template <
typename Archive>
100 void serialize(Archive& ,
const unsigned int )
120 BOOST_SERIALIZATION_ASSUME_ABSTRACT(
xms::TrTin)
std::vector< int > VecInt
virtual ~TrTin()
destructor
std::vector< VecInt > VecInt2d
static BSHP< TrTin > New()
Create a TrTinImpl object.
#define XM_DISALLOW_COPY_AND_ASSIGN(TypeName)
void trRenumberOnDelete(const SetInt &a_deleting, VecInt &a_vec)
Boost serialize function.
std::vector< Pt3d > VecPt3d