HyperspaceExplorer 0.7.1
|
A functor class to project a D
-dimensional object to D-1
dimensions.
More...
#include <Projector.h>
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 . |
A functor class to project a D
-dimensional object to D-1
dimensions.
D | Original dimension of the object |
D_ | Dimension to project onto |
make scrW and camW vectors for consecutive operations
add possibility to transform before projecting - or make a process separate from projection
void Projector< D, D_ >::checkConsistency | ( | double | scrW, |
double | camW | ||
) | [inline, private] |
Check if a projection makes sense, throw if it doesn't.
scrW | Distance of the "screen" to be projected onto from the origin |
camW | Distance of the camera/eye onto from the origin |
Referenced by Projector< D, D_ >::operator()().
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
.
x | The array of vertices to be projected |
scrW | Distance of the "screen" to be projected onto from the origin |
camW | Distance of the camera/eye onto from the origin |
x
projected one dimension down Referenced by Projector< D, D_ >::operator()().
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
.
x | The array of vertices to be projected |
scrW | Distance of the "screen" to be projected onto from the origin |
camW | Distance of the camera/eye onto from the origin |
x
projected to D_
References Projector< D, D_ >::checkConsistency(), and Projector< D, D_ >::doProject().
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
.
x | The array of vertices to be projected |
scrW | Distances of the "screen" to be projected onto from the origin, one for every projection operation |
camW | Distances of the camera/eye onto from the origin, one for every projection operation |
x
projected to D_