Changeset 57cfb7
- Timestamp:
- Oct 13, 2009, 4:42:58 PM (16 years ago)
- Children:
- 6f9d14, 96d8dc
- Parents:
- 9f73db
- git-author:
- Frederik Heber <heber@…> (10/13/09 16:14:49)
- git-committer:
- Frederik Heber <heber@…> (10/13/09 16:42:58)
- Location:
- molecuilder/src
- Files:
-
- 8 added
- 6 edited
-
Makefile.am (modified) (1 diff)
-
analysis_correlation.cpp (added)
-
analysis_correlation.hpp (added)
-
tesselationhelpers.cpp (modified) (1 diff)
-
tesselationhelpers.hpp (modified) (1 diff)
-
unittests/AnalysisCorrelationToPointUnitTest.cpp (added)
-
unittests/AnalysisCorrelationToPointUnitTest.hpp (added)
-
unittests/AnalysisCorrelationToSurfaceUnitTest.cpp (added)
-
unittests/AnalysisCorrelationToSurfaceUnitTest.hpp (added)
-
unittests/AnalysisPairCorrelationUnitTest.cpp (added)
-
unittests/AnalysisPairCorrelationUnitTest.hpp (added)
-
unittests/Makefile.am (modified) (1 diff)
-
vector.cpp (modified) (1 diff)
-
vector.hpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/Makefile.am
r9f73db r57cfb7 1 SOURCE = a tom.cpp bond.cpp boundary.cpp config.cpp element.cpp ellipsoid.cpp graph.cpp helpers.cpp leastsquaremin.cpp linkedcell.cpp memoryusageobserver.cpp moleculelist.cpp molecule.cpp molecule_dynamics.cpp molecule_fragmentation.cpp molecule_geometry.cpp molecule_graph.cpp molecule_pointcloud.cpp parser.cpp periodentafel.cpp tesselation.cpp tesselationhelpers.cpp vector.cpp verbose.cpp2 HEADER = a tom.hpp bond.hpp boundary.hpp config.hpp defs.hpp element.hpp ellipsoid.hpp graph.hpp helpers.hpp leastsquaremin.hpp linkedcell.hpp lists.hpp memoryallocator.hpp memoryusageobserver.hpp molecule.hpp molecule_template.hpp parser.hpp periodentafel.hpp stackclass.hpp tesselation.hpp tesselationhelpers.hpp vector.hpp verbose.hpp1 SOURCE = analysis_correlation.cpp atom.cpp bond.cpp boundary.cpp config.cpp element.cpp ellipsoid.cpp graph.cpp helpers.cpp leastsquaremin.cpp linkedcell.cpp memoryusageobserver.cpp moleculelist.cpp molecule.cpp molecule_dynamics.cpp molecule_fragmentation.cpp molecule_geometry.cpp molecule_graph.cpp molecule_pointcloud.cpp parser.cpp periodentafel.cpp tesselation.cpp tesselationhelpers.cpp vector.cpp verbose.cpp 2 HEADER = analysis_correlation.hpp atom.hpp bond.hpp boundary.hpp config.hpp defs.hpp element.hpp ellipsoid.hpp graph.hpp helpers.hpp leastsquaremin.hpp linkedcell.hpp lists.hpp memoryallocator.hpp memoryusageobserver.hpp molecule.hpp molecule_template.hpp parser.hpp periodentafel.hpp stackclass.hpp tesselation.hpp tesselationhelpers.hpp vector.hpp verbose.hpp 3 3 4 4 BOOST_LIB = $(BOOST_LDFLAGS) $(BOOST_MPL_LIB) -
molecuilder/src/tesselationhelpers.cpp
r9f73db r57cfb7 679 679 }; 680 680 681 /** Returns the distance to the plane defined by \a *triangle 682 * \param *out output stream for debugging 683 * \param *x Vector to calculate distance to 684 * \param *triangle triangle defining plane 685 * \return distance between \a *x and plane defined by \a *triangle, -1 - if something went wrong 686 */ 687 double DistanceToTrianglePlane(ofstream *out, Vector *x, BoundaryTriangleSet *triangle) 688 { 689 double distance = 0.; 690 if (x == NULL) { 691 return -1; 692 } 693 distance = x->DistanceToPlane(out, &triangle->NormalVector, triangle->endpoints[0]->node->node); 694 return distance; 695 }; 681 696 682 697 /** Creates the objects in a VRML file. -
molecuilder/src/tesselationhelpers.hpp
r9f73db r57cfb7 68 68 void WriteVrmlFile(ofstream *out, ofstream *vrmlfile, class Tesselation *Tess, PointCloud *cloud); 69 69 void CalculateConcavityPerBoundaryPoint(ofstream *out, class Tesselation *TesselStruct); 70 double DistanceToTrianglePlane(ofstream *out, Vector *x, BoundaryTriangleSet *triangle); 70 71 71 72 bool CheckListOfBaselines(ofstream *out, Tesselation *TesselStruct); -
molecuilder/src/unittests/Makefile.am
r9f73db r57cfb7 1 1 INCLUDES = -I$(top_srcdir)/src 2 2 3 noinst_PROGRAMS = ActOnAll Test MemoryAllocatorUnitTest MemoryUsageObserverUnitTest VectorUnitTest3 noinst_PROGRAMS = ActOnAllUnitTest AnalysisCorrelationToPointUnitTest AnalysisCorrelationToSurfaceUnitTest AnalysisPairCorrelationUnitTest MemoryAllocatorUnitTest MemoryUsageObserverUnitTest VectorUnitTest 4 4 5 TESTS = ActOnAll Test MemoryUsageObserverUnitTest MemoryAllocatorUnitTest VectorUnitTest5 TESTS = ActOnAllUnitTest AnalysisCorrelationToPointUnitTest AnalysisCorrelationToSurfaceUnitTest AnalysisPairCorrelationUnitTest MemoryUsageObserverUnitTest MemoryAllocatorUnitTest VectorUnitTest 6 6 check_PROGRAMS = $(TESTS) 7 7 8 ActOnAll Test_SOURCES = ActOnAllTest.hpp ActOnAllUnitTest.cpp ActOnAllUnitTest.hpp memoryallocator.hpp9 ActOnAll Test_CXXFLAGS = $(CPPUNIT_CFLAGS)10 ActOnAll Test_LDFLAGS = $(CPPUNIT_LIBS) -ldl11 ActOnAll Test_LDADD = ../libmolecuilder.a8 ActOnAllUnitTest_SOURCES = ActOnAllTest.hpp ActOnAllUnitTest.cpp ActOnAllUnitTest.hpp memoryallocator.hpp 9 ActOnAllUnitTest_CXXFLAGS = $(CPPUNIT_CFLAGS) 10 ActOnAllUnitTest_LDFLAGS = $(CPPUNIT_LIBS) -ldl 11 ActOnAllUnitTest_LDADD = ../libmolecuilder.a 12 12 13 AnalysisCorrelationToPointUnitTest_SOURCES = analysis_correlation.hpp AnalysisCorrelationToPointUnitTest.cpp AnalysisCorrelationToPointUnitTest.hpp 14 AnalysisCorrelationToPointUnitTest_CXXFLAGS = $(CPPUNIT_CFLAGS) 15 AnalysisCorrelationToPointUnitTest_LDFLAGS = $(CPPUNIT_LIBS) -ldl 16 AnalysisCorrelationToPointUnitTest_LDADD = ../libmolecuilder.a 17 18 AnalysisCorrelationToSurfaceUnitTest_SOURCES = analysis_correlation.hpp AnalysisCorrelationToSurfaceUnitTest.cpp AnalysisCorrelationToSurfaceUnitTest.hpp 19 AnalysisCorrelationToSurfaceUnitTest_CXXFLAGS = $(CPPUNIT_CFLAGS) 20 AnalysisCorrelationToSurfaceUnitTest_LDFLAGS = $(CPPUNIT_LIBS) -ldl 21 AnalysisCorrelationToSurfaceUnitTest_LDADD = ../libmolecuilder.a 22 23 AnalysisPairCorrelationUnitTest_SOURCES = analysis_correlation.hpp AnalysisPairCorrelationUnitTest.cpp AnalysisPairCorrelationUnitTest.hpp 24 AnalysisPairCorrelationUnitTest_CXXFLAGS = $(CPPUNIT_CFLAGS) 25 AnalysisPairCorrelationUnitTest_LDFLAGS = $(CPPUNIT_LIBS) -ldl 26 AnalysisPairCorrelationUnitTest_LDADD = ../libmolecuilder.a 13 27 14 28 VectorUnitTest_SOURCES = defs.hpp helpers.hpp leastsquaremin.hpp memoryallocator.hpp memoryusageobserver.hpp vectorunittest.cpp vectorunittest.hpp vector.hpp verbose.hpp -
molecuilder/src/vector.cpp
r9f73db r57cfb7 256 256 return false; 257 257 } 258 }; 259 260 /** Calculates the minimum distance of this vector to the plane. 261 * \param *out output stream for debugging 262 * \param *PlaneNormal normal of plane 263 * \param *PlaneOffset offset of plane 264 * \return distance to plane 265 */ 266 double Vector::DistanceToPlane(ofstream *out, Vector *PlaneNormal, Vector *PlaneOffset) 267 { 268 Vector temp; 269 270 // first create part that is orthonormal to PlaneNormal with withdraw 271 temp.CopyVector(this); 272 temp.SubtractVector(PlaneOffset); 273 temp.MakeNormalVector(PlaneNormal); 274 temp.Scale(-1.); 275 // then add connecting vector from plane to point 276 temp.AddVector(this); 277 temp.SubtractVector(PlaneOffset); 278 279 return temp.Norm(); 258 280 }; 259 281 -
molecuilder/src/vector.hpp
r9f73db r57cfb7 31 31 double Distance(const Vector *y) const; 32 32 double DistanceSquared(const Vector *y) const; 33 double DistanceToPlane(ofstream *out, Vector *PlaneNormal, Vector *PlaneOffset); 33 34 double PeriodicDistance(const Vector *y, const double *cell_size) const; 34 35 double PeriodicDistanceSquared(const Vector *y, const double *cell_size) const;
Note:
See TracChangeset
for help on using the changeset viewer.
