--- trunk/src/applications/staticProps/NanoVolume.cpp 2007/12/06 20:04:02 1195 +++ trunk/src/applications/staticProps/NanoVolume.cpp 2008/01/08 19:36:28 1207 @@ -45,12 +45,13 @@ * * Created by Charles F. Vardeman II on 14 Dec 2006. * @author Charles F. Vardeman II - * @version $Id: NanoVolume.cpp,v 1.4 2007-12-06 20:04:01 cpuglis Exp $ + * @version $Id: NanoVolume.cpp,v 1.6 2008-01-08 19:36:28 chuckv Exp $ * */ #include "applications/staticProps/NanoVolume.hpp" #include "math/ConvexHull.hpp" +#include "math/AlphaShape.hpp" #include "utils/simError.h" #include "io/DumpReader.hpp" #include "primitives/Molecule.hpp" @@ -73,7 +74,7 @@ void NanoVolume::process() { } void NanoVolume::process() { -#if defined(HAVE_CGAL) +#if defined(HAVE_CGAL) || defined(HAVE_QHULL) Molecule* mol; Atom* atom; RigidBody* rb; @@ -85,7 +86,12 @@ void NanoVolume::process() { Vector3d vec; int i,j; +#ifdef HAVE_QHULL ConvexHull* hull = new ConvexHull(); +#endif +#ifdef HAVE_CGAL + AlphaShape* hull = new AlphaShape(); +#endif DumpReader reader(info_, dumpFilename_); int nFrames = reader.getNFrames(); @@ -126,12 +132,12 @@ void NanoVolume::process() { } // Generate convex hull for this frame. hull->genHull(pos_); - totalVolume_ += hull->getVolume(); + // totalVolume_ += hull->getVolume(); } - RealType avgVolume = totalVolume_/(RealType) frameCounter_; + //RealType avgVolume = totalVolume_/(RealType) frameCounter_; //std::cout.precision(7); //std::cout << avgVolume << std::endl; - +/* std::ofstream osq(getOutputFileName().c_str()); osq.precision(7); if (osq.is_open()){ @@ -139,9 +145,12 @@ void NanoVolume::process() { } osq.close(); +*/ #else - sprintf(painCave.errMsg, "NanoVolume: CGAL support was not compiled in!\n"); + sprintf(painCave.errMsg, "NanoVolume: Neither CGAL nor qhull support was compiled in!\n"); painCave.isFatal = 1; simError(); + #endif + }