#include <points.H>
Inheritance diagram for mlib::VEXEL:
Public Types | |
typedef double | value_type |
Public Member Functions | |
Vec2 () | |
Vec2 (double x, double y) | |
VEXEL | operator+ (const VEXEL &v) const |
VEXEL | operator- (const VEXEL &v) const |
VEXEL | operator- () const |
double | operator * (const VEXEL &v) const |
VEXEL | operator * (double s) const |
VEXEL | operator/ (double s) const |
void | operator+= (const VEXEL &v) |
void | operator-= (const VEXEL &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. | |
VEXEL | normalized () const |
Returns a unit-length copy of this vector. | |
VEXEL | perpend () const |
Returns a copy of the vector rotated 90 degrees CCW. | |
double | dist (const VEXEL &v) const |
double | dist_sqrd (const VEXEL &v) const |
double | signed_angle (const VEXEL &) const |
Returns the signed angle between this vector and the given one. | |
double | angle (const VEXEL &v) const |
Returns the unsigned angle between the two vectors. The result will lie between 0 and pi radians. | |
double | tlen (const VEXEL &b) const |
Return (this * b) / (b * b). | |
VEXEL | projected (const VEXEL &b) const |
Returns the projection of this onto b. | |
VEXEL | orthogonalized (const VEXEL &b) const |
Returns this vector minus its projection onto b. | |
bool | is_equal (const VEXEL &v, double epsSqrd=epsNorSqrdMath()) const |
bool | is_parallel (const VEXEL &) const |
bool | operator== (const VEXEL &v) const |
bool | operator!= (const VEXEL &v) const |
Constructors | |
VEXEL () | |
VEXEL (double x, double y) | |
VEXEL (CXYvec &) | |
VEXEL (CNDCvec &) | |
VEXEL (CWpt &, CWvec &) | |
Static Public Member Functions | |
static CVEXEL & | null () |
static CVEXEL & | X () |
static CVEXEL & | Y () |
static int | dim () |
Protected Attributes | |
double | _x |
double | _y |
Static Protected Attributes | |
static CVEXEL | _null_vec |
static CVEXEL | _x_axis |
static CVEXEL | _y_axis |
Definition at line 1096 of file points.H.
|
|
|
|
|
|
|
Definition at line 504 of file points.C. References mlib::Vec2< VEXEL >::_x, mlib::Vec2< VEXEL >::_y, and VIEW_SIZE. |
|
Definition at line 466 of file points.C. References mlib::Vec2< VEXEL >::_x, mlib::Vec2< VEXEL >::_y, VIEW_ASPECT, and VIEW_SIZE. |
|
|
|
Returns the unsigned angle between the two vectors. The result will lie between 0 and pi radians.
|
|
|
|
|
|
|
|
Definition at line 141 of file vec2.H. References mlib::Vec2< V >::dist_sqrd(). |
|
Definition at line 84 of file vec2.H. References mlib::Vec2< V >::_x, and mlib::Vec2< V >::_y. |
|
Tells if the vector is basically the zero vector.
Definition at line 87 of file vec2.H. References mlib::Vec2< V >::length_sqrd(). |
|
|
|
Definition at line 81 of file vec2.H. References mlib::Vec2< V >::_x, and mlib::Vec2< V >::_y. |
|
Definition at line 82 of file vec2.H. References mlib::Vec2< V >::_x, and mlib::Vec2< V >::_y. |
|
Returns a unit-length copy of this vector.
|
|
Definition at line 1117 of file points.H. References _null_vec. |
|
Definition at line 60 of file vec2.H. References mlib::Vec2< V >::_x, and mlib::Vec2< V >::_y. |
|
Definition at line 57 of file vec2.H. References mlib::Vec2< V >::_x, and mlib::Vec2< V >::_y. |
|
Definition at line 65 of file vec2.H. References mlib::Vec2< V >::_x, and mlib::Vec2< V >::_y. |
|
Definition at line 151 of file vec2.H. References mlib::Vec2< V >::_x, and mlib::Vec2< V >::_y. |
|
Definition at line 55 of file vec2.H. References mlib::Vec2< V >::_x, and mlib::Vec2< V >::_y. |
|
Definition at line 63 of file vec2.H. References mlib::Vec2< V >::_x, and mlib::Vec2< V >::_y. |
|
Definition at line 58 of file vec2.H. References mlib::Vec2< V >::_x, and mlib::Vec2< V >::_y. |
|
Definition at line 56 of file vec2.H. References mlib::Vec2< V >::_x, and mlib::Vec2< V >::_y. |
|
Definition at line 64 of file vec2.H. References mlib::Vec2< V >::_x, and mlib::Vec2< V >::_y. |
|
Definition at line 61 of file vec2.H. References mlib::Vec2< V >::_x, and mlib::Vec2< V >::_y. |
|
Definition at line 66 of file vec2.H. References mlib::Vec2< V >::_x, and mlib::Vec2< V >::_y. |
|
Definition at line 150 of file vec2.H. References mlib::Vec2< V >::_x, and mlib::Vec2< V >::_y. |
|
Definition at line 74 of file vec2.H. References mlib::Vec2< V >::_x. |
|
Definition at line 73 of file vec2.H. References mlib::Vec2< V >::_x. |
|
Returns this vector minus its projection onto b.
Definition at line 134 of file vec2.H. References mlib::Vec2< V >::projected(). |
|
Returns a copy of the vector rotated 90 degrees CCW.
Definition at line 100 of file vec2.H. References mlib::Vec2< V >::_x, and mlib::Vec2< V >::_y. |
|
Returns the projection of this onto b.
Definition at line 131 of file vec2.H. References mlib::Vec2< V >::tlen(). |
|
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 125 of file vec2.H. References mlib::isZero(). |
|
|
|
|
|
Definition at line 1118 of file points.H. References _x_axis. |
|
Definition at line 1119 of file points.H. References _y_axis. |
|
Definition at line 1100 of file points.H. Referenced by null(). |
|
Definition at line 32 of file vec2.H. Referenced by VEXEL(). |
|
Definition at line 1101 of file points.H. Referenced by X(). |
|
Definition at line 32 of file vec2.H. Referenced by VEXEL(). |
|
Definition at line 1102 of file points.H. Referenced by Y(). |