Skip to content
Snippets Groups Projects
Commit 8672f59e authored by Tom Fischer's avatar Tom Fischer
Browse files

[GL] Impl. of copy constructor.

parent ce8e57bd
No related branches found
No related tags found
No related merge requests found
......@@ -35,6 +35,18 @@ Surface::Surface(const std::vector<Point*>& pnt_vec)
{
}
Surface::Surface(Surface const& src)
: _sfc_pnts(src._sfc_pnts),
_bounding_volume(new AABB(*(src._bounding_volume))),
_surface_grid(nullptr)
{
_sfc_triangles.reserve(src._sfc_triangles.size());
std::transform(src._sfc_triangles.cbegin(),
src._sfc_triangles.cend(),
std::back_inserter(_sfc_triangles),
[](Triangle* t) { return new Triangle(*t); });
}
Surface::~Surface()
{
for (std::size_t k(0); k < _sfc_triangles.size(); k++)
......
......@@ -36,6 +36,7 @@ class Surface final : public GeoObject
{
public:
explicit Surface(const std::vector<Point*>& pnt_vec);
Surface(Surface const& src);
~Surface();
/// return a geometry type
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment