Vector2.h File Reference

Go to the source code of this file.

Classes

class  CubbyFlow::Vector< T, 2 >
 2-D vector class. More...
 
struct  CubbyFlow::ScalarType< Vector< T, 2 > >
 Returns the type of the value itself. More...
 

Namespaces

 CubbyFlow
 

Typedefs

template<typename T >
using CubbyFlow::Vector2 = Vector< T, 2 >
 Type alias for two dimensional vector. More...
 
using CubbyFlow::Vector2F = Vector2< float >
 Float-type 2D vector. More...
 
using CubbyFlow::Vector2D = Vector2< double >
 Double-type 2D vector. More...
 

Functions

template<typename T >
Vector< T, 2 > CubbyFlow::operator+ (const Vector< T, 2 > &a)
 Positive sign operator. More...
 
template<typename T >
Vector< T, 2 > CubbyFlow::operator- (const Vector< T, 2 > &a)
 Negative sign operator. More...
 
template<typename T >
Vector< T, 2 > CubbyFlow::operator+ (T a, const Vector< T, 2 > &b)
 Computes (a, a) + (b.x, b.y). More...
 
template<typename T >
Vector< T, 2 > CubbyFlow::operator+ (const Vector< T, 2 > &a, const Vector< T, 2 > &b)
 Computes (a.x, a.y) + (b.x, b.y). More...
 
template<typename T >
Vector< T, 2 > CubbyFlow::operator- (const Vector< T, 2 > &a, T b)
 Computes (a.x, a.y) - (b, b). More...
 
template<typename T >
Vector< T, 2 > CubbyFlow::operator- (T a, const Vector< T, 2 > &b)
 Computes (a, a) - (b.x, b.y). More...
 
template<typename T >
Vector< T, 2 > CubbyFlow::operator- (const Vector< T, 2 > &a, const Vector< T, 2 > &b)
 Computes (a.x, a.y) - (b.x, b.y). More...
 
template<typename T >
Vector< T, 2 > CubbyFlow::operator* (const Vector< T, 2 > &a, T b)
 Computes (a.x, a.y) * (b, b). More...
 
template<typename T >
Vector< T, 2 > CubbyFlow::operator* (T a, const Vector< T, 2 > &b)
 Computes (a, a) * (b.x, b.y). More...
 
template<typename T >
Vector< T, 2 > CubbyFlow::operator* (const Vector< T, 2 > &a, const Vector< T, 2 > &b)
 Computes (a.x, a.y) * (b.x, b.y). More...
 
template<typename T >
Vector< T, 2 > CubbyFlow::operator/ (const Vector< T, 2 > &a, T b)
 Computes (a.x, a.y) / (b, b). More...
 
template<typename T >
Vector< T, 2 > CubbyFlow::operator/ (T a, const Vector< T, 2 > &b)
 Computes (a, a) / (b.x, b.y). More...
 
template<typename T >
Vector< T, 2 > CubbyFlow::operator/ (const Vector< T, 2 > &a, const Vector< T, 2 > &b)
 Computes (a.x, a.y) / (b.x, b.y). More...
 
template<typename T >
Vector< T, 2 > CubbyFlow::Min (const Vector< T, 2 > &a, const Vector< T, 2 > &b)
 Returns element-wise min vector: (min(a.x, b.x), min(a.y, b.y)). More...
 
template<typename T >
Vector< T, 2 > CubbyFlow::Max (const Vector< T, 2 > &a, const Vector< T, 2 > &b)
 Returns element-wise max vector: (max(a.x, b.x), max(a.y, b.y)). More...
 
template<typename T >
Vector< T, 2 > CubbyFlow::Clamp (const Vector< T, 2 > &v, const Vector< T, 2 > &low, const Vector< T, 2 > &high)
 Returns element-wise clamped vector. More...
 
template<typename T >
Vector< T, 2 > CubbyFlow::Ceil (const Vector< T, 2 > &a)
 Returns element-wise ceiled vector. More...
 
template<typename T >
Vector< T, 2 > CubbyFlow::Floor (const Vector< T, 2 > &a)
 Returns element-wise floored vector. More...
 
template<>
constexpr Vector< float, 2 > CubbyFlow::Zero< Vector< float, 2 > > ()
 Returns float-type zero vector. More...
 
template<>
constexpr Vector< double, 2 > CubbyFlow::Zero< Vector< double, 2 > > ()
 Returns double-type zero vector. More...
 
template<typename T >
Vector< T, 2 > CubbyFlow::MonotonicCatmullRom (const Vector< T, 2 > &v0, const Vector< T, 2 > &v1, const Vector< T, 2 > &v2, const Vector< T, 2 > &v3, T f)
 Computes monotonic Catmull-Rom interpolation. More...