Changes in src/Plane.cpp [112b09:82cf79]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified src/Plane.cpp ¶
r112b09 r82cf79 15 15 #include "verbose.hpp" 16 16 #include "Helpers/Assert.hpp" 17 #include "helpers.hpp" 17 18 #include <cmath> 18 19 #include "Line.hpp" … … 106 107 Plane::~Plane() 107 108 {} 109 110 Plane &Plane::operator=(const Plane &rhs){ 111 if(&rhs!=this){ 112 normalVector.reset(new Vector(*rhs.normalVector)); 113 offset = rhs.offset; 114 } 115 return *this; 116 } 108 117 109 118 … … 188 197 } 189 198 199 bool Plane::onSameSide(const Vector &point1,const Vector &point2) const{ 200 return sign(point1.ScalarProduct(*normalVector)-offset) == 201 sign(point2.ScalarProduct(*normalVector)-offset); 202 } 203 190 204 /************ Methods inherited from Space ****************/ 191 205 … … 207 221 // Operators 208 222 223 bool operator==(const Plane &x,const Plane &y){ 224 return *x.normalVector == *y.normalVector && x.offset == y.offset; 225 } 226 209 227 ostream &operator << (ostream &ost,const Plane &p){ 210 228 ost << "<" << p.getNormal() << ";x> - " << p.getOffset() << "=0";
Note:
See TracChangeset
for help on using the changeset viewer.