Skip to content
Snippets Groups Projects
Commit d15d88ab authored by Karsten Rink's avatar Karsten Rink
Browse files

changed signature of getSurfaceAreaForNodes to not use pointers

parent ebb0b668
No related branches found
No related tags found
No related merge requests found
...@@ -28,15 +28,15 @@ ...@@ -28,15 +28,15 @@
namespace MeshLib { namespace MeshLib {
void MeshSurfaceExtraction::getSurfaceAreaForNodes(const MeshLib::Mesh* mesh, std::vector<double> &node_area_vec) void MeshSurfaceExtraction::getSurfaceAreaForNodes(const MeshLib::Mesh &mesh, std::vector<double> &node_area_vec)
{ {
if (mesh->getDimension() == 2) if (mesh.getDimension() == 2)
{ {
double total_area (0); double total_area (0);
// for each node, a vector containing all the element idget every element // for each node, a vector containing all the element idget every element
std::vector<MeshLib::Node*> nodes = mesh->getNodes(); std::vector<MeshLib::Node*> nodes = mesh.getNodes();
const size_t nNodes ( mesh->getNNodes() ); const size_t nNodes ( mesh.getNNodes() );
for (size_t n=0; n<nNodes; ++n) for (size_t n=0; n<nNodes; ++n)
{ {
double node_area (0); double node_area (0);
......
...@@ -37,7 +37,7 @@ class MeshSurfaceExtraction ...@@ -37,7 +37,7 @@ class MeshSurfaceExtraction
{ {
public: public:
/// Returns the area assigned to each node on a surface mesh. /// Returns the area assigned to each node on a surface mesh.
static void getSurfaceAreaForNodes(const MeshLib::Mesh* mesh, std::vector<double> &node_area_vec); static void getSurfaceAreaForNodes(const MeshLib::Mesh &mesh, std::vector<double> &node_area_vec);
/// Returns the surface nodes of a layered mesh. /// Returns the surface nodes of a layered mesh.
static std::vector<GeoLib::PointWithID*> getSurfaceNodes(const MeshLib::Mesh &mesh, const MathLib::Vector3 &dir); static std::vector<GeoLib::PointWithID*> getSurfaceNodes(const MeshLib::Mesh &mesh, const MathLib::Vector3 &dir);
......
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