Changes in src/Plane.cpp [82cf79:112b09]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Plane.cpp
r82cf79 r112b09 15 15 #include "verbose.hpp" 16 16 #include "Helpers/Assert.hpp" 17 #include "helpers.hpp"18 17 #include <cmath> 19 18 #include "Line.hpp" … … 107 106 Plane::~Plane() 108 107 {} 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 }117 108 118 109 … … 197 188 } 198 189 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 204 190 /************ Methods inherited from Space ****************/ 205 191 … … 221 207 // Operators 222 208 223 bool operator==(const Plane &x,const Plane &y){224 return *x.normalVector == *y.normalVector && x.offset == y.offset;225 }226 227 209 ostream &operator << (ostream &ost,const Plane &p){ 228 210 ost << "<" << p.getNormal() << ";x> - " << p.getOffset() << "=0";
Note:
See TracChangeset
for help on using the changeset viewer.