Changeset 6bd7e0 for src/Tesselation
- Timestamp:
- Jan 2, 2012, 1:34:28 PM (13 years ago)
- Branches:
- Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
- Children:
- d78531
- Parents:
- f55ae5
- git-author:
- Frederik Heber <heber@…> (12/19/11 16:46:11)
- git-committer:
- Frederik Heber <heber@…> (01/02/12 13:34:28)
- Location:
- src/Tesselation
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Tesselation/CandidateForTesselation.cpp
rf55ae5 r6bd7e0 79 79 * Sphere must touch all candidates and the baseline endpoints and there must be no other atoms inside. 80 80 * \param RADIUS radius of sphere 81 * \param *LC LinkedCell structure with other atoms81 * \param *LC LinkedCell_deprecated structure with other atoms 82 82 * \return true - sphere is valid, false - sphere contains other points 83 83 */ 84 bool CandidateForTesselation::CheckValidity(const double RADIUS, const LinkedCell *LC) const84 bool CandidateForTesselation::CheckValidity(const double RADIUS, const LinkedCell_deprecated *LC) const 85 85 { 86 86 Info FunctionInfo(__func__); -
src/Tesselation/CandidateForTesselation.hpp
rf55ae5 r6bd7e0 24 24 class BoundaryPointSet; 25 25 class BoundaryTriangleSet; 26 class LinkedCell ;26 class LinkedCell_deprecated; 27 27 class TesselPoint; 28 28 … … 33 33 ~CandidateForTesselation(); 34 34 35 bool CheckValidity(const double RADIUS, const class LinkedCell *LC) const;35 bool CheckValidity(const double RADIUS, const class LinkedCell_deprecated *LC) const; 36 36 37 37 TesselPointList pointlist; -
src/Tesselation/boundary.cpp
rf55ae5 r6bd7e0 322 322 * \param *BoundaryPts set of boundary points to use or NULL 323 323 * \param *TesselStruct Tesselation filled with points, lines and triangles on boundary on return 324 * \param *LCList atoms in LinkedCell list324 * \param *LCList atoms in LinkedCell_deprecated list 325 325 * \param *filename filename prefix for output of vertex data 326 326 * \return *TesselStruct is filled with convex boundary and tesselation is stored under \a *filename. 327 327 */ 328 void FindConvexBorder(const molecule* mol, Boundaries *BoundaryPts, Tesselation *&TesselStruct, const LinkedCell *LCList, const char *filename)328 void FindConvexBorder(const molecule* mol, Boundaries *BoundaryPts, Tesselation *&TesselStruct, const LinkedCell_deprecated *LCList, const char *filename) 329 329 { 330 330 Info FunctionInfo(__func__); … … 711 711 GreatestDiameter = GetDiametersOfCluster(BoundaryPoints, mol, TesselStruct, IsAngstroem); 712 712 PointCloudAdaptor< molecule > cloud(mol, mol->name); 713 LinkedCell *LCList = new LinkedCell(cloud, 10.);714 FindConvexBorder(mol, BoundaryPoints, TesselStruct, (const LinkedCell *&)LCList, NULL);713 LinkedCell_deprecated *LCList = new LinkedCell_deprecated(cloud, 10.); 714 FindConvexBorder(mol, BoundaryPoints, TesselStruct, (const LinkedCell_deprecated *&)LCList, NULL); 715 715 delete (LCList); 716 716 delete[] BoundaryPoints; … … 815 815 double phi[NDIM]; 816 816 map<molecule *, Tesselation *> TesselStruct; 817 map<molecule *, LinkedCell *> LCList;817 map<molecule *, LinkedCell_deprecated *> LCList; 818 818 819 819 for (MoleculeList::iterator ListRunner = List->ListOfMolecules.begin(); ListRunner != List->ListOfMolecules.end(); ListRunner++) … … 821 821 LOG(1, "Pre-creating linked cell lists for molecule " << *ListRunner << "."); 822 822 PointCloudAdaptor< molecule > cloud(*ListRunner, (*ListRunner)->name); 823 LCList[(*ListRunner)] = new LinkedCell (cloud, 10.); // get linked cell list823 LCList[(*ListRunner)] = new LinkedCell_deprecated(cloud, 10.); // get linked cell list 824 824 LOG(1, "Pre-creating tesselation for molecule " << *ListRunner << "."); 825 825 TesselStruct[(*ListRunner)] = NULL; 826 FindNonConvexBorder((*ListRunner), TesselStruct[(*ListRunner)], (const LinkedCell *&)LCList[(*ListRunner)], 5., NULL);826 FindNonConvexBorder((*ListRunner), TesselStruct[(*ListRunner)], (const LinkedCell_deprecated *&)LCList[(*ListRunner)], 5., NULL); 827 827 } 828 828 … … 1017 1017 /** Checks whether there are no atoms inside a sphere around \a CurrentPosition 1018 1018 * except those atoms present in \a *filler. 1019 * If filler is NULL, then we just call LinkedCell ::GetPointsInsideSphere() and1019 * If filler is NULL, then we just call LinkedCell_deprecated::GetPointsInsideSphere() and 1020 1020 * check whether the return list is empty. 1021 1021 * @param *filler … … 1024 1024 */ 1025 1025 bool isSpaceAroundPointVoid( 1026 LinkedCell *LC,1026 LinkedCell_deprecated *LC, 1027 1027 molecule *filler, 1028 1028 const double boundary, … … 1111 1111 bool firstInsertion = true; 1112 1112 const Box &Domain = World::getInstance().getDomain(); 1113 map<molecule *, LinkedCell *> LCList;1113 map<molecule *, LinkedCell_deprecated *> LCList; 1114 1114 std::vector<molecule *> List = World::getInstance().getAllMolecules(); 1115 1115 MoleculeListClass *MolList = World::getInstance().getMolecules(); … … 1119 1119 LOG(1, "Pre-creating linked cell lists for molecule " << *ListRunner << "."); 1120 1120 PointCloudAdaptor< molecule > cloud(*ListRunner, (*ListRunner)->name); 1121 LCList[(*ListRunner)] = new LinkedCell (cloud, 10.); // get linked cell list1121 LCList[(*ListRunner)] = new LinkedCell_deprecated(cloud, 10.); // get linked cell list 1122 1122 } 1123 1123 … … 1169 1169 // Check whether there is anything too close by and whether atom is outside of domain 1170 1170 FillIt = true; 1171 for (std::map<molecule *, LinkedCell *>::iterator ListRunner = LCList.begin(); ListRunner != LCList.end(); ++ListRunner) {1171 for (std::map<molecule *, LinkedCell_deprecated *>::iterator ListRunner = LCList.begin(); ListRunner != LCList.end(); ++ListRunner) { 1172 1172 FillIt = FillIt && isSpaceAroundPointVoid( 1173 1173 ListRunner->second, … … 1234 1234 LOG(0, MolList->ListOfMolecules.size() << " molecules have been inserted."); 1235 1235 1236 for (std::map<molecule *, LinkedCell *>::iterator ListRunner = LCList.begin(); !LCList.empty(); ListRunner = LCList.begin()) {1236 for (std::map<molecule *, LinkedCell_deprecated *>::iterator ListRunner = LCList.begin(); !LCList.empty(); ListRunner = LCList.begin()) { 1237 1237 delete ListRunner->second; 1238 1238 LCList.erase(ListRunner); … … 1244 1244 * \param *mol molecule structure with Atom's and Bond's 1245 1245 * \param *&TesselStruct Tesselation filled with points, lines and triangles on boundary on return 1246 * \param *&LCList atoms in LinkedCell list1246 * \param *&LCList atoms in LinkedCell_deprecated list 1247 1247 * \param RADIUS radius of the virtual sphere 1248 1248 * \param *filename filename prefix for output of vertex data 1249 1249 * \return true - tesselation successful, false - tesselation failed 1250 1250 */ 1251 bool FindNonConvexBorder(molecule* const mol, Tesselation *&TesselStruct, const LinkedCell *&LCList, const double RADIUS, const char *filename = NULL)1251 bool FindNonConvexBorder(molecule* const mol, Tesselation *&TesselStruct, const LinkedCell_deprecated *&LCList, const double RADIUS, const char *filename = NULL) 1252 1252 { 1253 1253 Info FunctionInfo(__func__); … … 1272 1272 PointCloudAdaptor< molecule > cloud(mol, mol->name); 1273 1273 if (LCList == NULL) { 1274 LCList = new LinkedCell (cloud, 2.*RADIUS);1274 LCList = new LinkedCell_deprecated(cloud, 2.*RADIUS); 1275 1275 freeLC = true; 1276 1276 } -
src/Tesselation/boundary.hpp
rf55ae5 r6bd7e0 24 24 class BoundaryTriangleSet; 25 25 class config; 26 class LinkedCell ;26 class LinkedCell_deprecated; 27 27 class molecule; 28 28 class MoleculeListClass; … … 42 42 void FillBoxWithMolecule(MoleculeListClass *List, molecule *filler, config &configuration, const double MaxDistance, const double distance[NDIM], const double boundary, const double RandomAtomDisplacement, const double RandomMolDisplacement, const bool DoRandomRotation); 43 43 void FillVoidWithMolecule(molecule *&filler, config &configuration, const double distance[NDIM], const double boundary, const double RandomAtomDisplacement, const double RandomMolDisplacement, const double MinDistance, const bool DoRandomRotation); 44 void FindConvexBorder(const molecule* const mol, Boundaries *BoundaryPts, Tesselation *&TesselStruct, const LinkedCell *LCList, const char *filename);44 void FindConvexBorder(const molecule* const mol, Boundaries *BoundaryPts, Tesselation *&TesselStruct, const LinkedCell_deprecated *LCList, const char *filename); 45 45 Vector* FindEmbeddingHole(MoleculeListClass *mols, molecule *srcmol); 46 bool FindNonConvexBorder(molecule* const mol, Tesselation *&TesselStruct, const LinkedCell *&LC, const double RADIUS, const char *tempbasename);46 bool FindNonConvexBorder(molecule* const mol, Tesselation *&TesselStruct, const LinkedCell_deprecated *&LC, const double RADIUS, const char *tempbasename); 47 47 Boundaries *GetBoundaryPoints(const molecule *mol, Tesselation *&TesselStruct); 48 48 double * GetDiametersOfCluster(const Boundaries *BoundaryPtr, const molecule *mol, Tesselation *&TesselStruct, const bool IsAngstroem); -
src/Tesselation/ellipsoid.cpp
rf55ae5 r6bd7e0 242 242 * \param PointsToPick number of points in set to pick 243 243 */ 244 void PickRandomNeighbouredPointSet(class Tesselation *T, class LinkedCell *LC, Vector *&x, size_t PointsToPick)244 void PickRandomNeighbouredPointSet(class Tesselation *T, class LinkedCell_deprecated *LC, Vector *&x, size_t PointsToPick) 245 245 { 246 246 size_t PointsLeft = 0; … … 414 414 * \param *filename name for output file 415 415 */ 416 void FindDistributionOfEllipsoids(class Tesselation *T, class LinkedCell *LCList, int N, int number, const char *filename)416 void FindDistributionOfEllipsoids(class Tesselation *T, class LinkedCell_deprecated *LCList, int N, int number, const char *filename) 417 417 { 418 418 ofstream output; -
src/Tesselation/ellipsoid.hpp
rf55ae5 r6bd7e0 22 22 /****************************************** forward declarations *****************************/ 23 23 24 class LinkedCell ;24 class LinkedCell_deprecated; 25 25 class Vector; 26 26 … … 31 31 bool FitPointSetToEllipsoid(Vector *set, int N, Vector *EllipsoidCenter, double *EllipsoidLength, double *EllipsoidAngle); 32 32 void PickRandomPointSet(class Tesselation *T, Vector *&x, size_t PointsToPick); 33 void PickRandomNeighbouredPointSet(class Tesselation *T, class LinkedCell *LC, Vector *&x, size_t PointsToPick);34 void FindDistributionOfEllipsoids(class Tesselation *T, class LinkedCell *LCList, int N, int number, const char *filename);33 void PickRandomNeighbouredPointSet(class Tesselation *T, class LinkedCell_deprecated *LC, Vector *&x, size_t PointsToPick); 34 void FindDistributionOfEllipsoids(class Tesselation *T, class LinkedCell_deprecated *LCList, int N, int number, const char *filename); 35 35 36 36 #endif /* ELLIPSOID_HPP_ */ -
src/Tesselation/tesselation.cpp
rf55ae5 r6bd7e0 415 415 * \param *out output stream for debugging 416 416 * \param *cloud cluster of points 417 * \param *LC LinkedCell structure to find nearest point quickly417 * \param *LC LinkedCell_deprecated structure to find nearest point quickly 418 418 * \return true - all straddling points insert, false - something went wrong 419 419 */ 420 bool Tesselation::InsertStraddlingPoints(IPointCloud & cloud, const LinkedCell *LC)420 bool Tesselation::InsertStraddlingPoints(IPointCloud & cloud, const LinkedCell_deprecated *LC) 421 421 { 422 422 Info FunctionInfo(__func__); … … 426 426 TriangleList *triangles = NULL; 427 427 bool AddFlag = false; 428 LinkedCell *BoundaryPoints = NULL;428 LinkedCell_deprecated *BoundaryPoints = NULL; 429 429 bool SuccessFlag = true; 430 430 431 431 cloud.GoToFirst(); 432 432 PointCloudAdaptor< Tesselation, MapValueIterator<Tesselation::iterator> > newcloud(this, cloud.GetName()); 433 BoundaryPoints = new LinkedCell (newcloud, 5.);433 BoundaryPoints = new LinkedCell_deprecated(newcloud, 5.); 434 434 while (!cloud.IsEnd()) { // we only have to go once through all points, as boundary can become only bigger 435 435 if (AddFlag) { 436 436 delete (BoundaryPoints); 437 BoundaryPoints = new LinkedCell (newcloud, 5.);437 BoundaryPoints = new LinkedCell_deprecated(newcloud, 5.); 438 438 AddFlag = false; 439 439 } … … 846 846 * \param &CandidateLine contains other degenerated candidates which we have to subtract as well 847 847 * \param RADIUS radius of sphere 848 * \param *LC LinkedCell structure with other atoms848 * \param *LC LinkedCell_deprecated structure with other atoms 849 849 * \return true - candidate triangle is degenerated, false - candidate triangle is not degenerated 850 850 */ 851 bool Tesselation::CheckDegeneracy(CandidateForTesselation &CandidateLine, const double RADIUS, const LinkedCell *LC) const851 bool Tesselation::CheckDegeneracy(CandidateForTesselation &CandidateLine, const double RADIUS, const LinkedCell_deprecated *LC) const 852 852 { 853 853 Info FunctionInfo(__func__); … … 997 997 * \param *out output stream for debugging 998 998 * \param RADIUS radius of virtual rolling sphere 999 * \param *LC LinkedCell structure with neighbouring TesselPoint's999 * \param *LC LinkedCell_deprecated structure with neighbouring TesselPoint's 1000 1000 * \return true - a starting triangle has been created, false - no valid triple of points found 1001 1001 */ 1002 bool Tesselation::FindStartingTriangle(const double RADIUS, const LinkedCell *LC)1002 bool Tesselation::FindStartingTriangle(const double RADIUS, const LinkedCell_deprecated *LC) 1003 1003 { 1004 1004 Info FunctionInfo(__func__); … … 1130 1130 * \param *ThirdNode third point in triangle, not in BoundaryLineSet::endpoints 1131 1131 * \param RADIUS radius of sphere 1132 * \param *LC LinkedCell structure1132 * \param *LC LinkedCell_deprecated structure 1133 1133 * \return true - there is a better candidate (smaller angle than \a ShortestAngle), false - no better TesselPoint candidate found 1134 1134 */ 1135 //bool Tesselation::HasOtherBaselineBetterCandidate(CandidateForTesselation &CandidateLine, const TesselPoint * const ThirdNode, double RADIUS, const LinkedCell * const LC) const1135 //bool Tesselation::HasOtherBaselineBetterCandidate(CandidateForTesselation &CandidateLine, const TesselPoint * const ThirdNode, double RADIUS, const LinkedCell_deprecated * const LC) const 1136 1136 //{ 1137 1137 // Info FunctionInfo(__func__); … … 1270 1270 * @param RADIUS radius of the rolling ball 1271 1271 * @param N number of found triangles 1272 * @param *LC LinkedCell structure with neighbouring points1273 */ 1274 bool Tesselation::FindNextSuitableTriangle(CandidateForTesselation &CandidateLine, const BoundaryTriangleSet &T, const double& RADIUS, const LinkedCell *LC)1272 * @param *LC LinkedCell_deprecated structure with neighbouring points 1273 */ 1274 bool Tesselation::FindNextSuitableTriangle(CandidateForTesselation &CandidateLine, const BoundaryTriangleSet &T, const double& RADIUS, const LinkedCell_deprecated *LC) 1275 1275 { 1276 1276 Info FunctionInfo(__func__); … … 1345 1345 1346 1346 /** Walks through Tesselation::OpenLines() and finds candidates for newly created ones. 1347 * \param *&LCList atoms in LinkedCell list1347 * \param *&LCList atoms in LinkedCell_deprecated list 1348 1348 * \param RADIUS radius of the virtual sphere 1349 1349 * \return true - for all open lines without candidates so far, a candidate has been found, 1350 1350 * false - at least one open line without candidate still 1351 1351 */ 1352 bool Tesselation::FindCandidatesforOpenLines(const double RADIUS, const LinkedCell *&LCList)1352 bool Tesselation::FindCandidatesforOpenLines(const double RADIUS, const LinkedCell_deprecated *&LCList) 1353 1353 { 1354 1354 bool TesselationFailFlag = true; … … 1372 1372 * \param CandidateLine triangle to add 1373 1373 * \param RADIUS Radius of sphere 1374 * \param *LC LinkedCell structure1374 * \param *LC LinkedCell_deprecated structure 1375 1375 * \NOTE we need the copy operator here as the original CandidateForTesselation is removed in 1376 1376 * AddTesselationLine() in AddCandidateTriangle() 1377 1377 */ 1378 void Tesselation::AddCandidatePolygon(CandidateForTesselation CandidateLine, const double RADIUS, const LinkedCell *LC)1378 void Tesselation::AddCandidatePolygon(CandidateForTesselation CandidateLine, const double RADIUS, const LinkedCell_deprecated *LC) 1379 1379 { 1380 1380 Info FunctionInfo(__func__); … … 1468 1468 * \param CandidateLine CanddiateForTesselation structure for the desired BoundaryLine 1469 1469 * \param RADIUS radius of sphere 1470 * \param *LC pointer to LinkedCell structure1471 */ 1472 void Tesselation::AddDegeneratedTriangle(CandidateForTesselation &CandidateLine, const double RADIUS, const LinkedCell *LC)1470 * \param *LC pointer to LinkedCell_deprecated structure 1471 */ 1472 void Tesselation::AddDegeneratedTriangle(CandidateForTesselation &CandidateLine, const double RADIUS, const LinkedCell_deprecated *LC) 1473 1473 { 1474 1474 Info FunctionInfo(__func__); … … 1876 1876 * \param Storage[3] array storing angles and other candidate information 1877 1877 * \param RADIUS radius of virtual sphere 1878 * \param *LC LinkedCell structure with neighbouring points1879 */ 1880 void Tesselation::FindSecondPointForTesselation(TesselPoint* a, Vector Oben, TesselPoint*& OptCandidate, double Storage[3], double RADIUS, const LinkedCell *LC)1878 * \param *LC LinkedCell_deprecated structure with neighbouring points 1879 */ 1880 void Tesselation::FindSecondPointForTesselation(TesselPoint* a, Vector Oben, TesselPoint*& OptCandidate, double Storage[3], double RADIUS, const LinkedCell_deprecated *LC) 1881 1881 { 1882 1882 Info FunctionInfo(__func__); … … 1984 1984 * @param ThirdPoint third point to avoid in search 1985 1985 * @param RADIUS radius of sphere 1986 * @param *LC LinkedCell structure with neighbouring points1987 */ 1988 void Tesselation::FindThirdPointForTesselation(const Vector &NormalVector, const Vector &SearchDirection, const Vector &OldSphereCenter, CandidateForTesselation &CandidateLine, const class BoundaryPointSet * const ThirdPoint, const double RADIUS, const LinkedCell *LC) const1986 * @param *LC LinkedCell_deprecated structure with neighbouring points 1987 */ 1988 void Tesselation::FindThirdPointForTesselation(const Vector &NormalVector, const Vector &SearchDirection, const Vector &OldSphereCenter, CandidateForTesselation &CandidateLine, const class BoundaryPointSet * const ThirdPoint, const double RADIUS, const LinkedCell_deprecated *LC) const 1989 1989 { 1990 1990 Info FunctionInfo(__func__); … … 2219 2219 * \return map of BoundaryPointSet of closest points sorted by squared distance or NULL. 2220 2220 */ 2221 DistanceToPointMap * Tesselation::FindClosestBoundaryPointsToVector(const Vector &x, const LinkedCell * LC) const2221 DistanceToPointMap * Tesselation::FindClosestBoundaryPointsToVector(const Vector &x, const LinkedCell_deprecated* LC) const 2222 2222 { 2223 2223 Info FunctionInfo(__func__); … … 2270 2270 * \return closest BoundaryLineSet or NULL in degenerate case. 2271 2271 */ 2272 BoundaryLineSet * Tesselation::FindClosestBoundaryLineToVector(const Vector &x, const LinkedCell * LC) const2272 BoundaryLineSet * Tesselation::FindClosestBoundaryLineToVector(const Vector &x, const LinkedCell_deprecated* LC) const 2273 2273 { 2274 2274 Info FunctionInfo(__func__); … … 2330 2330 * \return BoundaryTriangleSet of nearest triangle or NULL. 2331 2331 */ 2332 TriangleList * Tesselation::FindClosestTrianglesToVector(const Vector &x, const LinkedCell * LC) const2332 TriangleList * Tesselation::FindClosestTrianglesToVector(const Vector &x, const LinkedCell_deprecated* LC) const 2333 2333 { 2334 2334 Info FunctionInfo(__func__); … … 2417 2417 * \return list of BoundaryTriangleSet of nearest triangles or NULL. 2418 2418 */ 2419 class BoundaryTriangleSet * Tesselation::FindClosestTriangleToVector(const Vector &x, const LinkedCell * LC) const2419 class BoundaryTriangleSet * Tesselation::FindClosestTriangleToVector(const Vector &x, const LinkedCell_deprecated* LC) const 2420 2420 { 2421 2421 Info FunctionInfo(__func__); … … 2452 2452 * Basically calls Tesselation::GetDistanceToSurface() and checks the sign of the return value. 2453 2453 * @param point of which to check the position 2454 * @param *LC LinkedCell structure2454 * @param *LC LinkedCell_deprecated structure 2455 2455 * 2456 2456 * @return true if the point is inside the Tesselation structure, false otherwise 2457 2457 */ 2458 bool Tesselation::IsInnerPoint(const Vector &Point, const LinkedCell * const LC) const2458 bool Tesselation::IsInnerPoint(const Vector &Point, const LinkedCell_deprecated* const LC) const 2459 2459 { 2460 2460 Info FunctionInfo(__func__); … … 2479 2479 * 2480 2480 * @param point of which to check the position 2481 * @param *LC LinkedCell structure2481 * @param *LC LinkedCell_deprecated structure 2482 2482 * 2483 2483 * @return >0 if outside, ==0 if on surface, <0 if inside … … 2540 2540 * \return distance squared to closest point on surface 2541 2541 */ 2542 double Tesselation::GetDistanceToSurface(const Vector &Point, const LinkedCell * const LC) const2542 double Tesselation::GetDistanceToSurface(const Vector &Point, const LinkedCell_deprecated* const LC) const 2543 2543 { 2544 2544 Info FunctionInfo(__func__); … … 2555 2555 * \return distance squared to closest point on surface 2556 2556 */ 2557 BoundaryTriangleSet * Tesselation::GetClosestTriangleOnSurface(const Vector &Point, const LinkedCell * const LC) const2557 BoundaryTriangleSet * Tesselation::GetClosestTriangleOnSurface(const Vector &Point, const LinkedCell_deprecated* const LC) const 2558 2558 { 2559 2559 Info FunctionInfo(__func__); … … 3545 3545 * \param *LC Linked Cell structure to find nearest point 3546 3546 */ 3547 void Tesselation::AddBoundaryPointByDegeneratedTriangle(class TesselPoint *point, LinkedCell *LC)3547 void Tesselation::AddBoundaryPointByDegeneratedTriangle(class TesselPoint *point, LinkedCell_deprecated *LC) 3548 3548 { 3549 3549 Info FunctionInfo(__func__); -
src/Tesselation/tesselation.hpp
rf55ae5 r6bd7e0 40 40 class CandidateForTesselation; 41 41 class IPointCloud; 42 class LinkedCell ;42 class LinkedCell_deprecated; 43 43 class Plane; 44 44 class Tesselation; … … 78 78 void AddTesselationTriangle(const int nr); 79 79 void AddCandidateTriangle(CandidateForTesselation &CandidateLine, enum centers type); 80 void AddDegeneratedTriangle(CandidateForTesselation &CandidateLine, const double RADIUS, const LinkedCell *LC);81 void AddCandidatePolygon(CandidateForTesselation CandidateLine, const double RADIUS, const LinkedCell *LC);80 void AddDegeneratedTriangle(CandidateForTesselation &CandidateLine, const double RADIUS, const LinkedCell_deprecated *LC); 81 void AddCandidatePolygon(CandidateForTesselation CandidateLine, const double RADIUS, const LinkedCell_deprecated *LC); 82 82 void RemoveTesselationTriangle(class BoundaryTriangleSet *triangle); 83 83 void RemoveTesselationLine(class BoundaryLineSet *line); 84 84 void RemoveTesselationPoint(class BoundaryPointSet *point); 85 bool CheckDegeneracy(CandidateForTesselation &CandidateLine, const double RADIUS, const LinkedCell *LC) const;85 bool CheckDegeneracy(CandidateForTesselation &CandidateLine, const double RADIUS, const LinkedCell_deprecated *LC) const; 86 86 87 87 88 88 // concave envelope 89 bool FindStartingTriangle(const double RADIUS, const LinkedCell *LC);90 void FindSecondPointForTesselation(class TesselPoint* a, Vector Oben, class TesselPoint*& OptCandidate, double Storage[3], double RADIUS, const LinkedCell *LC);91 void FindThirdPointForTesselation(const Vector &NormalVector, const Vector &SearchDirection, const Vector &OldSphereCenter, CandidateForTesselation &CandidateLine, const class BoundaryPointSet * const ThirdNode, const double RADIUS, const LinkedCell *LC) const;92 bool FindNextSuitableTriangle(CandidateForTesselation &CandidateLine, const BoundaryTriangleSet &T, const double& RADIUS, const LinkedCell *LC);93 bool FindCandidatesforOpenLines(const double RADIUS, const LinkedCell *&LCList);89 bool FindStartingTriangle(const double RADIUS, const LinkedCell_deprecated *LC); 90 void FindSecondPointForTesselation(class TesselPoint* a, Vector Oben, class TesselPoint*& OptCandidate, double Storage[3], double RADIUS, const LinkedCell_deprecated *LC); 91 void FindThirdPointForTesselation(const Vector &NormalVector, const Vector &SearchDirection, const Vector &OldSphereCenter, CandidateForTesselation &CandidateLine, const class BoundaryPointSet * const ThirdNode, const double RADIUS, const LinkedCell_deprecated *LC) const; 92 bool FindNextSuitableTriangle(CandidateForTesselation &CandidateLine, const BoundaryTriangleSet &T, const double& RADIUS, const LinkedCell_deprecated *LC); 93 bool FindCandidatesforOpenLines(const double RADIUS, const LinkedCell_deprecated *&LCList); 94 94 int CheckPresenceOfTriangle(class TesselPoint *Candidates[3]) const; 95 95 class BoundaryTriangleSet * GetPresentTriangle(TesselPoint *Candidates[3]); … … 98 98 void TesselateOnBoundary(IPointCloud & cloud); 99 99 void GuessStartingTriangle(); 100 bool InsertStraddlingPoints(IPointCloud & cloud, const LinkedCell *LC);100 bool InsertStraddlingPoints(IPointCloud & cloud, const LinkedCell_deprecated *LC); 101 101 double RemovePointFromTesselatedSurface(class BoundaryPointSet *point); 102 102 class BoundaryLineSet * FlipBaseline(class BoundaryLineSet *Base); … … 106 106 IndexToIndex * FindAllDegeneratedLines(); 107 107 void RemoveDegeneratedTriangles(); 108 void AddBoundaryPointByDegeneratedTriangle(class TesselPoint *point, LinkedCell *LC);108 void AddBoundaryPointByDegeneratedTriangle(class TesselPoint *point, LinkedCell_deprecated *LC); 109 109 int CorrectAllDegeneratedPolygons(); 110 110 … … 117 117 class BoundaryPointSet * GetCommonEndpoint(const BoundaryLineSet * line1, const BoundaryLineSet * line2) const; 118 118 TriangleList * FindTriangles(const TesselPoint* const Points[3]) const; 119 TriangleList * FindClosestTrianglesToVector(const Vector &x, const LinkedCell * LC) const;120 BoundaryTriangleSet * FindClosestTriangleToVector(const Vector &x, const LinkedCell * LC) const;121 bool IsInnerPoint(const Vector &Point, const LinkedCell * const LC) const;119 TriangleList * FindClosestTrianglesToVector(const Vector &x, const LinkedCell_deprecated* LC) const; 120 BoundaryTriangleSet * FindClosestTriangleToVector(const Vector &x, const LinkedCell_deprecated* LC) const; 121 bool IsInnerPoint(const Vector &Point, const LinkedCell_deprecated* const LC) const; 122 122 double GetDistanceSquaredToTriangle(const Vector &Point, const BoundaryTriangleSet* const triangle) const; 123 double GetDistanceToSurface(const Vector &Point, const LinkedCell * const LC) const;124 BoundaryTriangleSet * GetClosestTriangleOnSurface(const Vector &Point, const LinkedCell * const LC) const;123 double GetDistanceToSurface(const Vector &Point, const LinkedCell_deprecated* const LC) const; 124 BoundaryTriangleSet * GetClosestTriangleOnSurface(const Vector &Point, const LinkedCell_deprecated* const LC) const; 125 125 bool AddBoundaryPoint(TesselPoint * Walker, const int n); 126 DistanceToPointMap * FindClosestBoundaryPointsToVector(const Vector &x, const LinkedCell * LC) const;127 BoundaryLineSet * FindClosestBoundaryLineToVector(const Vector &x, const LinkedCell * LC) const;126 DistanceToPointMap * FindClosestBoundaryPointsToVector(const Vector &x, const LinkedCell_deprecated* LC) const; 127 BoundaryLineSet * FindClosestBoundaryLineToVector(const Vector &x, const LinkedCell_deprecated* LC) const; 128 128 129 129 // print for debugging … … 163 163 mutable PointMap::const_iterator InternalPointer; 164 164 165 //bool HasOtherBaselineBetterCandidate(const BoundaryLineSet * const BaseRay, const TesselPoint * const OptCandidate, double ShortestAngle, double RADIUS, const LinkedCell * const LC) const;165 //bool HasOtherBaselineBetterCandidate(const BoundaryLineSet * const BaseRay, const TesselPoint * const OptCandidate, double ShortestAngle, double RADIUS, const LinkedCell_deprecated * const LC) const; 166 166 void FindDegeneratedCandidatesforOpenLines(TesselPoint * const Sprinter, const Vector * const OptCenter); 167 167 }; -
src/Tesselation/tesselationhelpers.cpp
rf55ae5 r6bd7e0 409 409 * @return point which is second closest to the provided one 410 410 */ 411 TesselPoint* FindSecondClosestTesselPoint(const Vector& Point, const LinkedCell * const LC)411 TesselPoint* FindSecondClosestTesselPoint(const Vector& Point, const LinkedCell_deprecated* const LC) 412 412 { 413 413 Info FunctionInfo(__func__); … … 461 461 * @return point which is closest to the provided one, NULL if none found 462 462 */ 463 TesselPoint* FindClosestTesselPoint(const Vector& Point, TesselPoint *&SecondPoint, const LinkedCell * const LC)463 TesselPoint* FindClosestTesselPoint(const Vector& Point, TesselPoint *&SecondPoint, const LinkedCell_deprecated* const LC) 464 464 { 465 465 Info FunctionInfo(__func__); -
src/Tesselation/tesselationhelpers.hpp
rf55ae5 r6bd7e0 32 32 class BoundaryPolygonSet; 33 33 class CandidateForTesselation; 34 class LinkedCell ;34 class LinkedCell_deprecated; 35 35 class TesselPoint; 36 36 class IPointCloud; … … 52 52 bool CheckLineCriteriaForDegeneratedTriangle(const BoundaryPointSet * const nodes[3]); 53 53 bool SortCandidates(const CandidateForTesselation* candidate1, const CandidateForTesselation *candidate2); 54 TesselPoint* FindClosestTesselPoint(const Vector & Point, TesselPoint *&SecondPoint, const LinkedCell * const LC);55 TesselPoint* FindSecondClosestTesselPoint(const Vector &, const LinkedCell * const LC);54 TesselPoint* FindClosestTesselPoint(const Vector & Point, TesselPoint *&SecondPoint, const LinkedCell_deprecated* const LC); 55 TesselPoint* FindSecondClosestTesselPoint(const Vector &, const LinkedCell_deprecated* const LC); 56 56 Vector * GetClosestPointBetweenLine(const BoundaryLineSet * const Base, const BoundaryLineSet * const OtherBase); 57 57 -
src/Tesselation/triangleintersectionlist.cpp
rf55ae5 r6bd7e0 41 41 * 42 42 */ 43 TriangleIntersectionList::TriangleIntersectionList(const Vector &x, const Tesselation *surface, const LinkedCell * LC) :43 TriangleIntersectionList::TriangleIntersectionList(const Vector &x, const Tesselation *surface, const LinkedCell_deprecated* LC) : 44 44 Point(x), 45 45 Tess(surface), -
src/Tesselation/triangleintersectionlist.hpp
rf55ae5 r6bd7e0 23 23 24 24 class BoundaryTriangleSet; 25 class LinkedCell ;25 class LinkedCell_deprecated; 26 26 class Tesselation; 27 27 class Vector; … … 39 39 { 40 40 public: 41 TriangleIntersectionList(const Vector &x, const Tesselation *surface, const LinkedCell * LC);41 TriangleIntersectionList(const Vector &x, const Tesselation *surface, const LinkedCell_deprecated* LC); 42 42 ~TriangleIntersectionList(); 43 43 … … 54 54 const Vector &Point; 55 55 const Tesselation *Tess; 56 const LinkedCell *Vicinity;56 const LinkedCell_deprecated *Vicinity; 57 57 TriangleVectorMap IntersectionList; 58 58 mutable DistanceTriangleMap DistanceList; -
src/Tesselation/unittests/TesselationUnitTest.cpp
rf55ae5 r6bd7e0 75 75 // create linkedcell 76 76 PointCloudAdaptor<TesselPointSTLList> cloud(&Corners, "TesselPointSTLList"); 77 LinkedList = new LinkedCell (cloud, 2.*SPHERERADIUS);77 LinkedList = new LinkedCell_deprecated(cloud, 2.*SPHERERADIUS); 78 78 79 79 // create tesselation -
src/Tesselation/unittests/TesselationUnitTest.hpp
rf55ae5 r6bd7e0 43 43 class Tesselation *TesselStruct; 44 44 TesselPointSTLList Corners; 45 class LinkedCell *LinkedList;45 class LinkedCell_deprecated *LinkedList; 46 46 }; 47 47 -
src/Tesselation/unittests/Tesselation_InsideOutsideUnitTest.cpp
rf55ae5 r6bd7e0 98 98 // create linkedcell 99 99 PointCloudAdaptor< TesselPointSTLList > cloud(&Corners, "TesselPointSTLList"); 100 LinkedList = new LinkedCell (cloud, 2.*SPHERERADIUS);100 LinkedList = new LinkedCell_deprecated(cloud, 2.*SPHERERADIUS); 101 101 102 102 // create tesselation -
src/Tesselation/unittests/Tesselation_InsideOutsideUnitTest.hpp
rf55ae5 r6bd7e0 40 40 class Tesselation *TesselStruct; 41 41 TesselPointSTLList Corners; 42 class LinkedCell *LinkedList;42 class LinkedCell_deprecated *LinkedList; 43 43 }; 44 44
Note:
See TracChangeset
for help on using the changeset viewer.