PIP 5.6.1
Platform-Independent Primitives
Classes | Macros | Typedefs | Functions
pimathvector.h File Reference

Math vector. More...

#include "pimathbase.h"
#include "pimathcomplex.h"

Classes

class  PIMathVectorT< Size, Type >
 Fixed-size mathematical vector with compile-time size Provides vector operations including arithmetic, normalization, angles, cross product, and dot product. More...
 
class  PIMathVector< Type >
 Template class for dynamic-size mathematical vector Provides vector operations including arithmetic, normalization, angles, cross product, and dot product for dynamic-size vectors. More...
 

Macros

#define PIMV_FOR   for (uint i = 0; i < Size; ++i)
 Vector templated.
 
#define PIMV_FOR   for (uint i = 0; i < c.size(); ++i)
 Vector templated.
 

Typedefs

typedef PIMathVectorT< 2u, int > PIMathVectorT2i
 Two-dimensional fixed-size vector of int.
 
typedef PIMathVectorT< 3u, int > PIMathVectorT3i
 Three-dimensional fixed-size vector of int.
 
typedef PIMathVectorT< 4u, int > PIMathVectorT4i
 Four-dimensional fixed-size vector of int.
 
typedef PIMathVectorT< 2u, double > PIMathVectorT2d
 Two-dimensional fixed-size vector of double.
 
typedef PIMathVectorT< 3u, double > PIMathVectorT3d
 Three-dimensional fixed-size vector of double.
 
typedef PIMathVectorT< 4u, double > PIMathVectorT4d
 Four-dimensional fixed-size vector of double.
 
typedef PIMathVector< int > PIMathVectori
 Dynamic vector of int.
 
typedef PIMathVector< double > PIMathVectord
 Dynamic vector of double.
 

Functions

template<uint Size, typename Type >
PIMathVectorT< Size, Type > operator* (const Type &x, const PIMathVectorT< Size, Type > &v)
 Multiplies a fixed-size vector by a scalar from the left.
 
template<uint Size, typename Type >
PICout operator<< (PICout s, const PIMathVectorT< Size, Type > &v)
 Writes a fixed-size vector to PICout.
 
template<typename Type >
PIMathVector< Type > operator* (const Type &x, const PIMathVector< Type > &v)
 Multiplies a dynamic vector by a scalar from the left.
 
template<typename Type >
PICout operator<< (PICout s, const PIMathVector< Type > &v)
 Writes a dynamic vector to PICout.
 
template<typename P , typename T >
PIBinaryStream< P > & operator<< (PIBinaryStream< P > &s, const PIMathVector< T > &v)
 Serializes a dynamic vector into a PIBinaryStream.
 
template<typename P , typename T >
PIBinaryStream< P > & operator>> (PIBinaryStream< P > &s, PIMathVector< T > &v)
 Deserializes a dynamic vector from a PIBinaryStream.
 

Detailed Description

Math vector.