DSC
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros
Public Member Functions | List of all members
CGLA::ArithVec2Float< T, V > Class Template Reference
Inheritance diagram for CGLA::ArithVec2Float< T, V >:
CGLA::ArithVecFloat< T, V, 2 > CGLA::ArithVec< T, V, N >

Public Member Functions

 ArithVec2Float (T a, T b)
 Construct a 2D float vector.
 
 ArithVec2Float ()
 Construct a 2D float vector.
 
- Public Member Functions inherited from CGLA::ArithVecFloat< T, V, 2 >
 ArithVecFloat (T a) noexcept
 
 ArithVecFloat (T a, T b) noexcept
 
 ArithVecFloat (T a, T b, T c) noexcept
 
 ArithVecFloat (T a, T b, T c, T d) noexcept
 
length () const
 Compute Euclidean length.
 
void normalize ()
 Normalize vector.
 
void cond_normalize ()
 Conditionally normalize vector. The condition being that the vector has non-zero length.
 
- Public Member Functions inherited from CGLA::ArithVec< T, V, N >
void set (T _a, T _b)
 Set all coordinates of a 2D vector.
 
void set (T _a, T _b, T _c)
 Set all coordinates of a 3D vector.
 
void set (T _a, T _b, T _c, T _d)
 Set all coordinates of a 4D vector.
 
const T & operator[] (unsigned int i) const
 Const index operator.
 
T & operator[] (unsigned int i)
 Non-const index operator.
 
const T & operator() (unsigned int i) const
 Const index operator.
 
T & operator() (unsigned int i)
 Non-const index operator.
 
T * get ()
 
const T * get () const
 
bool operator== (const V &v) const
 Equality operator.
 
bool operator== (T k) const
 Equality wrt scalar. True if all coords are equal to scalar.
 
bool operator!= (const V &v) const
 Inequality operator.
 
bool operator!= (T k) const
 Inequality wrt scalar. True if any coord not equal to scalar.
 
bool all_l (const V &v) const
 
bool all_le (const V &v) const
 
bool all_g (const V &v) const
 
bool all_ge (const V &v) const
 
const V & operator*= (T k)
 Assignment multiplication with scalar.
 
const V & operator/= (T k)
 Assignment division with scalar.
 
const V & operator+= (T k)
 Assignment addition with scalar. Adds scalar to each coordinate.
 
const V & operator-= (T k)
 Assignment subtraction with scalar. Subtracts scalar from each coord.
 
const V & operator*= (const V &v)
 
const V & operator/= (const V &v)
 Assigment division with vector. Each coord divided independently.
 
const V & operator+= (const V &v)
 Assignmment addition with vector.
 
const V & operator-= (const V &v)
 Assignment subtraction with vector.
 
const V operator- () const
 Negate vector.
 
const V operator* (const V &v1) const
 
const V operator+ (const V &v1) const
 Add two vectors.
 
const V operator- (const V &v1) const
 Subtract two vectors.
 
const V operator/ (const V &v1) const
 Divide two vectors. Each coord separately.
 
const V operator* (T k) const
 Multiply scalar onto vector.
 
const V operator/ (T k) const
 Divide vector by scalar.
 
const T min_coord () const
 Return the smallest coordinate of the vector.
 
const T max_coord () const
 Return the largest coordinate of the vector.
 

Additional Inherited Members

- Public Types inherited from CGLA::ArithVec< T, V, N >
typedef T ScalarType
 For convenience we define a more meaningful name for the scalar type.
 
typedef V VectorType
 A more meaningful name for vector type.
 
- Static Public Member Functions inherited from CGLA::ArithVec< T, V, N >
static unsigned int get_dim ()
 Return dimension of vector.
 
- Protected Member Functions inherited from CGLA::ArithVec< T, V, N >
 ArithVec ()
 Construct uninitialized vector.
 
 ArithVec (T _a)
 Construct a vector where all coordinates are identical.
 
 ArithVec (T _a, T _b)
 Construct a 2D vector.
 
 ArithVec (T _a, T _b, T _c)
 Construct a 3D vector.
 
 ArithVec (T _a, T _b, T _c, T _d)
 Construct a 4D vector.
 
- Protected Attributes inherited from CGLA::ArithVec< T, V, N >
data [N]
 The actual contents of the vector.
 

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