All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Nimble Namespace Reference

Nimble library is a collection of C++ classes for 2D/3D graphics. More...

Namespaces

namespace  Math
 Math functions and constants for Nimble.
 

Classes

class  ClipStack
 This class provides an implementation of a clipping stack. More...
 
class  Frame4f
 Frame of four floats. More...
 
class  Histogram
 Histogram calculation. More...
 
class  Interpolating
 Catmull-Rom. More...
 
class  KeyStone
 Keystone class for transforming between different (skewed) 2D coordinate systems, while taking account possible radial (camera lens) distortion. More...
 
class  LensCorrection
 Camera distortion correction. More...
 
class  LinearInterpolator
 Performs linear interpolation of non-uniform samples. More...
 
class  LineSegment2T
 2D line segment More...
 
class  Matrix2T
 2x2 transformation matrix More...
 
class  Matrix3T
 3x3 transformation matrix More...
 
class  Matrix4T
 4x4 transformation matrix More...
 
class  Path
 Path provides some utility functions to manipulate series of points. More...
 
class  Plane
 Plane is represented by dot(N, X) = c, where N is a unit-length normal vector, c is the plane constant and X is any point on the plane. More...
 
class  QuaternionT
 A quaternion class. More...
 
class  RampT
 Linear interpolation. More...
 
class  RandomGaussian
 RandomGaussian generates pseudo-random numbers from a normal (gaussian) distribution. More...
 
class  RandomUniform
 Random number generator with uniform distribution. More...
 
class  RangeT
 Numeric range representation. More...
 
class  Rectangle
 
A rectangle is defined by origin (O), two unit-length axis vectors

(U, V), and two non-negative extents (e1, e2). More...

 
class  RectT
 An axis-aligned rectangle. More...
 
class  SizeT
 This class defines the size of a two-dimensional object. More...
 
class  SmoothingFilterT
 This class uses simple first-order IIR filter to provide a smoothing of input samples. More...
 
class  Vector2T
 Two-dimensional vector class for 2D mathematics. More...
 
class  Vector3T
 Three-dimensional vector class for 3D mathematics. More...
 
class  Vector4T
 A four-dimensional homogenic vector class for 3D graphics. More...
 

Typedefs

typedef Histogram< int, 256 > Histogrami256
 Histogram of signed integers.
 
typedef Histogram< unsigned
int, 1024 > 
Histogramu1024
 Histogram of 1024 unsigned integers.
 
typedef Histogram< unsigned
int, 256 > 
Histogramu256
 Histogram of 256 unsigned integers.
 
typedef Histogram< unsigned
int, 64 > 
Histogramu64
 Histogram of 64 unsigned integers.
 
typedef LineSegment2T< float > LineSegment2
 Line segment of floats.
 
typedef LineSegment2T< double > LineSegment2d
 Line segment of doubles.
 
typedef LineSegment2T< float > LineSegment2f
 Line segment of floats.
 
typedef Matrix2T< float > Matrix2
 2x2 matrix of floats
 
typedef Matrix2T< double > Matrix2d
 2x2 matrix of doubles
 
typedef Matrix2T< float > Matrix2f
 2x2 matrix of floats
 
typedef Matrix3T< float > Matrix3
 3x3 matrix of floats
 
typedef Matrix3T< double > Matrix3d
 3x3 matrix of doubles
 
typedef Matrix3T< float > Matrix3f
 3x3 matrix of floats
 
typedef Matrix4T< float > Matrix4
 4x4 matrix of floats
 
typedef Matrix4T< double > Matrix4d
 4x4 matrix of doubles
 
typedef Matrix4T< float > Matrix4f
 4x4 matrix of floats
 
typedef QuaternionT< float > Quaternion
 Default (float) quaternion type.
 
typedef QuaternionT< double > Quaterniond
 Quaternion of type double.
 
typedef QuaternionT< float > Quaternionf
 Quaternion of type float.
 
typedef RampT< double, unsigned > Rampd
 Ramp of doubles.
 
typedef RampT< double, double > Rampdd
 Ramp of doubles.
 
typedef RampT< float, unsigned > Rampf
 Ramp of floats.
 
typedef RampT< float, float > Rampff
 Ramp of floats.
 
typedef RangeT< double > Ranged
 RangeT for doubles.
 
typedef RangeT< float > Rangef
 RangeT for float.
 
typedef RangeT< int > Rangei
 RangeT for ints.
 
typedef RangeT< long > Rangel
 RangeT for long ints.
 
typedef RectT< float > Rect
 Rectangle of floats.
 
typedef RectT< double > Rectd
 Rectangle of doubles.
 
typedef RectT< float > Rectf
 Rectangle of floats.
 
typedef RectT< int > Recti
 Rectangle of ints.
 
typedef SizeT< int > Size
 Two-dimensional size using integer precision.
 
typedef SizeT< float > SizeF
 Two-dimensional size using floating-point precision.
 
typedef SizeT< int > SizeI
 Two-dimensional size using integer precision.
 
typedef SmoothingFilterT< double > SmoothingFilterDouble
 Rolling average of doubles.
 
typedef SmoothingFilterT< float > SmoothingFilterFloat
 Rolling average of floats.
 
typedef SmoothingFilterT< Vector2SmoothingFilterVector2
 Rolling average of Vector2s.
 
typedef SmoothingFilterT< Vector3SmoothingFilterVector3
 Rolling average of Vector3s.
 
typedef SmoothingFilterT< Vector4SmoothingFilterVector4
 Rolling average of Vector4s.
 
typedef Vector2T< float > Vector2
 Vector of two floats.
 
typedef Vector2T< double > Vector2d
 Vector of two doubles.
 
typedef Vector2T< float > Vector2f
 Vector of two floats.
 
typedef Vector2T< int > Vector2i
 Vector of two ints.
 
typedef Vector2T< unsigned int > Vector2u
 Vector of two unsigned ints.
 
typedef Vector2T< unsigned char > Vector2ub
 Vector of two unsigned chars.
 
typedef Vector3T< float > Vector3
 Vector of three floats.
 
typedef Vector3T< double > Vector3d
 Vector of three doubles.
 
typedef Vector3T< float > Vector3f
 Vector of three floats.
 
typedef Vector3T< int > Vector3i
 Vector of three ints.
 
typedef Vector3T< unsigned int > Vector3u
 Vector of three unsigned ints.
 
typedef Vector3T< unsigned char > Vector3ub
 Vector of three unsigned chars.
 
typedef Vector4T< float > Vector4
 Vector of four floats.
 
typedef Vector4T< double > Vector4d
 Vector of four doubles.
 
typedef Vector4T< float > Vector4f
 Vector of four floats.
 
typedef Vector4T< int > Vector4i
 Vector of four ints.
 
typedef Vector4T< unsigned int > Vector4u
 Vector of four unsigned ints.
 
typedef Vector4T< unsigned char > Vector4ub
 Vector of four unsigned chars.
 

Enumerations

enum  LineSlopeType { LS_VERTICAL, LS_SLOPING, LS_HORIZONTAL }
 

Functions

template<class T >
abs (const Nimble::Vector2T< T > &t)
 Return the length of the vector. More...
 
template<class T >
abs (const Nimble::Vector3T< T > &t)
 Return the length of the vector. More...
 
template<class T >
abs (const Vector4T< T > &t)
 Get the length of the vector. More...
 
template<class T >
cross (const Vector2T< T > &a, const Vector2T< T > &b)
 Compute the cross product of two 2d vectors by assuming the z components are zero Returns the magnitude (z component) of the resulting vector.
 
template<class T >
Nimble::Vector3T< T > cross (const Nimble::Vector3T< T > &a, const Nimble::Vector3T< T > &b)
 Return the cross-product of two vectors. More...
 
template<class T >
dot (const Vector2T< T > &t1, const Vector2T< T > &t2)
 Compute the dot product of two vectors. More...
 
template<class K , class T >
dot (const Nimble::Vector3T< K > &a, const Nimble::Vector3T< T > &b)
 Compute the dot product of two vectors. More...
 
template<class T >
dot (const Vector4T< T > &a, const Vector4T< T > &b)
 Returns 4D dot product of the two Vector4T objects.
 
template<class T >
evalCatmullRom (float t, const std::vector< T > &cp, size_t index=0)
 Evaluate a cubic Catmull-Rom spline on an interval. More...
 
template<class T >
evalCatmullRomDerivate (float t, const std::vector< T > &cp, size_t index)
 Evaluate the derivative of a Catmull-Rom spline at the given position.
 
template<typename T >
bool linesIntersect (Vector2T< T > line1Start, Vector2T< T > line1End, Vector2T< T > line2Start, Vector2T< T > line2End, Vector2T< T > *interPoint=0)
 Test for intersection of line segments. More...
 
template<typename T >
Decltype< T, float >::mul lineSlope (const Nimble::Vector2T< T > &lineStart, const Nimble::Vector2T< T > &lineEnd, int &slopeType, Nimble::Vector2T< T > &delta)
 Compute slope of line. More...
 
template<class T >
Matrix4T< T > mul (const Matrix4T< T > &m1, const Matrix4T< T > &m2)
 Multiply two matrices. More...
 
template<class T >
Matrix4T< T > operator* (const Matrix4T< T > &, const Matrix4T< T > &)
 Compute the product of two matrices.
 
template<class T >
Vector4T< T > operator* (const Matrix4T< T > &, const Vector4T< T > &)
 Compute the product of the given matrix and vector.
 
template<typename T , typename U >
SizeT< typename Decltype< T, U >
::mul
operator* (const SizeT< T > &size, U scalar)
 Scale size by given scalar. More...
 
template<typename T , typename U >
SizeT< typename Decltype< U, T >
::mul
operator* (U scalar, const SizeT< T > &size)
 Scale size by given scalar. More...
 
template<class T >
Matrix2T< T > operator* (const Matrix2T< T > &m1, const Matrix2T< T > &m2)
 Multiply two matrices together.
 
template<class T >
Vector2T< T > operator* (const Matrix2T< T > &m1, const Vector2T< T > &m2)
 Multiply a matrix and a vector.
 
template<class T , class S , typename = typename std::enable_if<std::is_arithmetic<S>::value>::type>
Vector3T< typename Decltype< T,
S >::mul
operator* (const Nimble::Vector3T< T > &v, S s)
 Multiply vector with a scalar (v * s) More...
 
template<class T , class S , typename = typename std::enable_if<std::is_arithmetic<S>::value>::type>
Vector3T< typename Decltype< S,
T >::mul
operator* (S s, const Nimble::Vector3T< T > &v)
 Multiply vector with a scalar (s * v) More...
 
template<class T , class S , typename = typename std::enable_if<std::is_arithmetic<S>::value>::type>
Vector4T< typename Decltype< T,
S >::mul
operator* (const Nimble::Vector4T< T > &v, S s)
 Multiply vector with a scalar (v * s) More...
 
template<class T , class S , typename = typename std::enable_if<std::is_arithmetic<S>::value>::type>
Vector4T< typename Decltype< S,
T >::mul
operator* (S s, const Nimble::Vector4T< T > &v)
 Multiply vector with a scalar (s * v) More...
 
template<class T , class S , typename = typename std::enable_if<std::is_arithmetic<S>::value>::type>
Vector2T< typename Decltype< T,
S >::mul
operator* (const Nimble::Vector2T< T > &v, S s)
 Multiply vector with a scalar (v * s) More...
 
template<class T , class S , typename = typename std::enable_if<std::is_arithmetic<S>::value>::type>
Vector2T< typename Decltype< S,
T >::mul
operator* (S s, const Nimble::Vector2T< T > &v)
 Multiply vector with a scalar (s * v) More...
 
template<class T >
Nimble::Matrix3T< T > operator* (const Nimble::Matrix3T< T > &m1, const Nimble::Matrix3T< T > &m2)
 Multiply two matrices together.
 
template<class K , class T >
Nimble::Vector3T< T > operator* (const Nimble::Matrix3T< K > &m1, const Nimble::Vector3T< T > &m2)
 Multiply a matrix and a vector.
 
template<typename T , typename U >
SizeT< T > & operator*= (SizeT< T > &lhs, U s)
 Scales the given size. More...
 
template<class T >
Vector2T< T > operator+ (const Vector2T< T > &v1, const Vector2T< T > &v2)
 Add two vectors.
 
template<class T >
Matrix2T< T > operator+ (const Matrix2T< T > &m1, const Matrix2T< T > &m2)
 Add two matrices together.
 
template<class T >
Vector4T< T > operator+ (const Vector4T< T > &v1, const Vector4T< T > &v2)
 Add two vectors.
 
template<class T >
Vector2T< T > operator- (const Vector2T< T > &v1, const Vector2T< T > &v2)
 Subract two vectors.
 
template<class T >
Vector4T< T > operator- (const Vector4T< T > &v1, const Vector4T< T > &v2)
 Subtract two vectors.
 
template<class T >
Matrix2T< T > operator- (const Matrix2T< T > &m1, const Matrix2T< T > &m2)
 Subtract a matrix from another.
 
template<typename T , typename U >
SizeT< typename Decltype< T, U >
::div > 
operator/ (const SizeT< T > &size, U scalar)
 Divide the size component-wise by the given scalar. More...
 
template<typename T , typename U >
SizeT< typename Decltype< U, T >
::div > 
operator/ (U scalar, const SizeT< T > &size)
 Divide the size component-wise by the given scalar. More...
 
template<typename T , typename U >
SizeT< T > & operator/= (SizeT< T > &lhs, U s)
 Divides the given size. More...
 
template<class T >
std::ostream & operator<< (std::ostream &os, const Nimble::Matrix2T< T > &m)
 Output the given matrix to a stream. More...
 
template<class T >
std::ostream & operator<< (std::ostream &os, const Nimble::Vector2T< T > &t)
 Write a vector into a stream.
 
template<class T >
std::ostream & operator<< (std::ostream &os, const Nimble::Vector3T< T > &t)
 Output the given vector to a stream. More...
 
template<>
std::ostream & operator<< (std::ostream &os, const Nimble::Vector3T< uint8_t > &t)
 Output the given vector to a stream. More...
 
template<class T >
std::ostream & operator<< (std::ostream &os, const Nimble::Vector4T< T > &t)
 Serialize a 4D vector into a stream.
 
template<class K , class T >
K & operator<< (K &os, const Nimble::Vector2T< T > &t)
 Output the given vector to a stream. More...
 
template<typename T >
std::ostream & operator<< (std::ostream &s, const QuaternionT< T > &v)
 Serialization operator for Quaternions.
 
template<class T >
std::ostream & operator<< (std::ostream &os, const Nimble::SizeT< T > &t)
 Write a size into a stream.
 
template<class T >
std::ostream & operator<< (std::ostream &os, const Nimble::RectT< T > &t)
 Write a rect into a stream.
 
template<class T >
std::ostream & operator<< (std::ostream &os, const Matrix4T< T > &m)
 Output the given matrix to a stream. More...
 
template<class T >
std::ostream & operator<< (std::ostream &os, const Nimble::Matrix3T< T > &m)
 Output the given matrix to a stream. More...
 
template<class T >
std::istream & operator>> (std::istream &is, Nimble::Matrix2T< T > &m)
 Read a matrix from a stream. More...
 
template<class T >
std::istream & operator>> (std::istream &is, Nimble::Vector2T< T > &t)
 Read a vector from a stream.
 
template<class T >
std::istream & operator>> (std::istream &is, Nimble::Vector3T< T > &t)
 Read the given vector from a stream. More...
 
template<class T >
std::istream & operator>> (std::istream &is, Nimble::Vector4T< T > &t)
 De-serialize a 4D vector from a stream.
 
template<>
std::istream & operator>> (std::istream &is, Nimble::Vector3T< uint8_t > &t)
 Read the given vector from a stream. More...
 
template<class T >
std::istream & operator>> (std::istream &is, Nimble::SizeT< T > &t)
 Read a size from a stream.
 
template<class T >
std::istream & operator>> (std::istream &is, Nimble::RectT< T > &t)
 Read a rect from a stream.
 
template<class T >
std::istream & operator>> (std::istream &is, Matrix4T< T > &m)
 Read a matrix from a stream. More...
 
template<class T >
std::istream & operator>> (std::istream &is, Nimble::Matrix3T< T > &m)
 Read a matrix from a stream. More...
 
template<class T >
Vector4T< T > projection (const Vector4T< T > &u, const Vector4T< T > &v)
 Compute the projection of v onto u. More...
 

Detailed Description

Nimble library is a collection of C++ classes for 2D/3D graphics.

Nimble is used mostly for simple arithmetic/geometric calculations. The code is optimized for performance, thus there are a lot of inline functions. Also, the vector and matrix classes do not initialize any of their members.

The matrix and vector classes use right-handed coordinates.

Enumeration Type Documentation

Function Documentation

template<class T >
T Nimble::abs ( const Nimble::Vector2T< T > &  t)
inline

Return the length of the vector.

Parameters
tvector whose length to get
Returns
length of the vector
template<class T >
T Nimble::abs ( const Nimble::Vector3T< T > &  t)
inline

Return the length of the vector.

Parameters
tvector whose length to get
Returns
length of the vector
template<class T >
T Nimble::abs ( const Vector4T< T > &  t)
inline

Get the length of the vector.

Parameters
tvector whose length to get
Returns
length of the vector
template<class T >
Nimble::Vector3T<T> Nimble::cross ( const Nimble::Vector3T< T > &  a,
const Nimble::Vector3T< T > &  b 
)
inline

Return the cross-product of two vectors.

Parameters
afirst vector
bsecond vector
Returns
cross-product of the two vectors
template<class T >
T Nimble::dot ( const Vector2T< T > &  t1,
const Vector2T< T > &  t2 
)
inline

Compute the dot product of two vectors.

Parameters
t1first dot product vector
t2second dot product vector
Returns
Dot product
template<class K , class T >
T Nimble::dot ( const Nimble::Vector3T< K > &  a,
const Nimble::Vector3T< T > &  b 
)
inline

Compute the dot product of two vectors.

Parameters
afirst vector
bsecond vector
Returns
the dot product of the given vectors
template<class T >
T Nimble::evalCatmullRom ( float  t,
const std::vector< T > &  cp,
size_t  index = 0 
)

Evaluate a cubic Catmull-Rom spline on an interval.

Parameters
tinterpolation parameter [0, 1]
cpvector of control points (needs at least four)
indexto the first control point used in interpolation. Used control points will be from [index, index + 3]
Returns
value of the spline at given t
template<typename T >
bool Nimble::linesIntersect ( Vector2T< T >  line1Start,
Vector2T< T >  line1End,
Vector2T< T >  line2Start,
Vector2T< T >  line2End,
Vector2T< T > *  interPoint = 0 
)

Test for intersection of line segments.

Parameters
line1Start,line1Endfirst line.
line2Start,line2Endsecond line.
interPointoptional pointer to vector to receive the intersection point.
Returns
true if line segments intersect.
template<typename T >
Decltype<T, float>::mul Nimble::lineSlope ( const Nimble::Vector2T< T > &  lineStart,
const Nimble::Vector2T< T > &  lineEnd,
int &  slopeType,
Nimble::Vector2T< T > &  delta 
)

Compute slope of line.

Parameters
lineStartLine starting point
lineEndLine end point
slopeTypereference to int to receive slope type.
deltareference to Nimble::Vector2f to receive delta.
Returns
Slope value.
template<class T >
Matrix4T<T> Nimble::mul ( const Matrix4T< T > &  m1,
const Matrix4T< T > &  m2 
)
inline

Multiply two matrices.

Parameters
m1first matrix
m2second matrix
Returns
product of the two matrices
template<typename T , typename U >
SizeT<typename Decltype<T, U>::mul> Nimble::operator* ( const SizeT< T > &  size,
scalar 
)
inline

Scale size by given scalar.

Parameters
sizesize to scale
scalarvalue to scale with
Returns
scaled size
template<typename T , typename U >
SizeT<typename Decltype<U, T>::mul> Nimble::operator* ( scalar,
const SizeT< T > &  size 
)
inline

Scale size by given scalar.

Parameters
scalarvalue to scale with
sizesize to scale
Returns
scaled size
template<class T , class S , typename = typename std::enable_if<std::is_arithmetic<S>::value>::type>
Vector3T<typename Decltype<T, S>::mul> Nimble::operator* ( const Nimble::Vector3T< T > &  v,
s 
)

Multiply vector with a scalar (v * s)

Parameters
vvector to multiply
sscalar to multiply with
Returns
scaled vector
template<class T , class S , typename = typename std::enable_if<std::is_arithmetic<S>::value>::type>
Vector3T<typename Decltype<S, T>::mul> Nimble::operator* ( s,
const Nimble::Vector3T< T > &  v 
)

Multiply vector with a scalar (s * v)

Parameters
vvector to multiply
sscalar to multiply with
Returns
scaled vector
template<class T , class S , typename = typename std::enable_if<std::is_arithmetic<S>::value>::type>
Vector4T<typename Decltype<T, S>::mul> Nimble::operator* ( const Nimble::Vector4T< T > &  v,
s 
)

Multiply vector with a scalar (v * s)

Parameters
vvector to multiply
sscalar to multiply with
Returns
scaled vector
template<class T , class S , typename = typename std::enable_if<std::is_arithmetic<S>::value>::type>
Vector4T<typename Decltype<S, T>::mul> Nimble::operator* ( s,
const Nimble::Vector4T< T > &  v 
)

Multiply vector with a scalar (s * v)

Parameters
vvector to multiply
sscalar to multiply with
Returns
scaled vector
template<class T , class S , typename = typename std::enable_if<std::is_arithmetic<S>::value>::type>
Vector2T<typename Decltype<T, S>::mul> Nimble::operator* ( const Nimble::Vector2T< T > &  v,
s 
)

Multiply vector with a scalar (v * s)

Parameters
vvector to multiply
sscalar to multiply with
Returns
scaled vector
template<class T , class S , typename = typename std::enable_if<std::is_arithmetic<S>::value>::type>
Vector2T<typename Decltype<S, T>::mul> Nimble::operator* ( s,
const Nimble::Vector2T< T > &  v 
)

Multiply vector with a scalar (s * v)

Parameters
vvector to multiply
sscalar to multiply with
Returns
scaled vector
template<typename T , typename U >
SizeT<T>& Nimble::operator*= ( SizeT< T > &  lhs,
s 
)

Scales the given size.

Parameters
lhssize
sscale factor
Returns
reference to this size
template<typename T , typename U >
SizeT<typename Decltype<T, U>::div> Nimble::operator/ ( const SizeT< T > &  size,
scalar 
)
inline

Divide the size component-wise by the given scalar.

Parameters
sizesize to scale
Returns
scaled size
Parameters
scalarvalue to divide with
template<typename T , typename U >
SizeT<typename Decltype<U, T>::div> Nimble::operator/ ( scalar,
const SizeT< T > &  size 
)
inline

Divide the size component-wise by the given scalar.

Parameters
sizesize to scale
scalarvalue to divide with
Returns
scaled size
template<typename T , typename U >
SizeT<T>& Nimble::operator/= ( SizeT< T > &  lhs,
s 
)

Divides the given size.

Parameters
lhssize
sdivision factor
Returns
reference to this size
template<class T >
std::ostream& Nimble::operator<< ( std::ostream &  os,
const Nimble::Matrix2T< T > &  m 
)
inline

Output the given matrix to a stream.

Parameters
osstream to output to
mmatrix to output
Returns
reference to the stream
template<class T >
std::ostream& Nimble::operator<< ( std::ostream &  os,
const Nimble::Vector3T< T > &  t 
)
inline

Output the given vector to a stream.

Parameters
osstream to output to
tvector to output
Returns
reference to the stream
template<>
std::ostream& Nimble::operator<< ( std::ostream &  os,
const Nimble::Vector3T< uint8_t > &  t 
)
inline

Output the given vector to a stream.

Parameters
osstream to output to
tvector to output
Returns
reference to the stream
template<class K , class T >
K& Nimble::operator<< ( K &  os,
const Nimble::Vector2T< T > &  t 
)
inline

Output the given vector to a stream.

Parameters
osstream to output to
tvector to output
Returns
reference to the stream
template<class T >
std::ostream& Nimble::operator<< ( std::ostream &  os,
const Matrix4T< T > &  m 
)
inline

Output the given matrix to a stream.

Parameters
osstream to output to
mmatrix to output
Returns
reference to the stream
template<class T >
std::ostream& Nimble::operator<< ( std::ostream &  os,
const Nimble::Matrix3T< T > &  m 
)
inline

Output the given matrix to a stream.

Parameters
osstream to output to
mmatrix to output
Returns
reference to the stream
template<class T >
std::istream& Nimble::operator>> ( std::istream &  is,
Nimble::Matrix2T< T > &  m 
)
inline

Read a matrix from a stream.

Parameters
isstream to read from
mmatrix to read to
Returns
reference to the input stream
template<class T >
std::istream& Nimble::operator>> ( std::istream &  is,
Nimble::Vector3T< T > &  t 
)
inline

Read the given vector from a stream.

Parameters
isstream to read from
tvector to read
Returns
reference to the stream
template<>
std::istream& Nimble::operator>> ( std::istream &  is,
Nimble::Vector3T< uint8_t > &  t 
)
inline

Read the given vector from a stream.

Parameters
isstream to read from
tvector to read
Returns
reference to the stream
template<class T >
std::istream& Nimble::operator>> ( std::istream &  is,
Matrix4T< T > &  m 
)
inline

Read a matrix from a stream.

Parameters
isstream to read from
mmatrix to read to
Returns
reference to the input stream
template<class T >
std::istream& Nimble::operator>> ( std::istream &  is,
Nimble::Matrix3T< T > &  m 
)
inline

Read a matrix from a stream.

Parameters
isstream to read from
mmatrix to read to
Returns
reference to the input stream
template<class T >
Vector4T<T> Nimble::projection ( const Vector4T< T > &  u,
const Vector4T< T > &  v 
)
inline

Compute the projection of v onto u.

Parameters
uvector to project onto
vvector to project
Returns
the projection of v onto u