Assignments Assignments

Namespaces | Classes | Typedefs | Functions | Variables
Util Namespace Reference

## Namespaces
namespace | RotationParameters

## Classes
class | _BaseMatrix
class | _InnerProductSpace
class | AdditiveGroup
class | Algebra
class | BaseFactory
class | BoundingBox
class | CmdLineParameter
class | CmdLineParameterArray
class | CmdLineParameters
class | CmdLineReadable
class | DerivedFactory
class | EulerRotationParameter
struct | Exception
class | Field
struct | GlobalProperties
class | InnerProductSpace
class | Interpolation
class | Matrix
class | Matrix< Dim, Dim >
class | MatrixRotationParameter
struct | Max
struct | Min
class | MultiplicativeGroup
class | Plane
class | Point
class | Point< 0 >
class | Polynomial
class | Polynomial< 1, Degree >
class | ProgressBar
class | Quadric
struct | QuadricBoundingBoxIntersectionInfo
struct | QuadricBoundingBoxOverlap
struct | QuadricBoundingBoxOverlap< 1 >
class | Quaternion
class | QuaternionRotationParameter
class | Ray
class | RotationParameter
class | SkewSymmetricRotationParameter
class | Timer
class | TransformationParameter
class | TrivialRotationParameter
class | VectorSpace

## Typedefs
typedef Point< 1 > | Point1D
typedef Point< 2 > | Point2D
typedef Point< 3 > | Point3D
typedef Point< 4 > | Point4D
template<unsigned int Dim>
using | SquareMatrix = Matrix< Dim , Dim >
typedef Matrix< 1, 1 > | Matrix1D
typedef Matrix< 2, 2 > | Matrix2D
typedef Matrix< 3, 3 > | Matrix3D
typedef Matrix< 4, 4 > | Matrix4D
typedef Plane< 2 > | Plane2D
typedef Plane< 3 > | Plane3D
typedef Plane< 4 > | Plane4D
typedef Ray< 1 > | Ray1D
typedef Ray< 2 > | Ray2D
typedef Ray< 3 > | Ray3D
typedef Ray< 4 > | Ray4D
typedef BoundingBox< 1 > | BoundingBox1D
typedef BoundingBox< 2 > | BoundingBox2D
typedef BoundingBox< 3 > | BoundingBox3D
typedef BoundingBox< 4 > | BoundingBox4D
template<unsigned int Degree>
using | Polynomial1D = Polynomial< 1 , Degree >
template<unsigned int Degree>
using | Polynomial2D = Polynomial< 2 , Degree >
template<unsigned int Degree>
using | Polynomial3D = Polynomial< 3 , Degree >
template<unsigned int Degree>
using | Polynomial4D = Polynomial< 4 , Degree >

## Functions
void | CmdLineParse (int argc, char **argv, CmdLineReadable **params)
std::string | ToUpper (const std::string &str)
std::string | ToLower (const std::string &str)
std::string | GetFileExtension (const std::string &fileName)
std::vector< std::string > | ReadWords (const std::string &fileName)
std::string | GetLocalFileName (const std::string &fileName)
std::string | GetFileDirectory (const std::string &fileName)
std::string | GetFileName (const std::string &directory, const std::string &localFileName)
template<typename ... Arguments>
void | _AddToMessageStream (std::stringstream &stream, Arguments ... arguments)
void | _AddToMessageStream (std::stringstream &stream)
template<typename Argument , typename ... Arguments>
void | _AddToMessageStream (std::stringstream &stream, Argument argument, Arguments ... arguments)
template<typename ... Arguments>
std::string | MakeMessageString (std::string header, std::string fileName, int line, std::string functionName, Arguments ... arguments)
template<typename ... Args>
void | Throw (const char *fileName, int line, const char *functionName, Args ... args)
template<typename ... Args>
void | Warn (const char *fileName, int line, const char *functionName, Args ... args)
template<typename ... Args>
void | ErrorOut (const char *fileName, int line, const char *functionName, Args ... args)
template<unsigned int Dim>
std::ostream & | operator<< (std::ostream &stream, const Point< Dim > &p)
template<unsigned int Dim>
std::istream & | operator>> (std::istream &stream, Point< Dim > &p)
template<unsigned int Rows, unsigned int Cols, typename MatrixType , typename MatrixTransposeType >
std::ostream & | operator<< (std::ostream &stream, const _BaseMatrix< Rows, Cols, MatrixType, MatrixTransposeType > &m)
template<unsigned int Rows, unsigned int Cols, typename MatrixType , typename MatrixTransposeType >
std::istream & | operator>> (std::istream &stream, _BaseMatrix< Rows, Cols, MatrixType, MatrixTransposeType > &m)
template<unsigned int Dim>
Ray< Dim > | operator* (const Matrix< Dim+1, Dim+1 > &m, const Ray< Dim > &ray)
template<unsigned int Dim>
std::ostream & | operator<< (std::ostream &stream, const Ray< Dim > &ray)
template<unsigned int Dim>
BoundingBox< Dim > | operator* (const Matrix< Dim+1, Dim+1 > &m, const BoundingBox< Dim > &b)
template<unsigned int Dim>
std::ostream & | operator<< (std::ostream &stream, const BoundingBox< Dim > &b)
template<unsigned int Dim, unsigned int Degree1, unsigned int Degree2>
Polynomial< Dim, Degree1+Degree2 > | operator* (const Polynomial< Dim, Degree1 > &p1, const Polynomial< Dim, Degree2 > &p2)
template<unsigned int Dim, unsigned int Degree1, unsigned int Degree2>
Polynomial< Dim, Max< Degree1, Degree2 >::Value > | operator+ (const Polynomial< Dim, Degree1 > &p1, const Polynomial< Dim, Degree2 > &p2)
template<unsigned int Dim, unsigned int Degree1, unsigned int Degree2>
Polynomial< Dim, Max< Degree1, Degree2 >::Value > | operator- (const Polynomial< Dim, Degree1 > &p1, const Polynomial< Dim, Degree2 > &p2)
template<unsigned int Dim, unsigned int Degree>
std::ostream & | operator<< (std::ostream &stream, const Polynomial< Dim, Degree > &poly)
template<unsigned int Degree1, unsigned int Degree2>
Polynomial< 1, Degree1+Degree2 > | operator* (const Polynomial< 1, Degree1 > &p1, const Polynomial< 1, Degree2 > &p2)
template<unsigned int Degree1, unsigned int Degree2>
Polynomial< 1, Max< Degree1, Degree2 >::Value > | operator+ (const Polynomial< 1, Degree1 > &p1, const Polynomial< 1, Degree2 > &p2)
template<unsigned int Degree1, unsigned int Degree2>
Polynomial< 1, Max< Degree1, Degree2 >::Value > | operator- (const Polynomial< 1, Degree1 > &p1, const Polynomial< 1, Degree2 > &p2)
template<unsigned int Degree>
std::ostream & | operator<< (std::ostream &stream, const Polynomial< 1, Degree > &poly)

## Variables
static const char | FileSeparator = '/'
static const double | Pi = 3.1415926535897932384
static const double | Epsilon = 1e-10
static const double | Infinity = std::numeric_limits< double >::infinity()

## Typedef Documentation

## ◆ BoundingBox1D

typedef BoundingBox< 1 > Util::BoundingBox1D

A bounding box in 1D

## ◆ BoundingBox2D

typedef BoundingBox< 2 > Util::BoundingBox2D

A bounding box in 2D

## ◆ BoundingBox3D

typedef BoundingBox< 3 > Util::BoundingBox3D

A bounding box in 3D

## ◆ BoundingBox4D

typedef BoundingBox< 4 > Util::BoundingBox4D

A bounding box in 4D

## ◆ Matrix1D

typedef Matrix< 1 , 1 > Util::Matrix1D

A 1x1 matrix

## ◆ Matrix2D

typedef Matrix< 2 , 2 > Util::Matrix2D

A 2x2 matrix

## ◆ Matrix3D

typedef Matrix< 3 , 3 > Util::Matrix3D

A 3x3 matrix

## ◆ Matrix4D

typedef Matrix< 4 , 4 > Util::Matrix4D

A 4x4 matrix

## ◆ Plane2D

typedef Plane< 2 > Util::Plane2D

A plane in 2D

## ◆ Plane3D

typedef Plane< 3 > Util::Plane3D

A plane in 3D

## ◆ Plane4D

typedef Plane< 4 > Util::Plane4D

A plane in 4D

## ◆ Point1D

typedef Point< 1 > Util::Point1D

A point in 1D

## ◆ Point2D

typedef Point< 2 > Util::Point2D

A point in 2D

## ◆ Point3D

typedef Point< 3 > Util::Point3D

A point in 3D

## ◆ Point4D

typedef Point< 4 > Util::Point4D

A point in 4D

## ◆ Polynomial1D

template<unsigned int Degree>

using Util::Polynomial1D = Polynomial< 1 , Degree >

A polynomial in one variable of degree Degree

## ◆ Polynomial2D

template<unsigned int Degree>

using Util::Polynomial2D = Polynomial< 2 , Degree >

A polynomial in two variables of degree Degree

## ◆ Polynomial3D

template<unsigned int Degree>

using Util::Polynomial3D = Polynomial< 3 , Degree >

A polynomial in three variable of degree Degree

## ◆ Polynomial4D

template<unsigned int Degree>

using Util::Polynomial4D = Polynomial< 4 , Degree >

A polynomial in four variable of degree Degree

## ◆ Ray1D

typedef Ray< 1 > Util::Ray1D

A ray in 1D

## ◆ Ray2D

typedef Ray< 2 > Util::Ray2D

A ray in 2D

## ◆ Ray3D

typedef Ray< 3 > Util::Ray3D

A ray in 3D

## ◆ Ray4D

typedef Ray< 4 > Util::Ray4D

A ray in 4D

## ◆ SquareMatrix

template<unsigned int Dim>

using Util::SquareMatrix = Matrix< Dim , Dim >

A square matrix

## Function Documentation

## ◆ _AddToMessageStream() [1/3]

void Util::_AddToMessageStream | ( | std::stringstream & | stream | ) |
| inline

## ◆ _AddToMessageStream() [2/3]

template<typename Argument , typename ... Arguments>

void Util::_AddToMessageStream | ( | std::stringstream & | stream,
|  | Argument | argument,
|  | Arguments ... | arguments )

## ◆ _AddToMessageStream() [3/3]

template<typename ... Arguments>

void Util::_AddToMessageStream | ( | std::stringstream & | stream,
|  | Arguments ... | arguments )

## ◆ CmdLineParse()

void Util::CmdLineParse | ( | int | argc,
|  | char ** | argv,
|  | CmdLineReadable ** | params )
| inline

This function takes a list of arguments and tries to set the parameters. The last parameter must be a NULL pointer.

## ◆ ErrorOut()

template<typename ... Args>

void Util::ErrorOut | ( | const char * | fileName,
|  | int | line,
|  | const char * | functionName,
|  | Args ... | args )

## ◆ GetFileDirectory()

std::string Util::GetFileDirectory | ( | const std::string & | fileName | ) |
| inline

Returns the file directory

## ◆ GetFileExtension()

std::string Util::GetFileExtension | ( | const std::string & | fileName | ) |
| inline

Returns the file extension

## ◆ GetFileName()

std::string Util::GetFileName | ( | const std::string & | directory,
|  | const std::string & | localFileName )
| inline

Combines the directory and local file-name to generate the complete file-name

## ◆ GetLocalFileName()

std::string Util::GetLocalFileName | ( | const std::string & | fileName | ) |
| inline

Returns the local file-name

## ◆ MakeMessageString()

template<typename ... Arguments>

std::string Util::MakeMessageString | ( | std::string | header,
|  | std::string | fileName,
|  | int | line,
|  | std::string | functionName,
|  | Arguments ... | arguments )

## ◆ operator*() [1/4]

template<unsigned int Dim>

BoundingBox< Dim > Util::operator* | ( | const Matrix< Dim+1, Dim+1 > & | m,
|  | const BoundingBox< Dim > & | b )

This method returns the bounding box generated by first transforming the initial bounding box according to the specified transformation and then finding the minimal axis-aligned bounding box containing the transformed box.

## ◆ operator*() [2/4]

template<unsigned int Dim>

Ray< Dim > Util::operator* | ( | const Matrix< Dim+1, Dim+1 > & | m,
|  | const Ray< Dim > & | ray )

This method applies a transformation to a ray.

## ◆ operator*() [3/4]

template<unsigned int Degree1, unsigned int Degree2>

Polynomial< 1, Degree1+Degree2 > Util::operator* | ( | const Polynomial< 1, Degree1 > & | p1,
|  | const Polynomial< 1, Degree2 > & | p2 )

This function returns the product of two polynomials.

## ◆ operator*() [4/4]

template<unsigned int Dim, unsigned int Degree1, unsigned int Degree2>

Polynomial< Dim, Degree1+Degree2 > Util::operator* | ( | const Polynomial< Dim, Degree1 > & | p1,
|  | const Polynomial< Dim, Degree2 > & | p2 )

This function returns the product of two polynomials.

## ◆ operator+() [1/2]

template<unsigned int Degree1, unsigned int Degree2>

Polynomial< 1, Max< Degree1, Degree2 >::Value > Util::operator+ | ( | const Polynomial< 1, Degree1 > & | p1,
|  | const Polynomial< 1, Degree2 > & | p2 )

This function returns the sum of two polynomials.

## ◆ operator+() [2/2]

template<unsigned int Dim, unsigned int Degree1, unsigned int Degree2>

Polynomial< Dim, Max< Degree1, Degree2 >::Value > Util::operator+ | ( | const Polynomial< Dim, Degree1 > & | p1,
|  | const Polynomial< Dim, Degree2 > & | p2 )

This function returns the sum of two polynomials.

## ◆ operator-() [1/2]

template<unsigned int Degree1, unsigned int Degree2>

Polynomial< 1, Max< Degree1, Degree2 >::Value > Util::operator- | ( | const Polynomial< 1, Degree1 > & | p1,
|  | const Polynomial< 1, Degree2 > & | p2 )

This function returns the difference of two polynomials.

## ◆ operator-() [2/2]

template<unsigned int Dim, unsigned int Degree1, unsigned int Degree2>

Polynomial< Dim, Max< Degree1, Degree2 >::Value > Util::operator- | ( | const Polynomial< Dim, Degree1 > & | p1,
|  | const Polynomial< Dim, Degree2 > & | p2 )

This function returns the difference of two polynomials.

## ◆ operator<<() [1/6]

template<unsigned int Rows, unsigned int Cols, typename MatrixType , typename MatrixTransposeType >

std::ostream & Util::operator<< | ( | std::ostream & | stream,
|  | const _BaseMatrix< Rows, Cols, MatrixType, MatrixTransposeType > & | m )

Functionality for outputing a matrices to a stream.

## ◆ operator<<() [2/6]

template<unsigned int Dim>

std::ostream & Util::operator<< | ( | std::ostream & | stream,
|  | const BoundingBox< Dim > & | b )

## ◆ operator<<() [3/6]

template<unsigned int Dim>

std::ostream & Util::operator<< | ( | std::ostream & | stream,
|  | const Point< Dim > & | p )

Functionality for outputing a point to a stream.

Functionality for outputing a bounding box to a stream.

## ◆ operator<<() [4/6]

template<unsigned int Degree>

std::ostream & Util::operator<< | ( | std::ostream & | stream,
|  | const Polynomial< 1, Degree > & | poly )

This function prints out the polynomial.

## ◆ operator<<() [5/6]

template<unsigned int Dim, unsigned int Degree>

std::ostream & Util::operator<< | ( | std::ostream & | stream,
|  | const Polynomial< Dim, Degree > & | poly )

This function prints out the polynomial.

## ◆ operator<<() [6/6]

template<unsigned int Dim>

std::ostream & Util::operator<< | ( | std::ostream & | stream,
|  | const Ray< Dim > & | ray )

This function prints out the ray.

## ◆ operator>>() [1/2]

template<unsigned int Rows, unsigned int Cols, typename MatrixType , typename MatrixTransposeType >

std::istream & Util::operator>> | ( | std::istream & | stream,
|  | _BaseMatrix< Rows, Cols, MatrixType, MatrixTransposeType > & | m )

Functionality for inputting a matrix from a stream.

## ◆ operator>>() [2/2]

template<unsigned int Dim>

std::istream & Util::operator>> | ( | std::istream & | stream,
|  | Point< Dim > & | p )

Functionality for inputing a point from a stream.

## ◆ ReadWords()

std::vector< std::string > Util::ReadWords | ( | const std::string & | fileName | ) |
| inline

Returns and array of individual words read from a file

## ◆ Throw()

template<typename ... Args>

void Util::Throw | ( | const char * | fileName,
|  | int | line,
|  | const char * | functionName,
|  | Args ... | args )

## ◆ ToLower()

std::string Util::ToLower | ( | const std::string & | str | ) |
| inline

Converts a string to lower case

## ◆ ToUpper()

std::string Util::ToUpper | ( | const std::string & | str | ) |
| inline

Converts a string to upper case

## ◆ Warn()

template<typename ... Args>

void Util::Warn | ( | const char * | fileName,
|  | int | line,
|  | const char * | functionName,
|  | Args ... | args )

## Variable Documentation

## ◆ Epsilon

const double Util::Epsilon = 1e-10
| static

## ◆ FileSeparator

const char Util::FileSeparator = '/'
| static

## ◆ Infinity

const double Util::Infinity = std::numeric_limits< double >::infinity()
| static

## ◆ Pi

const double Util::Pi = 3.1415926535897932384
| static