#include
Inherits INumberVector< F, 2, Vec2_tpl< F > >.
Public Types | |
typedef INumberVector< F, 2, Vec2_tpl< F > > | NV |
Public Member Functions | |
ILINE | Vec2_tpl (type_zero) |
ILINE | Vec2_tpl (F s) |
template | |
ILINE | Vec2_tpl (const Vec2_tpl< F2 > &in) |
ILINE | Vec2_tpl (F vx, F vy) |
ILINE Vec2_tpl & | set (F nx, F ny) |
template | |
ILINE | Vec2_tpl (const F1 *psrc) |
Vec2_tpl & | NormalizeSafe (const struct Vec2_tpl< F > &safe=Vec2Constants< F >::fVec2_Zero) |
Normalize if non-0, otherwise set to specified "safe" value. | |
Vec2_tpl | GetNormalizedSafe (const struct Vec2_tpl< F > &safe=Vec2Constants< F >::fVec2_OneX) const |
ILINE F | GetLength2 () const |
void | SetLength (F fLen) |
ILINE F | area () const |
ILINE | operator F* () |
ILINE Vec2_tpl & | flip () |
ILINE Vec2_tpl & | zero () |
ILINE Vec2_tpl | rot90ccw () const |
ILINE Vec2_tpl | rot90cw () const |
ILINE F | atan2 () const |
ILINE bool | IsZeroFast (F e=(F) 0.0003) const |
ILINE Vec2_tpl | Perp () const |
ILINE F | Cross (const Vec2_tpl &v) const |
The size of the "parallel-trapets" area spanned by the two vectors. | |
ILINE F | operator^ (const Vec2_tpl &v) const |
ILINE F | operator* (const Vec2_tpl &v) const |
ILINE bool | operator== (const Vec2_tpl< F > &o) const |
ILINE bool | operator!= (const Vec2_tpl< F > &o) const |
ILINE void | SetLerp (const Vec2_tpl &p, const Vec2_tpl &q, F t) |
void | SetSlerp (const Vec2_tpl &p, const Vec2_tpl &q, F t) |
Static Public Member Functions | |
static ILINE Vec2_tpl | CreateLerp (const Vec2_tpl &p, const Vec2_tpl &q, F t) |
static ILINE Vec2_tpl | CreateSlerp (const Vec2_tpl &p, const Vec2_tpl &q, F t) |
General-purpose 2D vector implementation
Linear-Interpolation between Vec3 (lerp). Example: Vec3 r=Vec3::CreateLerp( p, q, 0.345f );