#include <pVec.h>
Public Member Functions | |
pVec (float ax, float ay, float az) | |
pVec (float a) | |
pVec () | |
const float & | x () const |
const float & | y () const |
const float & | z () const |
float & | x () |
float & | y () |
float & | z () |
float | length () const |
float | length2 () const |
float | normalize () |
float | operator * (const pVec &a) const |
pVec | operator * (const float s) const |
pVec | operator/ (const float s) const |
pVec | operator+ (const pVec &a) const |
pVec | operator- (const pVec &a) const |
bool | operator== (const pVec &a) const |
pVec | operator- () |
pVec & | operator+= (const pVec &a) |
pVec & | operator-= (const pVec &a) |
pVec & | operator *= (const float a) |
pVec & | operator/= (const float a) |
pVec & | operator= (const pVec &a) |
Private Attributes | |
float | vx |
float | vy |
float | vz |
Friends | |
pVec | Abs (const pVec &a) |
pVec | CompMult (const pVec &a, const pVec &b) |
pVec | Cross (const pVec &a, const pVec &b) |
std::ostream & | operator<< (std::ostream &os, const pVec &v) |
Definition at line 71 of file pVec.h.
pVec::pVec | ( | float | ax, | |
float | ay, | |||
float | az | |||
) | [inline] |
pVec::pVec | ( | float | a | ) | [inline] |
pVec::pVec | ( | ) | [inline] |
Definition at line 80 of file pVec.h.
Referenced by operator *(), operator+(), operator-(), and operator/().
const float& pVec::x | ( | ) | const [inline] |
Definition at line 82 of file pVec.h.
References vx.
Referenced by NewBasis(), operator *(), operator+(), operator+=(), operator-(), operator-=(), operator=(), operator==(), PDBox::PDBox(), pGetParticlePointer(), pGetParticles(), pVertex(), and PDBox::Within().
00082 { return vx; }
const float& pVec::y | ( | ) | const [inline] |
Definition at line 83 of file pVec.h.
References vy.
Referenced by NewBasis(), operator *(), operator+(), operator+=(), operator-(), operator-=(), operator=(), operator==(), PDBox::PDBox(), pGetParticles(), and PDBox::Within().
00083 { return vy; }
const float& pVec::z | ( | ) | const [inline] |
Definition at line 84 of file pVec.h.
References vz.
Referenced by NewBasis(), operator *(), operator+(), operator+=(), operator-(), operator-=(), operator=(), operator==(), PDBox::PDBox(), pGetParticles(), and PDBox::Within().
00084 { return vz; }
float& pVec::x | ( | ) | [inline] |
float& pVec::y | ( | ) | [inline] |
float& pVec::z | ( | ) | [inline] |
float pVec::length | ( | ) | const [inline] |
Definition at line 90 of file pVec.h.
References sqrtf(), vx, vy, and vz.
Referenced by PABounce::Exec(), PAAvoid::Exec(), PDRectangle::PDRectangle(), and PDTriangle::PDTriangle().
float pVec::length2 | ( | ) | const [inline] |
Definition at line 95 of file pVec.h.
Referenced by PABounce::Exec(), PAAvoid::Exec(), PDSphere::Generate(), PDCone::PDCone(), PDCylinder::PDCylinder(), PDBlob::Within(), PDSphere::Within(), PDCone::Within(), and PDCylinder::Within().
float pVec::normalize | ( | ) | [inline] |
Definition at line 100 of file pVec.h.
References sqrtf(), vx, vy, and vz.
Referenced by PABounce::Exec(), PAAvoid::Exec(), PDSphere::Generate(), PDCone::PDCone(), PDCylinder::PDCylinder(), PDDisc::PDDisc(), PDPlane::PDPlane(), PDRectangle::PDRectangle(), PDTriangle::PDTriangle(), and pOrbitLine().
00101 { 00102 float onel = 1.0f / sqrtf(vx*vx+vy*vy+vz*vz); 00103 vx *= onel; 00104 vy *= onel; 00105 vz *= onel; 00106 00107 return onel; 00108 }
float pVec::operator * | ( | const pVec & | a | ) | const [inline] |
pVec pVec::operator * | ( | const float | s | ) | const [inline] |
pVec pVec::operator/ | ( | const float | s | ) | const [inline] |
bool pVec::operator== | ( | const pVec & | a | ) | const [inline] |
pVec pVec::operator- | ( | ) | [inline] |
pVec& pVec::operator *= | ( | const float | a | ) | [inline] |
pVec& pVec::operator/= | ( | const float | a | ) | [inline] |
std::ostream& operator<< | ( | std::ostream & | os, | |
const pVec & | v | |||
) | [friend] |
float pVec::vx [private] |
Definition at line 73 of file pVec.h.
Referenced by length(), length2(), normalize(), operator *(), operator *=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator=(), operator==(), and x().
float pVec::vy [private] |
Definition at line 73 of file pVec.h.
Referenced by length(), length2(), normalize(), operator *(), operator *=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator=(), operator==(), and y().
float pVec::vz [private] |
Definition at line 73 of file pVec.h.
Referenced by length(), length2(), normalize(), operator *(), operator *=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator=(), operator==(), and z().