Ion
|
#include "vector.h"
Public Types | |
typedef Vector< Dimension, T > | VectorType |
Convenience typedef for the corresponding Vector type. More... | |
enum | { kDimension = Dimension } |
The dimension of the vector (number of elements). More... | |
typedef T | ValueType |
Public Member Functions | |
Point () | |
The default constructor zero-intializes all elements. More... | |
Point (T e0) | |
Dimension-specific constructors that are passed individual element values. More... | |
Point (T e0, T e1) | |
Point (T e0, T e1, T e2) | |
Point (T e0, T e1, T e2, T e3) | |
Point (const Point< Dimension-1, T > &p, T s) | |
Constructor for a Point of dimension N from a Point of dimension N-1 and a scalar of the correct type, assuming N is at least 2. More... | |
template<typename U > | |
Point (const Point< Dimension, U > &p) | |
Copy constructor from a Point of the same Dimension and any value type that is compatible (via static_cast) with this Point's type. More... | |
void | operator+= (const Point &v) |
Self-modifying operators. More... | |
void | operator+= (const VectorType &v) |
void | operator-= (const VectorType &v) |
void | operator*= (T s) |
void | operator/= (T s) |
const Point | operator- () const |
Unary operators. More... | |
void | Set (T e0) |
Sets the vector values. More... | |
void | Set (T e0, T e1) |
void | Set (T e0, T e1, T e2) |
void | Set (T e0, T e1, T e2, T e3) |
T & | operator[] (int index) |
Mutable element accessor. More... | |
const T & | operator[] (int index) const |
Read-only element accessor. More... | |
T * | Data () |
Returns a pointer to the data for interfacing with other libraries. More... | |
const T * | Data () const |
void | Print (std::ostream &out, const char tag) const |
This is used for printing Vectors and Points to a stream. More... | |
template<char tag> | |
void | Read (std::istream &in) |
This is used for reading Vectors and Points from a stream. More... | |
Static Public Member Functions | |
static const Point | Zero () |
Returns a Point containing all zeroes. More... | |
static const Point | Fill (T value) |
Returns a Point with all elements set to the given value. More... | |
static bool | AreValuesEqual (const VectorBase &v0, const VectorBase &v1) |
Returns true if all values in two instances are equal. More... | |
Protected Member Functions | |
void | Add (const VectorBase &v) |
Derived classes use these protected functions to implement type-safe functions and operators. More... | |
void | Subtract (const VectorBase &v) |
Self-modifying subtraction. More... | |
void | Multiply (T s) |
Self-modifying multiplication by a scalar. More... | |
void | Divide (T s) |
Self-modifying division by a scalar. More... | |
const VectorBase | Negation () const |
Unary negation. More... | |
Static Protected Member Functions | |
static const VectorBase | Divide (const VectorBase &v, T s) |
Binary division by a scalar. More... | |
static const VectorBase | Product (const VectorBase &v0, const VectorBase &v1) |
Binary component-wise multiplication. More... | |
static const VectorBase | Quotient (const VectorBase &v0, const VectorBase &v1) |
Binary component-wise division. More... | |
static const VectorBase | Sum (const VectorBase &v0, const VectorBase &v1) |
Binary component-wise addition. More... | |
static const VectorBase | Difference (const VectorBase &v0, const VectorBase &v1) |
Binary component-wise subtraction. More... | |
static const VectorBase | Scale (const VectorBase &v, T s) |
Binary multiplication by a scalar. More... | |
Friends | |
const Point | operator+ (const Point &p0, const Point &p1) |
Adding two Points produces another Point. More... | |
const Point | operator+ (const Point &p, const VectorType &v) |
Adding a Vector to a Point produces another Point. More... | |
const Point | operator+ (const VectorType &v, const Point &p) |
const Point | operator- (const Point &p, const VectorType &v) |
Subtracting a Vector from a Point produces another Point. More... | |
const VectorType | operator- (const Point &p0, const Point &p1) |
Subtracting two Points results in a Vector. More... | |
const Point | operator* (const Point &p, T s) |
Binary scale and division operators. More... | |
const Point | operator* (T s, const Point &p) |
const Point | operator* (const Point &v, const Point &s) |
const Point | operator/ (const Point &v, const Point &s) |
const Point | operator/ (const Point &p, T s) |
bool | operator== (const Point &p0, const Point &p1) |
Exact equality and inequality comparisons. More... | |
bool | operator!= (const Point &p0, const Point &p1) |
Geometric N-dimensional Point class.
|
inherited |
typedef Vector<Dimension, T> ion::math::Point< Dimension, T >::VectorType |
|
inherited |
|
inline |
|
inlineexplicit |
|
inline |
|
inlineexplicit |
|
protectedinherited |
Derived classes use these protected functions to implement type-safe functions and operators.
Self-modifying addition.
Definition at line 606 of file vector.h.
Referenced by ion::math::Vector< 4, T >::operator+=().
|
staticinherited |
|
inlineinherited |
|
inlineinherited |
|
staticprotectedinherited |
|
protectedinherited |
Self-modifying division by a scalar.
Definition at line 624 of file vector.h.
Referenced by ion::math::Vector< 4, T >::operator/=().
|
staticprotectedinherited |
|
inlinestatic |
|
protectedinherited |
Self-modifying multiplication by a scalar.
Definition at line 618 of file vector.h.
Referenced by ion::math::Vector< 4, T >::operator*=().
|
protectedinherited |
Unary negation.
Definition at line 632 of file vector.h.
Referenced by ion::math::Vector< 4, T >::operator-().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
This is used for printing Vectors and Points to a stream.
Definition at line 83 of file vector.h.
Referenced by ion::math::operator<<().
|
staticprotectedinherited |
|
staticprotectedinherited |
|
inlineinherited |
This is used for reading Vectors and Points from a stream.
Definition at line 95 of file vector.h.
References ion::base::GetExpectedChar().
|
staticprotectedinherited |
|
inherited |
Sets the vector values.
Definition at line 464 of file vector.h.
References ION_STATIC_ASSERT.
Referenced by ion::math::Rotation< T >::Rotation(), and ion::math::ScaleRangeNonUniformly().
|
inherited |
Definition at line 470 of file vector.h.
References ION_STATIC_ASSERT.
|
inherited |
Definition at line 477 of file vector.h.
References ION_STATIC_ASSERT.
|
inherited |
Definition at line 485 of file vector.h.
References ION_STATIC_ASSERT.
|
protectedinherited |
Self-modifying subtraction.
Definition at line 612 of file vector.h.
Referenced by ion::math::Vector< 4, T >::operator-=().
|
staticprotectedinherited |
|
inlinestatic |
Returns a Point containing all zeroes.
Definition at line 320 of file vector.h.
Referenced by ion::math::Range< Dimension, T >::GetCenter(), ion::math::operator*(), ion::math::Rotation< T >::operator*(), and ion::math::ProjectPoint().
|
friend |
|
friend |
|
friend |
|
friend |