#include <ApiGraphics/Vec2.h>
Public Member Functions | |
Vec2 (float x, float y) | |
Vec2 (float c=0) | |
Vec2 (const float *v) | |
Vec2 (const QDomElement &element) | |
operator const float * () const | |
operator float * () | |
QString | toQString () const |
void | initFromDOMElement (const QDomElement &element) |
QDomElement | domElement (const QString &name, QDomDocument &document) const |
float | norm () const |
float | norm2 () const |
void | normalize () |
Vec2 | normalized () const |
float | arg () const |
Vec2 | polar () const |
Vec2 & | operator+= (const Vec2 &a) |
Vec2 & | operator-= (const Vec2 &a) |
Vec2 & | operator *= (const Vec2 &a) |
Vec2 & | operator/= (const Vec2 &a) |
Vec2 & | operator *= (float s) |
Vec2 & | operator/= (float s) |
void | glVertex () const |
Static Public Member Functions | |
static Vec2 | random () |
static Vec2 | random (float min, float max) |
static Vec2 | random (Vec2 min, Vec2 max) |
Friends | |
float | dist (Vec2 v1, Vec2 v2) |
float | dot (const Vec2 &a, const Vec2 &b) |
Vec3 | vec (const Vec2 &a, const Vec2 &b) |
float | vecz (const Vec2 &a, const Vec2 &b) |
float | operator| (const Vec2 &a, const Vec2 &b) |
Vec3 | operator^ (const Vec2 &a, const Vec2 &b) |
Vec2 | operator- (const Vec2 &a) |
Vec2 | operator+ (const Vec2 &a, const Vec2 &b) |
Vec2 | operator- (const Vec2 &a, const Vec2 &b) |
Vec2 | operator * (const Vec2 &a, const Vec2 &b) |
Vec2 | operator/ (const Vec2 &a, const Vec2 &b) |
Vec2 | operator * (float s, const Vec2 &a) |
Vec2 | operator * (const Vec2 &a, float s) |
Vec2 | operator/ (float s, const Vec2 &a) |
Vec2 | operator/ (const Vec2 &a, float s) |
bool | operator== (const Vec2 &a, const Vec2 &b) |
bool | operator!= (const Vec2 &a, const Vec2 &b) |
bool | operator>= (const Vec2 &a, const Vec2 &b) |
bool | operator<= (const Vec2 &a, const Vec2 &b) |
bool | operator> (const Vec2 &a, const Vec2 &b) |
bool | operator< (const Vec2 &a, const Vec2 &b) |
bool | operator>= (const Vec2 &a, float b) |
bool | operator<= (const Vec2 &a, float b) |
bool | operator> (const Vec2 &a, float b) |
bool | operator< (const Vec2 &a, float b) |
Vec2 | abs (const Vec2 &a) |
Vec2 | sign (const Vec2 &a) |
Vec2 | floor (const Vec2 &a) |
Vec2 | ceil (const Vec2 &a) |
Vec2 | fract (const Vec2 &a) |
Vec2 | min (const Vec2 &a, const Vec2 &b) |
Vec2 | min (const Vec2 &a, float b) |
Vec2 | max (const Vec2 &a, const Vec2 &b) |
Vec2 | max (const Vec2 &a, float b) |
Vec2 | clamp (const Vec2 &a, const Vec2 &min, const Vec2 &max) |
Vec2 | clamp (const Vec2 &a, float min, float max) |
Vec2 | mix (const Vec2 &a, const Vec2 &b, const Vec2 &alpha) |
Vec2 | mix (const Vec2 &a, const Vec2 &b, float alpha) |
Vec2 | step (const Vec2 &e, const Vec2 &a) |
Vec2 | step (float e, const Vec2 &a) |
float | min (const Vec2 &a) |
float | max (const Vec2 &a) |