NSMath::TCPUUniversal Class Reference

This class defines mathematical processor which use no special instruction set. More...

#include <CPUUniversal.h>

Inheritance diagram for NSMath::TCPUUniversal:

Inheritance graph
[legend]
Collaboration diagram for NSMath::TCPUUniversal:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual void FindMaxDistanceSquare (const TVector3 *inArray16, const DWORD &inCount, const TVector3 &inCenter, float &outMaxDistanceSqr) const
 Find square of maximal distance from given point to one point in given array.
virtual void FindCenter (const TVector3 *inArray16, const DWORD &inCount, TVector3 &outCenter) const
 Compute center point from set of points.
virtual void FindMinMax (const TVector3 *inArray16, const DWORD &inCount, TVector3 &outMin, TVector3 &outMax) const
 Find minimal and maximal coordinates for given array of points and store it in parameters.

Detailed Description

This class defines mathematical processor which use no special instruction set.

It must be write entire in high-level language without inline assembler for maximal portability.

Definition at line 28 of file CPUUniversal.h.


Member Function Documentation

void TCPUUniversal::FindCenter const TVector3 inArray16,
const DWORD inCount,
TVector3 outCenter
const [virtual]
 

Compute center point from set of points.

Note:
It is computed as mean value of all points.
Warning:
There must be at least one item in array !!! If not then OUTCENTER won't be changed !!!
Parameters:
inArray16 [in] array with points - BE CAREFULL - each point has 16 bytes Array must be aligned to 16 bytes.
inCount [in] number of points in array INARRRAY16 - must be >= 0 !!!
outCenter [out] computed center from set of points

Implements NSMath::TMathCPU.

Definition at line 63 of file CPUUniversal.cpp.

References DBGASSERT_MATHLOW.

void TCPUUniversal::FindMaxDistanceSquare const TVector3 inArray16,
const DWORD inCount,
const TVector3 inCenter,
float &  outMaxDistanceSqr
const [virtual]
 

Find square of maximal distance from given point to one point in given array.

Warning:
There must be at least one item in array !!! If not then OUTMAXDISTANCE won't be changed !!!
Parameters:
inArray16 [in] array with points - BE CAREFULL - each point has 16 bytes Array must be aligned to 16 bytes.
inCount [in] number of points in array INARRRAY16 - must be >= 0 !!!
inCenter [in] center from that is distance computed
outMaxDistanceSqr [out] computed square of distance

Implements NSMath::TMathCPU.

Definition at line 29 of file CPUUniversal.cpp.

References DBGASSERT_MATHLOW, and NSMath::TVector3::DistanceToSq().

Here is the call graph for this function:

void TCPUUniversal::FindMinMax const TVector3 inArray16,
const DWORD inCount,
TVector3 outMin,
TVector3 outMax
const [virtual]
 

Find minimal and maximal coordinates for given array of points and store it in parameters.

Warning:
There must be at least one item in array !!! If not then OUTMIN and OUTMAX won't be changed !!!
Parameters:
inArray16 [in] array with points - BE CAREFULL - each point has 16 bytes Array must be aligned to 16 bytes.
inCount [in] number of points in array INARRRAY16 - must be >= 0 !!!
outMin [out] final vector with minimal coordinates
outMax [out] final vector with maximal coordinates

Implements NSMath::TMathCPU.

Definition at line 95 of file CPUUniversal.cpp.

References DBGASSERT_MATHLOW, NSMath::TVector3::x, NSMath::TVector3::y, and NSMath::TVector3::z.


The documentation for this class was generated from the following files:
Generated on Wed Nov 28 22:48:57 2007 for Joy4D by  doxygen 1.4.6-NO