#include <vector_2f.h>
Nevrax France
Definition at line 47 of file vector_2f.h.
Public Member Functions | |
Object. | |
CVector | asVector () const |
CVector2f (const CVector &v) | |
Constructor that uses the (x,y) coordinates of a CVector. | |
CVector2f (const CVector2f &v) | |
Copy Constructor. | |
CVector2f (float _x, float _y) | |
Constructor. | |
CVector2f () | |
Constructor wich do nothing. | |
operator CVector () const | |
Misc. | |
bool | isNull () const |
void | maxof (const CVector2f &a, const CVector2f &b) |
Set all vector x/y/z as maximum of a/b x/y/z (respectively). | |
void | minof (const CVector2f &a, const CVector2f &b) |
Set all vector x/y/z as minimum of a/b x/y/z (respectively). | |
bool | operator!= (const CVector2f &v) const |
bool | operator== (const CVector2f &v) const |
void | serial (NLMISC::IStream &f) |
serial. | |
void | set (float _x, float _y) |
Advanced Maths. | |
float | norm () const |
Return the norm of the vector. | |
void | normalize () |
Normalize the vector. | |
CVector2f | normed () const |
Return the vector normalized. | |
float | operator * (const CVector2f &v) const |
Dot product. | |
float | sqrnorm () const |
Return the square of the norm of the vector. | |
Base Maths. | |
CVector2f | operator * (float f) const |
CVector2f & | operator *= (float f) |
CVector2f | operator+ (const CVector2f &v) const |
CVector2f & | operator+= (const CVector2f &v) |
CVector2f | operator- () const |
CVector2f | operator- (const CVector2f &v) const |
CVector2f & | operator-= (const CVector2f &v) |
CVector2f | operator/ (float f) const |
CVector2f & | operator/= (float f) |
Data Fields | |
float | x |
float | y |
Static Public Attributes | |
Constants | |
const CVector2f | Null |
Friends | |
CVector2f | operator * (float f, const CVector2f &v0) |
|
Constructor wich do nothing.
Definition at line 58 of file vector_2f.h. Referenced by operator *(), operator+(), operator-(), and operator/().
00058 {} |
|
Constructor.
Definition at line 60 of file vector_2f.h.
|
|
Copy Constructor.
Definition at line 62 of file vector_2f.h.
|
|
Constructor that uses the (x,y) coordinates of a CVector.
Definition at line 64 of file vector_2f.h.
|
|
Definition at line 68 of file vector_2f.h. Referenced by operator CVector().
|
|
Definition at line 113 of file vector_2f.h. Referenced by NLPACS::CEdgeCollide::testCircleMove().
|
|
Set all vector x/y/z as maximum of a/b x/y/z (respectively).
Definition at line 121 of file vector_2f.h.
|
|
Set all vector x/y/z as minimum of a/b x/y/z (respectively).
Definition at line 115 of file vector_2f.h. References min, x, x, y, and y.
|
|
Return the norm of the vector.
Definition at line 89 of file vector_2f.h. References sqrnorm(). Referenced by NLPACS::COrderedChain::distance(), normalize(), NLPACS::testCirclePoint(), and NLPACS::CEdgeCollide::testEdgeMove().
00089 {return (float)sqrt(sqrnorm());} |
|
Normalize the vector.
Definition at line 93 of file vector_2f.h. References norm(). Referenced by NLPACS::CEdgeCollide::make(), and NLPACS::CEdgeCollide::testCircleMove().
00094 { 00095 float f= norm(); 00096 if(f>0) 00097 *this/=f; 00098 } |
|
Return the vector normalized.
Definition at line 100 of file vector_2f.h. References v. Referenced by NLPACS::CLocalRetriever::snapToInteriorGround().
|
|
Dot product.
Definition at line 87 of file vector_2f.h.
|
|
Definition at line 79 of file vector_2f.h. References CVector2f(), x, and y.
|
|
Definition at line 75 of file vector_2f.h.
|
|
Definition at line 66 of file vector_2f.h. References asVector().
00066 { return this->asVector(); } |
|
Definition at line 112 of file vector_2f.h. References v.
00112 {return !(*this==v);} |
|
Definition at line 77 of file vector_2f.h. References CVector2f(), v, x, and y.
|
|
Definition at line 73 of file vector_2f.h.
|
|
Definition at line 81 of file vector_2f.h. References CVector2f(), x, and y.
|
|
Definition at line 78 of file vector_2f.h. References CVector2f(), v, x, and y.
|
|
Definition at line 74 of file vector_2f.h.
|
|
Definition at line 80 of file vector_2f.h. References CVector2f(), x, and y.
|
|
Definition at line 76 of file vector_2f.h.
|
|
Definition at line 111 of file vector_2f.h.
|
|
serial.
Definition at line 127 of file vector_2f.h. References NLMISC::IStream::serial(), x, and y.
|
|
|
Return the square of the norm of the vector.
Definition at line 91 of file vector_2f.h. Referenced by NLPACS::CLocalRetriever::insurePosition(), and norm().
|
|
Definition at line 140 of file vector_2f.h.
00141 { 00142 return v*f; 00143 } |
|
|
|
|