diff --git a/exercise3/src/SurfaceArea.cpp b/exercise3/src/SurfaceArea.cpp index 7b2d8b3..2f538d5 100644 --- a/exercise3/src/SurfaceArea.cpp +++ b/exercise3/src/SurfaceArea.cpp @@ -11,9 +11,7 @@ float ComputeSurfaceArea(const HEMesh& m) { Triangles triangles(m); - float area = 0.0f; - - area = triangles.surface_area(); + float area = triangles.surface_area(); return area; } \ No newline at end of file diff --git a/exercise3/src/Volume.cpp b/exercise3/src/Volume.cpp index 39516c2..0e13988 100644 --- a/exercise3/src/Volume.cpp +++ b/exercise3/src/Volume.cpp @@ -1,15 +1,17 @@ -// This source code is property of the Computer Graphics and Visualization -// chair of the TU Dresden. Do not distribute! +// This source code is property of the Computer Graphics and Visualization +// chair of the TU Dresden. Do not distribute! // Copyright (C) CGV TU Dresden - All Rights Reserved #include "Volume.h" +#include "triangles.h" #include float ComputeVolume(const HEMesh& m) { - float vol = 0; - /*Task 2.2.2*/ - std::cout << "Volume calculation is not implemented." << std::endl; + Triangles triangles(m); + + float vol = triangles.volume(); + return vol; } \ No newline at end of file