Ravelin
|
A two-dimensional floating point vector used for computational geometry calculations and without associated frame information. More...
#include <Origin2.h>
Public Member Functions | |
ORIGIN2 (REAL x, REAL y) | |
Constructs this vector with the given values. | |
ORIGIN2 (const REAL *array) | |
Constructs this vector from the given array. More... | |
ORIGIN2 (const VECTOR2 &v) | |
REAL | norm_inf () const |
REAL | norm () const |
REAL | norm_sq () const |
ORIGIN2 & | set_zero () |
ORIGIN2 & | set_zero (unsigned m) |
ORIGIN2 & | set_zero (unsigned m, unsigned n) |
ORIGIN2 & | operator= (const VECTOR2 &v) |
Constructs this vector with the given values. | |
ORIGIN2 & | operator= (const ORIGIN2 &v) |
ORIGIN2 | operator+ (const ORIGIN2 &v) const |
VECTOR2 | operator+ (const VECTOR2 &p) const |
Adds a vector and an origin to yield a vector. | |
VECTOR2 | operator- (const VECTOR2 &p) const |
Subtract a vector from this origin to yield a vector. | |
ORIGIN2 | operator- (const ORIGIN2 &v) const |
ORIGIN2 & | operator+= (const ORIGIN2 &v) |
ORIGIN2 & | operator-= (const ORIGIN2 &v) |
ORIGIN2 & | operator*= (REAL scalar) |
ORIGIN2 & | operator/= (REAL scalar) |
ORIGIN2 | operator* (REAL scalar) const |
ORIGIN2 | operator/ (REAL scalar) const |
ORIGIN2 | operator- () const |
REAL * | data () |
const REAL * | data () const |
REAL & | operator[] (const unsigned i) |
const REAL & | operator[] (const unsigned i) const |
REAL * | data (unsigned i) |
const REAL * | data (unsigned i) const |
const REAL & | x () const |
const REAL & | y () const |
REAL & | x () |
REAL & | y () |
unsigned | size () const |
unsigned | rows () const |
unsigned | columns () const |
unsigned | leading_dim () const |
unsigned | inc () const |
ORIGIN2 & | resize (unsigned m, bool preserve=false) |
Does nothing. | |
ORIGIN2 & | resize (unsigned m, unsigned n, bool preserve=false) |
Does nothing. | |
Static Public Member Functions | |
static REAL | norm (const ORIGIN2 &v) |
static REAL | norm_sq (const ORIGIN2 &v) |
static ORIGIN2 | zero () |
A two-dimensional floating point vector used for computational geometry calculations and without associated frame information.
ORIGIN2::ORIGIN2 | ( | const REAL * | array | ) |
Constructs this vector from the given array.
array | a 2-dimensional (or larger) array |