#include <vector_2d.h>
Nevrax France
Definition at line 48 of file vector_2d.h.
Public Member Functions | |
Object. | |
CVector2d (const CVector2f &v) | |
Constructor with a CVector2f. | |
CVector2d (const CVector2d &v) | |
Copy Constructor. | |
CVector2d (double _x, double _y) | |
Constructor . | |
CVector2d () | |
Constructor wich do nothing. | |
Misc. | |
bool | isNull () const |
void | maxof (const CVector2d &a, const CVector2d &b) |
Set all vector x/y/z as maximum of a/b x/y/z (respectively). | |
void | minof (const CVector2d &a, const CVector2d &b) |
Set all vector x/y/z as minimum of a/b x/y/z (respectively). | |
bool | operator!= (const CVector2d &v) const |
bool | operator== (const CVector2d &v) const |
void | serial (NLMISC::IStream &f) |
serial. | |
void | set (double _x, double _y) |
Advanced Maths. | |
double | norm () const |
Return the norm of the vector. | |
void | normalize () |
Normalize the vector. | |
CVector2d | normed () const |
Return the vector normalized. | |
double | operator * (const CVector2d &v) const |
Dot product. | |
double | sqrnorm () const |
Return the square of the norm of the vector. | |
Base Maths. | |
CVector2d | operator * (double f) const |
CVector2d & | operator *= (double f) |
CVector2d | operator+ (const CVector2d &v) const |
CVector2d & | operator+= (const CVector2d &v) |
CVector2d | operator- () const |
CVector2d | operator- (const CVector2d &v) const |
CVector2d & | operator-= (const CVector2d &v) |
CVector2d | operator/ (double f) const |
CVector2d & | operator/= (double f) |
Data Fields | |
double | x |
double | y |
Friends | |
CVector2d | operator * (double f, const CVector2d &v0) |
|
Constructor wich do nothing.
Definition at line 59 of file vector_2d.h. Referenced by operator *(), operator+(), operator-(), and operator/().
00059 {} |
|
Constructor .
Definition at line 61 of file vector_2d.h.
|
|
Copy Constructor.
Definition at line 63 of file vector_2d.h.
|
|
Constructor with a CVector2f.
Definition at line 65 of file vector_2d.h.
|
|
Definition at line 111 of file vector_2d.h.
|
|
Set all vector x/y/z as maximum of a/b x/y/z (respectively).
Definition at line 119 of file vector_2d.h.
|
|
Set all vector x/y/z as minimum of a/b x/y/z (respectively).
Definition at line 113 of file vector_2d.h. References min, x, x, y, and y.
|
|
Return the norm of the vector.
Definition at line 87 of file vector_2d.h. References sqrnorm(). Referenced by normalize().
00087 {return (double)sqrt(sqrnorm());} |
|
Normalize the vector.
Definition at line 91 of file vector_2d.h. References norm().
00092 { 00093 double f= norm(); 00094 if(f>0) 00095 *this/=f; 00096 } |
|
Return the vector normalized.
Definition at line 98 of file vector_2d.h. References v.
|
|
Dot product.
Definition at line 85 of file vector_2d.h.
|
|
Definition at line 77 of file vector_2d.h. References CVector2d(), x, and y.
|
|
Definition at line 73 of file vector_2d.h.
|
|
Definition at line 110 of file vector_2d.h. References v.
00110 {return !(*this==v);} |
|
Definition at line 75 of file vector_2d.h. References CVector2d(), v, x, and y.
|
|
Definition at line 71 of file vector_2d.h.
|
|
Definition at line 79 of file vector_2d.h. References CVector2d(), x, and y.
|
|
Definition at line 76 of file vector_2d.h. References CVector2d(), v, x, and y.
|
|
Definition at line 72 of file vector_2d.h.
|
|
Definition at line 78 of file vector_2d.h. References CVector2d(), x, and y.
|
|
Definition at line 74 of file vector_2d.h.
|
|
Definition at line 109 of file vector_2d.h.
|
|
serial.
Definition at line 125 of file vector_2d.h. References NLMISC::IStream::serial(), x, and y.
|
|
Definition at line 108 of file vector_2d.h.
|
|
Return the square of the norm of the vector.
Definition at line 89 of file vector_2d.h. Referenced by norm(), and NLPACS::CEdgeCollide::testEdgeMove().
|
|
Definition at line 134 of file vector_2d.h.
00135 { 00136 return v*f; 00137 } |
|
Definition at line 53 of file vector_2d.h. Referenced by maxof(), minof(), and NLPACS::CEdgeCollide::testEdgeMove(). |
|
Definition at line 53 of file vector_2d.h. Referenced by maxof(), minof(), and NLPACS::CEdgeCollide::testEdgeMove(). |