Commit bbe4b256 authored by sarrazij's avatar sarrazij
Browse files

UPDATED mml volume monitor can now be computed with an enclosed triangular mesh

git-svn-id: svn+ssh://scm.forge.imag.fr/var/lib/gforge/chroot/scmrepos/svn/camitk/trunk/camitk@2085 ec899d31-69d1-42ba-9299-647d76f65fb3
parent 55f98c65
......@@ -35,6 +35,7 @@ MonitorVolume::~MonitorVolume() {}
void MonitorVolume::calculate() {
values.clear();
double volume=0;
StructuralComponent *scSimul = dynamic_cast<StructuralComponent *>(monitoringManager->getPml()->getComponentByName(target));
if (scSimul) {
// loop on all structure
......@@ -45,6 +46,7 @@ void MonitorVolume::calculate() {
}
}
}
values.push_back(volume);
write();
}
......@@ -54,3 +56,4 @@ std::string MonitorVolume::getTypeName() {
return "Volume";
}
This diff is collapsed.
......@@ -123,6 +123,19 @@ public:
/// Compute the volume of the cell
double volume();
/**
* Compute the volume of a triangle with the origin of the coordinate system.
* If the triangle is A,B,C it computes the volume of the tetrahedron OABC.
* @see Zhang, C., and Chen, T., Efficient feature extraction for 2D/3D objects in mesh representation
*
* @param p1 position of Triangle Atom
* @param p2 position of Triangle Atom
* @param p3 position of Triangle Atom
*
* @return double a signed volume
*/
double signedVolumeTriangle(double p1[3], double p2[3], double p3[3]);
/// Get the direct parent structural that own this cell
const StructuralComponent * getParentSC() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment