Ravelin
Public Member Functions | Static Public Member Functions | List of all members
ORIGIN2 Class Reference

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
 
ORIGIN2set_zero ()
 
ORIGIN2set_zero (unsigned m)
 
ORIGIN2set_zero (unsigned m, unsigned n)
 
ORIGIN2operator= (const VECTOR2 &v)
 Constructs this vector with the given values.
 
ORIGIN2operator= (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
 
ORIGIN2operator+= (const ORIGIN2 &v)
 
ORIGIN2operator-= (const ORIGIN2 &v)
 
ORIGIN2operator*= (REAL scalar)
 
ORIGIN2operator/= (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
 
ORIGIN2resize (unsigned m, bool preserve=false)
 Does nothing.
 
ORIGIN2resize (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 ()
 

Detailed Description

A two-dimensional floating point vector used for computational geometry calculations and without associated frame information.

Constructor & Destructor Documentation

ORIGIN2::ORIGIN2 ( const REAL *  array)

Constructs this vector from the given array.

Parameters
arraya 2-dimensional (or larger) array

The documentation for this class was generated from the following files: