#include <pDomain.h>
Public Member Functions | |
PDRectangle (const pVec &p0, const pVec &u0, const pVec &v0) | |
~PDRectangle () | |
bool | Within (const pVec &pos) const |
pVec | Generate () const |
pDomain * | copy () const |
Public Attributes | |
pVec | p |
pVec | u |
pVec | v |
pVec | uNrm |
pVec | vNrm |
pVec | nrm |
float | uLen |
float | vLen |
float | D |
Definition at line 140 of file pDomain.h.
Definition at line 147 of file pDomain.h.
References D, pVec::length(), pVec::normalize(), nrm, p, u, uLen, uNrm, v, vLen, and vNrm.
Referenced by copy().
00148 { 00149 p = p0; 00150 u = u0; 00151 v = v0; 00152 00153 // The rest of this is needed for Avoid and Bounce. 00154 uLen = u.length(); 00155 uNrm = u / uLen; 00156 vLen = v.length(); 00157 vNrm = v / vLen; 00158 00159 nrm = Cross(uNrm, vNrm); // This is the non-unit normal. 00160 nrm.normalize(); // Must normalize it. 00161 00162 D = -(p * nrm); 00163 }
PDRectangle::~PDRectangle | ( | ) | [inline] |
bool PDRectangle::Within | ( | const pVec & | pos | ) | const [inline, virtual] |
pVec PDRectangle::Generate | ( | ) | const [inline, virtual] |
pDomain* PDRectangle::copy | ( | ) | const [inline, virtual] |
Implements pDomain.
Definition at line 181 of file pDomain.h.
References PDRectangle().
00182 { 00183 PDRectangle *P = new PDRectangle(*this); 00184 return P; 00185 }
Definition at line 143 of file pDomain.h.
Referenced by PABounce::Exec(), PAAvoid::Exec(), Generate(), and PDRectangle().
Definition at line 143 of file pDomain.h.
Referenced by PABounce::Exec(), PAAvoid::Exec(), Generate(), and PDRectangle().
Definition at line 143 of file pDomain.h.
Referenced by PABounce::Exec(), PAAvoid::Exec(), Generate(), and PDRectangle().
Definition at line 143 of file pDomain.h.
Referenced by PABounce::Exec(), PAAvoid::Exec(), and PDRectangle().
float PDRectangle::uLen |
float PDRectangle::vLen |
float PDRectangle::D |
Definition at line 144 of file pDomain.h.
Referenced by PABounce::Exec(), PAAvoid::Exec(), and PDRectangle().