#include <points.H>
Inheritance diagram for mlib::UVvec:
Public Types | |
typedef double | value_type |
Public Member Functions | |
Vec2 () | |
Vec2 (double x, double y) | |
UVvec | operator+ (const UVvec &v) const |
UVvec | operator- (const UVvec &v) const |
UVvec | operator- () const |
double | operator * (const UVvec &v) const |
UVvec | operator * (double s) const |
UVvec | operator/ (double s) const |
void | operator+= (const UVvec &v) |
void | operator-= (const UVvec &v) |
void | operator *= (double s) |
void | operator/= (double s) |
double | operator[] (int index) const |
double & | operator[] (int index) |
double | length () const |
double | length_sqrd () const |
bool | is_exact_null () const |
bool | is_null (double epsSqrdMath=epsNorSqrdMath()) const |
Tells if the vector is basically the zero vector. | |
UVvec | normalized () const |
Returns a unit-length copy of this vector. | |
UVvec | perpend () const |
Returns a copy of the vector rotated 90 degrees CCW. | |
double | dist (const UVvec &v) const |
double | dist_sqrd (const UVvec &v) const |
double | signed_angle (const UVvec &) const |
Returns the signed angle between this vector and the given one. | |
double | angle (const UVvec &v) const |
Returns the unsigned angle between the two vectors. The result will lie between 0 and pi radians. | |
double | tlen (const UVvec &b) const |
Return (this * b) / (b * b). | |
UVvec | projected (const UVvec &b) const |
Returns the projection of this onto b. | |
UVvec | orthogonalized (const UVvec &b) const |
Returns this vector minus its projection onto b. | |
bool | is_equal (const UVvec &v, double epsSqrd=epsNorSqrdMath()) const |
bool | is_parallel (const UVvec &) const |
bool | operator== (const UVvec &v) const |
bool | operator!= (const UVvec &v) const |
Constructors | |
UVvec () | |
UVvec (double u, double v) | |
Static Public Member Functions | |
static CUVvec & | null () |
static CUVvec & | U () |
static CUVvec & | V () |
static int | dim () |
Protected Attributes | |
double | _x |
double | _y |
Static Protected Attributes | |
static CUVvec | _null_vec |
static CUVvec | _u_dir |
static CUVvec | _v_dir |
Definition at line 1238 of file points.H.
|
|
|
|
|
|
|
Returns the unsigned angle between the two vectors. The result will lie between 0 and pi radians.
|
|
|
|
|
|
|
|
|
|
|
|
Tells if the vector is basically the zero vector.
|
|
|
|
|
|
|
|
Returns a unit-length copy of this vector.
|
|
Definition at line 1256 of file points.H. References _null_vec. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Returns this vector minus its projection onto b.
|
|
Returns a copy of the vector rotated 90 degrees CCW.
|
|
Returns the projection of this onto b.
|
|
Returns the signed angle between this vector and the given one. I.e., returns the angle by which to rotate this vector counter-clockwise to align with the given vector. The result will be negative if the smallest rotation to get to the given vector is in the clockwise direction. The result will lie between -pi and pi radians: |
|
Return (this * b) / (b * b).
|
|
Definition at line 1257 of file points.H. References _u_dir. |
|
Definition at line 1258 of file points.H. References _v_dir. |
|
|
|
|
|
Definition at line 1242 of file points.H. Referenced by null(). |
|
Definition at line 1243 of file points.H. Referenced by U(). |
|
Definition at line 1244 of file points.H. Referenced by V(). |
|
|
|
|