Changes in src/tesselation.cpp [68f03d:8f215d]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/tesselation.cpp
r68f03d r8f215d 21 21 #include "Plane.hpp" 22 22 #include "Exceptions/LinearDependenceException.hpp" 23 #include "Helpers/Assert.hpp" 23 24 24 25 class molecule; … … 682 683 } 683 684 685 /** 686 * gets the Plane defined by the three triangle Basepoints 687 */ 688 Plane BoundaryTriangleSet::getPlane() const{ 689 ASSERT(endpoints[0] && endpoints[1] && endpoints[2], "Triangle not fully defined"); 690 691 return Plane(*endpoints[0]->node->node, 692 *endpoints[1]->node->node, 693 *endpoints[2]->node->node); 694 } 695 696 Vector BoundaryTriangleSet::getEndpoint(int i) const{ 697 ASSERT(i>=0 && i<3,"Index of Endpoint out of Range"); 698 699 return *endpoints[i]->node->node; 700 } 701 702 string BoundaryTriangleSet::getEndpointName(int i) const{ 703 ASSERT(i>=0 && i<3,"Index of Endpoint out of Range"); 704 705 return endpoints[i]->node->getName(); 706 } 707 684 708 /** output operator for BoundaryTriangleSet. 685 709 * \param &ost output stream … … 688 712 ostream &operator <<(ostream &ost, const BoundaryTriangleSet &a) 689 713 { 690 ost << "[" << a.Nr << "|" << a. endpoints[0]->node->getName() << "," << a.endpoints[1]->node->getName() << "," << a.endpoints[2]->node->getName() << "]";714 ost << "[" << a.Nr << "|" << a.getEndpointName(0) << "," << a.getEndpointName(1) << "," << a.getEndpointName(2) << "]"; 691 715 // ost << "[" << a.Nr << "|" << a.endpoints[0]->node->Name << " at " << *a.endpoints[0]->node->node << "," 692 716 // << a.endpoints[1]->node->Name << " at " << *a.endpoints[1]->node->node << "," << a.endpoints[2]->node->Name << " at " << *a.endpoints[2]->node->node << "]"; … … 1455 1479 CenterVector.Zero(); 1456 1480 for (int i = 0; i < 3; i++) 1457 CenterVector += (*BTS->endpoints[i]->node->node);1481 CenterVector += BTS->getEndpoint(i); 1458 1482 CenterVector.Scale(1. / 3.); 1459 1483 DoLog(2) && (Log() << Verbose(2) << "CenterVector of base triangle is " << CenterVector << endl); … … 4802 4826 if (LastTriangle != NULL) { 4803 4827 stringstream sstr; 4804 sstr << "-"<< TrianglesOnBoundary.size() << "-" << LastTriangle-> endpoints[0]->node->getName() << "_" << LastTriangle->endpoints[1]->node->getName() << "_" << LastTriangle->endpoints[2]->node->getName();4828 sstr << "-"<< TrianglesOnBoundary.size() << "-" << LastTriangle->getEndpointName(0) << "_" << LastTriangle->getEndpointName(1) << "_" << LastTriangle->getEndpointName(2); 4805 4829 NumberName = sstr.str(); 4806 4830 if (DoTecplotOutput) {
Note:
See TracChangeset
for help on using the changeset viewer.