#include <pDomain.h>
Public Member Functions | |
PDBox (const pVec &e0, const pVec &e1) | |
~PDBox () | |
bool | Within (const pVec &pos) const |
pVec | Generate () const |
pDomain * | copy () const |
Public Attributes | |
pVec | p0 |
pVec | p1 |
pVec | dif |
Definition at line 229 of file pDomain.h.
Definition at line 236 of file pDomain.h.
References dif, p0, p1, pVec::x(), pVec::y(), and pVec::z().
Referenced by copy().
00237 { 00238 p0 = e0; 00239 p1 = e1; 00240 if(e1.x() < e0.x()) { p0.x() = e1.x(); p1.x() = e1.x(); } 00241 if(e1.y() < e0.y()) { p0.y() = e1.y(); p1.y() = e1.y(); } 00242 if(e1.z() < e0.z()) { p0.z() = e1.z(); p1.z() = e1.z(); } 00243 00244 dif = p1 - p0; 00245 }
bool PDBox::Within | ( | const pVec & | pos | ) | const [inline, virtual] |
Implements pDomain.
Definition at line 251 of file pDomain.h.
References p0, p1, pVec::x(), pVec::y(), and pVec::z().
00252 { 00253 return !((pos.x() < p0.x()) || (pos.x() > p1.x()) || 00254 (pos.y() < p0.y()) || (pos.y() > p1.y()) || 00255 (pos.z() < p0.z()) || (pos.z() > p1.z())); 00256 }
pVec PDBox::Generate | ( | ) | const [inline, virtual] |
pDomain* PDBox::copy | ( | ) | const [inline, virtual] |