Ravelin
|
A three-dimensional floating point vector used for representing points and vectors in 3D with associated frame information. More...
#include <Vector3.h>
Public Member Functions | |
VECTOR3 (boost::shared_ptr< const POSE3 > pose=boost::shared_ptr< const POSE3 >()) | |
VECTOR3 (boost::shared_ptr< POSE3 > pose) | |
VECTOR3 (REAL x, REAL y, REAL z, boost::shared_ptr< const POSE3 > pose=boost::shared_ptr< const POSE3 >()) | |
Constructs this vector with the given values. | |
VECTOR3 (REAL x, REAL y, REAL z, boost::shared_ptr< POSE3 > pose) | |
VECTOR3 (const REAL *array, boost::shared_ptr< const POSE3 > pose=boost::shared_ptr< const POSE3 >()) | |
Constructs this vector from the given array. More... | |
VECTOR3 (const REAL *array, boost::shared_ptr< POSE3 > pose) | |
VECTOR3 (const VECTOR3 &source) | |
VECTOR3 (const ORIGIN3 &source, boost::shared_ptr< const POSE3 > pose) | |
VECTOR3 (const ORIGIN3 &source, boost::shared_ptr< POSE3 > pose) | |
REAL | dot (const VECTOR3 &v) const |
void | normalize () |
void | normalize_or_zero () |
unsigned | size () const |
bool | is_finite () const |
Determines whether all components of this vector are finite. | |
REAL | norm_inf () const |
REAL | norm () const |
REAL | norm_sq () const |
VECTOR3 & | set_zero () |
VECTOR3 & | set_one () |
VECTOR3 & | set_zero (boost::shared_ptr< const POSE3 > pose) |
VECTOR3 & | set_one (boost::shared_ptr< const POSE3 > pose) |
bool | operator< (const VECTOR3 &v) const |
Compares the two vectors lexographically. | |
VECTOR3 & | operator= (const ORIGIN3 &o) |
VECTOR3 & | operator= (const VECTOR3 &v) |
VECTOR3 | operator+ (const VECTOR3 &v) const |
VECTOR3 | operator- (const VECTOR3 &v) const |
VECTOR3 | operator+ (const ORIGIN3 &o) const |
VECTOR3 | operator- (const ORIGIN3 &o) const |
VECTOR3 & | operator+= (const VECTOR3 &v) |
Adds two vectors in the same frame. | |
VECTOR3 & | operator-= (const VECTOR3 &v) |
Subtracts a vector from this (in the same frame) | |
VECTOR3 & | operator+= (const ORIGIN3 &o) |
Adds a vector and an origin. | |
VECTOR3 & | operator-= (const ORIGIN3 &o) |
Subtracts an origin from this vector. | |
VECTOR3 & | operator*= (REAL scalar) |
VECTOR3 | operator* (REAL scalar) const |
VECTOR3 | operator/ (REAL scalar) const |
VECTOR3 & | operator/= (REAL scalar) |
VECTOR3 | operator- () const |
REAL * | data () |
const REAL * | data () const |
unsigned | rows () const |
unsigned | columns () const |
VECTOR3 & | resize (unsigned m, unsigned n, bool preserve=false) |
unsigned | inc () const |
unsigned | leading_dim () const |
REAL & | x () |
const REAL & | x () const |
REAL & | y () |
const REAL & | y () const |
REAL & | z () |
const REAL & | z () const |
REAL & | operator[] (const unsigned i) |
const REAL & | operator[] (const unsigned i) const |
const REAL * | data (unsigned i) const |
REAL * | data (unsigned i) |
COLUMN_ITERATOR | begin () |
CONST_COLUMN_ITERATOR | begin () const |
COLUMN_ITERATOR | end () |
CONST_COLUMN_ITERATOR | end () const |
COLUMN_ITERATOR | column_iterator_begin () |
CONST_COLUMN_ITERATOR | column_iterator_begin () const |
COLUMN_ITERATOR | column_iterator_end () |
CONST_COLUMN_ITERATOR | column_iterator_end () const |
ROW_ITERATOR | row_iterator_begin () |
CONST_ROW_ITERATOR | row_iterator_begin () const |
ROW_ITERATOR | row_iterator_end () |
CONST_ROW_ITERATOR | row_iterator_end () const |
VECTOR3 & | resize (unsigned N, bool keep=true) |
Static Public Member Functions | |
static REAL | dot (const VECTOR3 &v1, const VECTOR3 &v2) |
Computes the dot product between two vectors. | |
static VECTOR3 | normalize (const VECTOR3 &v) |
static REAL | norm (const VECTOR3 &v) |
static REAL | norm_sq (const VECTOR3 &v) |
static VECTOR3 | zero (boost::shared_ptr< const POSE3 > pose=boost::shared_ptr< const POSE3 >()) |
static VECTOR3 | one (boost::shared_ptr< const POSE3 > pose=boost::shared_ptr< const POSE3 >()) |
static VECTOR3 | cross (const VECTOR3 &v1, const VECTOR3 &v2) |
Computes the cross-product of two vectors. | |
static VECTOR3 | determine_orthogonal_vec (const VECTOR3 &v) |
Determines a vector orthogonal to v. More... | |
static void | determine_orthonormal_basis (const VECTOR3 &v1, VECTOR3 &v2, VECTOR3 &v3) |
Computes an orthonormal basis, given a single vector. More... | |
Public Attributes | |
boost::shared_ptr< const POSE3 > | pose |
The frame that this vector is defined in. | |
A three-dimensional floating point vector used for representing points and vectors in 3D with associated frame information.
VECTOR3::VECTOR3 | ( | const REAL * | array, |
boost::shared_ptr< const POSE3 > | pose = boost::shared_ptr<const POSE3>() |
||
) |
Constructs this vector from the given array.
array | a 3-dimensional (or larger) array |
References pose.
Determines a vector orthogonal to v.
Referenced by determine_orthonormal_basis().
Computes an orthonormal basis, given a single vector.
References cross(), and determine_orthogonal_vec().
Referenced by SPHERICALJOINT::assign_axes(), REVOLUTEJOINT::set_axis(), and PLANARJOINT::update_spatial_axes().