HyperspaceExplorer 0.7.1
Public Member Functions | Private Member Functions
Projector< D, D_ > Class Template Reference

A functor class to project a D -dimensional object to D-1 dimensions. More...

#include <Projector.h>

List of all members.

Public Member Functions

std::vector< VecMath::Vector
< D_ > > 
operator() (const std::vector< VecMath::Vector< D > > &x, double scrW, double camW)
 Project an array of vertices of dimension D to dimension D_ < D.
std::vector< VecMath::Vector
< D_ > > 
operator() (const std::vector< VecMath::Vector< D > > &x, const std::vector< double > &scrW, const std::vector< double > &camW)
 Project an array of vertices of dimension D to dimension D_ < D.

Private Member Functions

void checkConsistency (double scrW, double camW)
 Check if a projection makes sense, throw if it doesn't.
std::vector< VecMath::Vector
< D-1 > > 
doProject (const std::vector< VecMath::Vector< D > > &x, double scrW, double camW)
 Perform the projection from dimension D to dimension D-1.

Detailed Description

template<unsigned D, unsigned D_>
class Projector< D, D_ >

A functor class to project a D -dimensional object to D-1 dimensions.

Template Parameters:
DOriginal dimension of the object
D_Dimension to project onto
Todo:

make scrW and camW vectors for consecutive operations

add possibility to transform before projecting - or make a process separate from projection

Author:
Helge Preuss <lene.preuss@gmail.com>

Member Function Documentation

template<unsigned D, unsigned D_>
void Projector< D, D_ >::checkConsistency ( double  scrW,
double  camW 
) [inline, private]

Check if a projection makes sense, throw if it doesn't.

Parameters:
scrWDistance of the "screen" to be projected onto from the origin
camWDistance of the camera/eye onto from the origin

Referenced by Projector< D, D_ >::operator()().

Here is the caller graph for this function:

template<unsigned D, unsigned D_>
std::vector<VecMath::Vector<D-1> > Projector< D, D_ >::doProject ( const std::vector< VecMath::Vector< D > > &  x,
double  scrW,
double  camW 
) [inline, private]

Perform the projection from dimension D to dimension D-1.

Parameters:
xThe array of vertices to be projected
scrWDistance of the "screen" to be projected onto from the origin
camWDistance of the camera/eye onto from the origin
Returns:
x projected one dimension down

Referenced by Projector< D, D_ >::operator()().

Here is the caller graph for this function:

template<unsigned D, unsigned D_>
std::vector<VecMath::Vector<D_> > Projector< D, D_ >::operator() ( const std::vector< VecMath::Vector< D > > &  x,
double  scrW,
double  camW 
) [inline]

Project an array of vertices of dimension D to dimension D_ < D.

Parameters:
xThe array of vertices to be projected
scrWDistance of the "screen" to be projected onto from the origin
camWDistance of the camera/eye onto from the origin
Returns:
x projected to D_

References Projector< D, D_ >::checkConsistency(), and Projector< D, D_ >::doProject().

Here is the call graph for this function:

template<unsigned D, unsigned D_>
std::vector<VecMath::Vector<D_> > Projector< D, D_ >::operator() ( const std::vector< VecMath::Vector< D > > &  x,
const std::vector< double > &  scrW,
const std::vector< double > &  camW 
) [inline]

Project an array of vertices of dimension D to dimension D_ < D.

Parameters:
xThe array of vertices to be projected
scrWDistances of the "screen" to be projected onto from the origin, one for every projection operation
camWDistances of the camera/eye onto from the origin, one for every projection operation
Returns:
x projected to D_
Todo:
implement this!

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends

Generated on Mon Apr 9 2012 20:25:18 for HyperspaceExplorer 0.7.1 by doxygen 1.7.4  -  Hosted bySourceForge.net Logo