Mathematic


Classes

class  TC::Math::Checksum
 Class defining the interface for calculating checksums With the method Append data can be added to the checksum calculation. More...
class  TC::Math::Coord2D< T >
 Class for handling 2D values with implementation of all common operators needed. More...
class  TC::Math::Coord3D< T >
 Class for handling 3D values With implementation of all common coordinate or vector operators needed. More...
class  TC::Math::Coord4D< T >
 Class for handling 3D values With implementation of all common coordinate or vector operators needed. More...

Namespaces

namespace  TC::Math::Factory
 Factory for creating TC::Math objects.

Files

file  TCMathApi.h
 This file provides the definition of TCMATH_API.
file  TCMathChecksum.h
 This file provides the definition of TC::Math::Checksum.
file  TCMathCoord2D.h
 This file provides the definition of TC::Math::Coord2D.
file  TCMathCoord3D.h
 This file provides the definition of TC::Math::Coord3D.
file  TCMathCoord4D.h
 This file provides the definition of TC::Math::Coord4D.
file  TCMathCoordUtil.h
 This file provides the definition of Coordinate utilities in the namespace TC::Math.
file  TCMathFactory.h
 This file provides the definition of TC::Math::Factory.
file  TCMathUtil.h
 This file provides the definition of Math utilities in the namespace TC::Math.

Defines

#define TCMATH_API   TC_IMPORT_DLL
 define for exporting or importing classes and functions from the TC::Math dll

Typedefs

typedef SharedPtr< Checksum > TC::Math::ChecksumPtr
 Shared pointer of an checksum object.

Functions

template<class T >
const Coord2D< T > TC::Math::operator* (const Coord2D< T > &v, const T &vIn)
template<class T >
const Coord2D< T > TC::Math::operator* (const T &vIn, const Coord2D< T > &v)
template<class T >
const T TC::Math::operator* (const Coord2D< T > &a, const Coord2D< T > &b)
template<class T >
const Coord2D< T > TC::Math::operator/ (const Coord2D< T > &v, const T &vIn)
template<class T >
const Coord2D< T > TC::Math::operator/ (const T &vIn, const Coord2D< T > &v)
template<class T >
const Coord2D< T > TC::Math::operator+ (const Coord2D< T > &v, const Coord2D< T > &b)
template<class T >
const Coord2D< T > TC::Math::operator+ (const Coord2D< T > &v, const T &b)
template<class T >
const Coord2D< T > TC::Math::operator- (const Coord2D< T > &v, const Coord2D< T > &b)
template<class T >
const Coord2D< T > TC::Math::operator- (const Coord2D< T > &v, const T &b)
template<class T >
const Coord2D< T > TC::Math::operator- (const Coord2D< T > &v)
template<class T >
bool TC::Math::operator> (const Coord2D< T > &a, const Coord2D< T > &b)
template<class T >
bool TC::Math::operator< (const Coord2D< T > &a, const Coord2D< T > &b)
template<class T >
bool TC::Math::operator== (const Coord2D< T > &a, const Coord2D< T > &b)
template<class T >
bool TC::Math::operator!= (const Coord2D< T > &a, const Coord2D< T > &b)
template<class T >
bool TC::Math::operator>= (const Coord2D< T > &a, const Coord2D< T > &b)
template<class T >
bool TC::Math::operator<= (const Coord2D< T > &a, const Coord2D< T > &b)
template<class T >
StreamPtr TC::Math::operator>> (StreamPtr stream, Coord2D< T > &coord)
 read operator for reading the data from a Stream
template<class T >
StreamPtr TC::Math::operator<< (StreamPtr stream, const Coord2D< T > &coord)
 write operator for writing the data to a Stream
template<class T >
const Coord3D< T > TC::Math::operator^ (const Coord3D< T > &a, const Coord3D< T > &b)
template<class T >
const T TC::Math::operator* (const Coord3D< T > &a, const Coord3D< T > &b)
template<class T >
const Coord3D< T > TC::Math::operator* (const Coord3D< T > &v, const T &vIn)
template<class T >
const Coord3D< T > TC::Math::operator* (const T &vIn, const Coord3D< T > &v)
template<class T >
const Coord3D< T > TC::Math::operator/ (const Coord3D< T > &v, const T &vIn)
template<class T >
const Coord3D< T > TC::Math::operator/ (const T &vIn, const Coord3D< T > &v)
template<class T >
const Coord3D< T > TC::Math::operator/ (const Coord3D< T > &in, const Coord3D< T > &in2)
template<class T >
const Coord3D< T > TC::Math::operator+ (const Coord3D< T > &v, const Coord3D< T > &b)
template<class T >
const Coord3D< T > TC::Math::operator+ (const Coord3D< T > &v, const T &b)
template<class T >
const Coord3D< T > TC::Math::operator- (const Coord3D< T > &v, const Coord3D< T > &b)
template<class T >
const Coord3D< T > TC::Math::operator- (const Coord3D< T > &v, const T &b)
template<class T >
const Coord3D< T > TC::Math::operator- (const Coord3D< T > &v)
template<class T >
bool TC::Math::operator> (const Coord3D< T > &a, const Coord3D< T > &b)
template<class T >
bool TC::Math::operator< (const Coord3D< T > &a, const Coord3D< T > &b)
template<class T >
bool TC::Math::operator== (const Coord3D< T > &a, const Coord3D< T > &b)
template<class T >
bool TC::Math::operator!= (const Coord3D< T > &a, const Coord3D< T > &b)
template<class T >
bool TC::Math::operator>= (const Coord3D< T > &a, const Coord3D< T > &b)
template<class T >
bool TC::Math::operator<= (const Coord3D< T > &a, const Coord3D< T > &b)
template<class T >
StreamPtr TC::Math::operator>> (StreamPtr stream, Coord3D< T > &coord)
 Read operator for reading the data from a TCStream.
template<class T >
StreamPtr TC::Math::operator<< (StreamPtr stream, const Coord3D< T > &coord)
 Write operator for writing the data to a TCStream.
template<class T >
Coord4D< T > TC::Math::operator* (const Coord4D< T > &v, const T &vIn)
template<class T >
Coord4D< T > TC::Math::operator* (const T &vIn, const Coord4D< T > &v)
template<class T >
Coord4D< T > TC::Math::operator/ (const Coord4D< T > &v, const T &vIn)
template<class T >
Coord4D< T > TC::Math::operator/ (const T &vIn, const Coord4D< T > &v)
template<class T >
Coord4D< T > TC::Math::operator+ (const Coord4D< T > &v, const Coord4D< T > &b)
template<class T >
Coord4D< T > TC::Math::operator- (const Coord4D< T > &v, const Coord4D< T > &b)
template<class T >
Coord4D< T > TC::Math::operator- (const Coord4D< T > &v)
template<class T >
bool TC::Math::operator> (const Coord4D< T > &a, const Coord4D< T > &b)
template<class T >
bool TC::Math::operator< (const Coord4D< T > &a, const Coord4D< T > &b)
template<class T >
bool TC::Math::operator== (const Coord4D< T > &a, const Coord4D< T > &b)
template<class T >
bool TC::Math::operator!= (const Coord4D< T > &a, const Coord4D< T > &b)
template<class T >
bool TC::Math::operator>= (const Coord4D< T > &a, const Coord4D< T > &b)
template<class T >
bool TC::Math::operator<= (const Coord4D< T > &a, const Coord4D< T > &b)
template<class T >
StreamPtr TC::Math::operator>> (StreamPtr stream, Coord4D< T > &coord)
 Read operator for reading the data from a TCStream.
template<class T >
StreamPtr TC::Math::operator<< (StreamPtr stream, const Coord4D< T > &coord)
 Write operator for writing the data to a TCStream.
template<class COORD_TYPE >
double TC::Math::Distance (const COORD_TYPE &a, const COORD_TYPE &b)
 Computes the distance of two 3-coordinates.
template<class COORD_TYPE >
double TC::Math::Distance2 (const COORD_TYPE &a, const COORD_TYPE &b)
 Computes the square distance of two 3-coordinates.
template<class COORD_TYPE >
COORD_TYPE::DataType TC::Math::DotProduct (const COORD_TYPE &a, const COORD_TYPE &b)
 Computes the dot product of two 3-coordinates (float-precision version).
template<class COORD_TYPE >
COORD_TYPE::DataType TC::Math::DotProduct2 (const COORD_TYPE &a, const COORD_TYPE &b)
 Computes the square dot product of two 3-coordinates.
template<class COORD_TYPE >
COORD_TYPE TC::Math::Normalize (const COORD_TYPE &coord)
 Computes the the normalized vector of the coord and returns it.
template<class COORD_TYPE >
COORD_TYPE TC::Math::CrossProduct (const COORD_TYPE &a, const COORD_TYPE &b)
 Computes the cross product of two 3-coordinates.
template<class T >
Coord3D< T > TC::Math::Max (const Coord3D< T > &a, const Coord3D< T > &b)
template<class T >
Coord2D< T > TC::Math::Max (const Coord2D< T > &a, const Coord2D< T > &b)
template<class T >
Coord3D< T > TC::Math::Min (const Coord3D< T > &a, const Coord3D< T > &b)
template<class T >
Coord2D< T > TC::Math::Min (const Coord2D< T > &a, const Coord2D< T > &b)
template<class T >
Coord3D< T > TC::Math::Normalvector (sint32 numPoints, const Coord3D< T > *coords)
 Calculates the normal vector of the plane defined by the points.
template<class COORD_TYPE >
double TC::Math::Angle (const COORD_TYPE &a, const COORD_TYPE &b)
 Computes the angle between two 3d vectors.
template<class T >
bool TC::Math::IsPointInCircle (const Coord2D< T > &Point, const Coord2D< T > &center, double radius)
template<class T >
bool TC::Math::CheckInsidePolygon (const Coord2D< T > &point, sint32 num_points, const Coord2D< T > *polygon)
template<class T >
TC::Math::Abs (const T &x)
template<class T >
TC::Math::Pow (T x, uint32 y)
 integer version of pow(.
uint32 TC::Math::Align32 (uint32 size)
 aligns a given number to 32
bool TC::Math::Compare (double val1, double val2)
 Compare two double values if equal by checking their difference.
uint32 TC::Math::Align16 (uint32 size)
 aligns a given number to 16
template<class T >
double TC::Math::Deg2Rad (T val)
 Function converts angle in degrees to angle in radians.
template<class T >
double TC::Math::Rad2Deg (T val)
 Function converts angle in radians to angle in degrees.
template<class T >
TC::Math::Normalize (T minValue, T maxValue, T value)
 Function converts a value in the range between minValue and maxValue to a value between 0 and one.
template<class T >
double TC::Math::SinXOverX (T x)
 This function calculates sin(x)/x in a safe way, i.e.
template<class T >
TC::Math::RoundToFirstSignificantValue (T val)
 Round any kind of value to the first significant value.
template<class T >
bool TC::Math::Compare (const T &val1, const T &val2)
 compare double or float value with its specified system epsilon
bool TC::Math::IsNaN (double val)
 function returns a true value if value is "not-a-number" (NaN), and false otherwise.
bool TC::Math::IsFinite (double val)
bool TC::Math::IsInf (double val)

Variables

const double TC::Math::PI = 3.1415926535897932385E0
 The constant value of PI.
const double TC::Math::MEGA_BYTES = 1024. * 1024.
 The constant value one Megabyte in bytes.

Define Documentation

#define TCMATH_API   TC_IMPORT_DLL

define for exporting or importing classes and functions from the TC::Math dll

Definition at line 59 of file TCMathApi.h.


Typedef Documentation

typedef SharedPtr<Checksum> TC::Math::ChecksumPtr

Shared pointer of an checksum object.

Definition at line 82 of file TCMathChecksum.h.


Function Documentation

template<class T >
const Coord2D<T> TC::Math::operator* ( const Coord2D< T > &  v,
const T &  vIn 
) [inline]

Definition at line 172 of file TCMathCoord2D.h.

template<class T >
const Coord2D<T> TC::Math::operator* ( const T &  vIn,
const Coord2D< T > &  v 
) [inline]

Definition at line 178 of file TCMathCoord2D.h.

template<class T >
const T TC::Math::operator* ( const Coord2D< T > &  a,
const Coord2D< T > &  b 
) [inline]

Definition at line 184 of file TCMathCoord2D.h.

template<class T >
const Coord2D<T> TC::Math::operator/ ( const Coord2D< T > &  v,
const T &  vIn 
) [inline]

Definition at line 190 of file TCMathCoord2D.h.

template<class T >
const Coord2D<T> TC::Math::operator/ ( const T &  vIn,
const Coord2D< T > &  v 
) [inline]

Definition at line 196 of file TCMathCoord2D.h.

template<class T >
const Coord2D<T> TC::Math::operator+ ( const Coord2D< T > &  v,
const Coord2D< T > &  b 
) [inline]

Definition at line 202 of file TCMathCoord2D.h.

template<class T >
const Coord2D<T> TC::Math::operator+ ( const Coord2D< T > &  v,
const T &  b 
) [inline]

Definition at line 208 of file TCMathCoord2D.h.

template<class T >
const Coord2D<T> TC::Math::operator- ( const Coord2D< T > &  v,
const Coord2D< T > &  b 
) [inline]

Definition at line 214 of file TCMathCoord2D.h.

template<class T >
const Coord2D<T> TC::Math::operator- ( const Coord2D< T > &  v,
const T &  b 
) [inline]

Definition at line 220 of file TCMathCoord2D.h.

template<class T >
const Coord2D<T> TC::Math::operator- ( const Coord2D< T > &  v  )  [inline]

Definition at line 226 of file TCMathCoord2D.h.

template<class T >
bool TC::Math::operator> ( const Coord2D< T > &  a,
const Coord2D< T > &  b 
) [inline]

Definition at line 235 of file TCMathCoord2D.h.

template<class T >
bool TC::Math::operator< ( const Coord2D< T > &  a,
const Coord2D< T > &  b 
) [inline]

Definition at line 245 of file TCMathCoord2D.h.

template<class T >
bool TC::Math::operator== ( const Coord2D< T > &  a,
const Coord2D< T > &  b 
) [inline]

Definition at line 255 of file TCMathCoord2D.h.

template<class T >
bool TC::Math::operator!= ( const Coord2D< T > &  a,
const Coord2D< T > &  b 
) [inline]

Definition at line 261 of file TCMathCoord2D.h.

template<class T >
bool TC::Math::operator>= ( const Coord2D< T > &  a,
const Coord2D< T > &  b 
) [inline]

Definition at line 267 of file TCMathCoord2D.h.

template<class T >
bool TC::Math::operator<= ( const Coord2D< T > &  a,
const Coord2D< T > &  b 
) [inline]

Definition at line 273 of file TCMathCoord2D.h.

template<class T >
StreamPtr TC::Math::operator>> ( StreamPtr  stream,
Coord2D< T > &  coord 
) [inline]

read operator for reading the data from a Stream

Parameters:
stream stream where to read the data from
coord The coordinate to read from the stream
Returns:
the stream

Definition at line 285 of file TCMathCoord2D.h.

template<class T >
StreamPtr TC::Math::operator<< ( StreamPtr  stream,
const Coord2D< T > &  coord 
) [inline]

write operator for writing the data to a Stream

Parameters:
stream stream where to write the data to
coord The coordinate to write to the stream
Returns:
the stream

Definition at line 296 of file TCMathCoord2D.h.

References TC::space().

Here is the call graph for this function:

template<class T >
const Coord3D<T> TC::Math::operator^ ( const Coord3D< T > &  a,
const Coord3D< T > &  b 
) [inline]

Definition at line 186 of file TCMathCoord3D.h.

template<class T >
const T TC::Math::operator* ( const Coord3D< T > &  a,
const Coord3D< T > &  b 
) [inline]

Definition at line 194 of file TCMathCoord3D.h.

template<class T >
const Coord3D<T> TC::Math::operator* ( const Coord3D< T > &  v,
const T &  vIn 
) [inline]

Definition at line 200 of file TCMathCoord3D.h.

template<class T >
const Coord3D<T> TC::Math::operator* ( const T &  vIn,
const Coord3D< T > &  v 
) [inline]

Definition at line 206 of file TCMathCoord3D.h.

template<class T >
const Coord3D<T> TC::Math::operator/ ( const Coord3D< T > &  v,
const T &  vIn 
) [inline]

Definition at line 212 of file TCMathCoord3D.h.

template<class T >
const Coord3D<T> TC::Math::operator/ ( const T &  vIn,
const Coord3D< T > &  v 
) [inline]

Definition at line 218 of file TCMathCoord3D.h.

template<class T >
const Coord3D<T> TC::Math::operator/ ( const Coord3D< T > &  in,
const Coord3D< T > &  in2 
) [inline]

Definition at line 224 of file TCMathCoord3D.h.

template<class T >
const Coord3D<T> TC::Math::operator+ ( const Coord3D< T > &  v,
const Coord3D< T > &  b 
) [inline]

Definition at line 232 of file TCMathCoord3D.h.

template<class T >
const Coord3D<T> TC::Math::operator+ ( const Coord3D< T > &  v,
const T &  b 
) [inline]

Definition at line 238 of file TCMathCoord3D.h.

template<class T >
const Coord3D<T> TC::Math::operator- ( const Coord3D< T > &  v,
const Coord3D< T > &  b 
) [inline]

Definition at line 244 of file TCMathCoord3D.h.

template<class T >
const Coord3D<T> TC::Math::operator- ( const Coord3D< T > &  v,
const T &  b 
) [inline]

Definition at line 255 of file TCMathCoord3D.h.

template<class T >
const Coord3D<T> TC::Math::operator- ( const Coord3D< T > &  v  )  [inline]

Definition at line 261 of file TCMathCoord3D.h.

template<class T >
bool TC::Math::operator> ( const Coord3D< T > &  a,
const Coord3D< T > &  b 
) [inline]

Definition at line 271 of file TCMathCoord3D.h.

template<class T >
bool TC::Math::operator< ( const Coord3D< T > &  a,
const Coord3D< T > &  b 
) [inline]

Definition at line 283 of file TCMathCoord3D.h.

template<class T >
bool TC::Math::operator== ( const Coord3D< T > &  a,
const Coord3D< T > &  b 
) [inline]

Definition at line 295 of file TCMathCoord3D.h.

template<class T >
bool TC::Math::operator!= ( const Coord3D< T > &  a,
const Coord3D< T > &  b 
) [inline]

Definition at line 301 of file TCMathCoord3D.h.

template<class T >
bool TC::Math::operator>= ( const Coord3D< T > &  a,
const Coord3D< T > &  b 
) [inline]

Definition at line 307 of file TCMathCoord3D.h.

template<class T >
bool TC::Math::operator<= ( const Coord3D< T > &  a,
const Coord3D< T > &  b 
) [inline]

Definition at line 313 of file TCMathCoord3D.h.

template<class T >
StreamPtr TC::Math::operator>> ( StreamPtr  stream,
Coord3D< T > &  coord 
) [inline]

Read operator for reading the data from a TCStream.

Parameters:
stream stream where to read the data from
coord The coordinate to read from the stream
Returns:
the stream

Definition at line 326 of file TCMathCoord3D.h.

template<class T >
StreamPtr TC::Math::operator<< ( StreamPtr  stream,
const Coord3D< T > &  coord 
) [inline]

Write operator for writing the data to a TCStream.

Parameters:
stream stream where to write the data to
coord The coordinate to write on the stream
Returns:
the stream

Definition at line 338 of file TCMathCoord3D.h.

References TC::space().

Here is the call graph for this function:

template<class T >
Coord4D<T> TC::Math::operator* ( const Coord4D< T > &  v,
const T &  vIn 
) [inline]

Definition at line 207 of file TCMathCoord4D.h.

template<class T >
Coord4D<T> TC::Math::operator* ( const T &  vIn,
const Coord4D< T > &  v 
) [inline]

Definition at line 213 of file TCMathCoord4D.h.

template<class T >
Coord4D<T> TC::Math::operator/ ( const Coord4D< T > &  v,
const T &  vIn 
) [inline]

Definition at line 219 of file TCMathCoord4D.h.

template<class T >
Coord4D<T> TC::Math::operator/ ( const T &  vIn,
const Coord4D< T > &  v 
) [inline]

Definition at line 225 of file TCMathCoord4D.h.

template<class T >
Coord4D<T> TC::Math::operator+ ( const Coord4D< T > &  v,
const Coord4D< T > &  b 
) [inline]

Definition at line 231 of file TCMathCoord4D.h.

template<class T >
Coord4D<T> TC::Math::operator- ( const Coord4D< T > &  v,
const Coord4D< T > &  b 
) [inline]

Definition at line 237 of file TCMathCoord4D.h.

template<class T >
Coord4D<T> TC::Math::operator- ( const Coord4D< T > &  v  )  [inline]

Definition at line 243 of file TCMathCoord4D.h.

template<class T >
bool TC::Math::operator> ( const Coord4D< T > &  a,
const Coord4D< T > &  b 
) [inline]

Definition at line 253 of file TCMathCoord4D.h.

template<class T >
bool TC::Math::operator< ( const Coord4D< T > &  a,
const Coord4D< T > &  b 
) [inline]

Definition at line 267 of file TCMathCoord4D.h.

template<class T >
bool TC::Math::operator== ( const Coord4D< T > &  a,
const Coord4D< T > &  b 
) [inline]

Definition at line 281 of file TCMathCoord4D.h.

template<class T >
bool TC::Math::operator!= ( const Coord4D< T > &  a,
const Coord4D< T > &  b 
) [inline]

Definition at line 287 of file TCMathCoord4D.h.

template<class T >
bool TC::Math::operator>= ( const Coord4D< T > &  a,
const Coord4D< T > &  b 
) [inline]

Definition at line 293 of file TCMathCoord4D.h.

template<class T >
bool TC::Math::operator<= ( const Coord4D< T > &  a,
const Coord4D< T > &  b 
) [inline]

Definition at line 299 of file TCMathCoord4D.h.

template<class T >
StreamPtr TC::Math::operator>> ( StreamPtr  stream,
Coord4D< T > &  coord 
) [inline]

Read operator for reading the data from a TCStream.

Parameters:
stream stream where to read the data from
coord The coordinate to read from the stream
Returns:
the stream

Definition at line 312 of file TCMathCoord4D.h.

template<class T >
StreamPtr TC::Math::operator<< ( StreamPtr  stream,
const Coord4D< T > &  coord 
) [inline]

Write operator for writing the data to a TCStream.

Parameters:
stream stream where to write the data to
coord The coordinate to write on the stream
Returns:
the stream

Definition at line 324 of file TCMathCoord4D.h.

References TC::space().

Here is the call graph for this function:

template<class COORD_TYPE >
double TC::Math::Distance ( const COORD_TYPE &  a,
const COORD_TYPE &  b 
) [inline]

Computes the distance of two 3-coordinates.

Parameters:
a the 1st 3D coordinate
b the 2nd 3D coordinate
Returns:
The distance between the two coordinates

Definition at line 64 of file TCMathCoordUtil.h.

Referenced by TC::Math::Box< COORD_TYPE >::GetDiameter().

Here is the caller graph for this function:

template<class COORD_TYPE >
double TC::Math::Distance2 ( const COORD_TYPE &  a,
const COORD_TYPE &  b 
) [inline]

Computes the square distance of two 3-coordinates.

Parameters:
a the 1st 3D coordinate
b the 2nd 3D coordinate
Returns:
The square distance between the towo coordinates

Definition at line 77 of file TCMathCoordUtil.h.

template<class COORD_TYPE >
COORD_TYPE::DataType TC::Math::DotProduct ( const COORD_TYPE &  a,
const COORD_TYPE &  b 
) [inline]

Computes the dot product of two 3-coordinates (float-precision version).

Parameters:
a the 1st 3D coordinate
b the 2nd 3D coordinate
Returns:
the Dot product of the 2 coordinates

Definition at line 90 of file TCMathCoordUtil.h.

Referenced by TC::Math::Angle().

Here is the caller graph for this function:

template<class COORD_TYPE >
COORD_TYPE::DataType TC::Math::DotProduct2 ( const COORD_TYPE &  a,
const COORD_TYPE &  b 
) [inline]

Computes the square dot product of two 3-coordinates.

Parameters:
a the 1st 3D coordinate
b the 2nd 3D coordinate
Returns:
the square Dot product of the 2 coordinates

Definition at line 102 of file TCMathCoordUtil.h.

template<class COORD_TYPE >
COORD_TYPE TC::Math::Normalize ( const COORD_TYPE &  coord  )  [inline]

Computes the the normalized vector of the coord and returns it.

The cross product of a and b, written a x b, is defined by:

Parameters:
coord The coord for which to get the normalized one
Returns:
The normalize coord

Definition at line 115 of file TCMathCoordUtil.h.

template<class COORD_TYPE >
COORD_TYPE TC::Math::CrossProduct ( const COORD_TYPE &  a,
const COORD_TYPE &  b 
) [inline]

Computes the cross product of two 3-coordinates.

The cross product of a and b, written a x b, is defined by:

Parameters:
a the 1st vector
b the 2nd vector
Returns:
the cross product of the two coordinates

Definition at line 130 of file TCMathCoordUtil.h.

template<class T >
Coord3D<T> TC::Math::Max ( const Coord3D< T > &  a,
const Coord3D< T > &  b 
) [inline]

template<class T >
Coord2D<T> TC::Math::Max ( const Coord2D< T > &  a,
const Coord2D< T > &  b 
) [inline]

Definition at line 147 of file TCMathCoordUtil.h.

References TC::Math::Max().

Here is the call graph for this function:

template<class T >
Coord3D<T> TC::Math::Min ( const Coord3D< T > &  a,
const Coord3D< T > &  b 
) [inline]

template<class T >
Coord2D<T> TC::Math::Min ( const Coord2D< T > &  a,
const Coord2D< T > &  b 
) [inline]

Definition at line 168 of file TCMathCoordUtil.h.

References TC::Math::Min().

Here is the call graph for this function:

template<class T >
Coord3D<T> TC::Math::Normalvector ( sint32  numPoints,
const Coord3D< T > *  coords 
) [inline]

Calculates the normal vector of the plane defined by the points.

Parameters:
numPoints Number of points defining the plane
coords The coordinates of the points defining the plane
Returns:
The not normalized normal vector of the plane

Definition at line 184 of file TCMathCoordUtil.h.

template<class COORD_TYPE >
double TC::Math::Angle ( const COORD_TYPE &  a,
const COORD_TYPE &  b 
) [inline]

Computes the angle between two 3d vectors.

Parameters:
a the 1st 3D vector
b the 2nd 3D vector
Returns:
the angle between the two vectors

Definition at line 205 of file TCMathCoordUtil.h.

References TC::Math::DotProduct(), and TC::Math::PI.

Here is the call graph for this function:

template<class T >
bool TC::Math::IsPointInCircle ( const Coord2D< T > &  Point,
const Coord2D< T > &  center,
double  radius 
) [inline]

Definition at line 224 of file TCMathCoordUtil.h.

template<class T >
bool TC::Math::CheckInsidePolygon ( const Coord2D< T > &  point,
sint32  num_points,
const Coord2D< T > *  polygon 
) [inline]

Definition at line 235 of file TCMathCoordUtil.h.

template<class T >
T TC::Math::Abs ( const T &  x  )  [inline]

Returns:
the absolute value of the given value

Definition at line 77 of file TCMathUtil.h.

Referenced by TC::Math::Compare(), and TC::Math::RoundToFirstSignificantValue().

Here is the caller graph for this function:

template<class T >
T TC::Math::Pow ( x,
uint32  y 
) [inline]

integer version of pow(.

.)

Definition at line 84 of file TCMathUtil.h.

uint32 TC::Math::Align32 ( uint32  size  )  [inline]

aligns a given number to 32

Parameters:
size - value that should be aligned
Returns:
size aligned to 32 bytes

Definition at line 104 of file TCMathUtil.h.

bool TC::Math::Compare ( double  val1,
double  val2 
) [inline]

Compare two double values if equal by checking their difference.

Definition at line 110 of file TCMathUtil.h.

References TC::Math::Abs().

Here is the call graph for this function:

uint32 TC::Math::Align16 ( uint32  size  )  [inline]

aligns a given number to 16

Parameters:
size - value that should be aligned
Returns:
size aligned to 16 bytes

Definition at line 120 of file TCMathUtil.h.

template<class T >
double TC::Math::Deg2Rad ( val  )  [inline]

Function converts angle in degrees to angle in radians.

Parameters:
val angle value in degrees
Returns:
angle value in radians

Definition at line 131 of file TCMathUtil.h.

References TC::Math::PI.

template<class T >
double TC::Math::Rad2Deg ( val  )  [inline]

Function converts angle in radians to angle in degrees.

Parameters:
val angle value in radians
Returns:
angle value in degrees

Definition at line 142 of file TCMathUtil.h.

References TC::Math::PI.

template<class T >
T TC::Math::Normalize ( minValue,
maxValue,
value 
) [inline]

Function converts a value in the range between minValue and maxValue to a value between 0 and one.

Parameters:
minValue The value defines the minuimum when the value is 0
maxValue The value defines the maximum when the value is 1
value The value which should be converted to a value between 0 and one
Returns:
The converted value between 0 and 0

Definition at line 156 of file TCMathUtil.h.

References TC::Math::Max(), TC::Math::Min(), and TC::Util::Swap().

Here is the call graph for this function:

template<class T >
double TC::Math::SinXOverX ( x  )  [inline]

This function calculates sin(x)/x in a safe way, i.e.

without overflows near 0.

Parameters:
x Trivial.
Returns:
sin(x)/x.

Definition at line 183 of file TCMathUtil.h.

template<class T >
T TC::Math::RoundToFirstSignificantValue ( val  )  [inline]

Round any kind of value to the first significant value.

e.g. 53465 > 50000 0.0875 > 0.08 -234 > -200

Parameters:
val The value which to round
Returns:
the rounded value

Definition at line 202 of file TCMathUtil.h.

References TC::Math::Abs().

Here is the call graph for this function:

template<class T >
bool TC::Math::Compare ( const T &  val1,
const T &  val2 
) [inline]

compare double or float value with its specified system epsilon

Definition at line 226 of file TCMathUtil.h.

References TC::Math::Abs().

Here is the call graph for this function:

bool TC::Math::IsNaN ( double  val  ) 

function returns a true value if value is "not-a-number" (NaN), and false otherwise.

bool TC::Math::IsFinite ( double  val  ) 

Returns:
true value if value is between -INF and +INF false other wise

bool TC::Math::IsInf ( double  val  ) 

Returns:
true value if value is infinite false other wise


Variable Documentation

const double TC::Math::PI = 3.1415926535897932385E0

The constant value of PI.

Definition at line 71 of file TCMathUtil.h.

Referenced by TC::Math::Angle(), TC::Math::Deg2Rad(), and TC::Math::Rad2Deg().

const double TC::Math::MEGA_BYTES = 1024. * 1024.

The constant value one Megabyte in bytes.

Definition at line 73 of file TCMathUtil.h.


Copyright (c) Thomas Goessler 2003 - 2008