HyperspaceExplorer 0.7.1
Public Types | Public Member Functions | Private Member Functions | Private Attributes
Projection< N, Nnew, P, NUM, Policy > Class Template Reference

Class that projects a N dimensional vertex array to Nnew dimensions. More...

#include <Projection.h>

Inheritance diagram for Projection< N, Nnew, P, NUM, Policy >:
Inheritance graph
[legend]
Collaboration diagram for Projection< N, Nnew, P, NUM, Policy >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef ViewpointList< N, Nnew,
NUM > 
PointList
 Type of the list of view points and camera positions.
typedef ArrayList< N-Nnew, NUM > DistanceList
 Type of the list of screen distances from the camera.
typedef ArrayList< N-Nnew, bool > BoolList
 Type of the list of bools deciding whether each projection uses depth cue or not.

Public Member Functions

 Projection (const PointList &viewpoint, const PointList &eye, const DistanceList &screenDistance, const BoolList &depthCue4D)
 Create a Projection with arbitrary view- and camera points for each dimension.
 Projection (NUM scrW, NUM camW, bool depthCue4D)
 Create a Projection with view point at the origin and same parameters for each dimension.
VecMath::MultiDimensionalVector
< VecMath::Vector< Nnew, NUM >
, P > 
project (const VecMath::MultiDimensionalVector< VecMath::Vector< N, NUM >, P > &values)
 Execute the Projection on a P dimensional field of N dimensional vertices.

Private Member Functions

void checkConsistency ()
 Check whether this Projection is created with sensible parameters.
void checkDimensions ()
 Check whether the template is instantiated with sensible values for the dimensions.
PointList makeOriginViewPointList ()
 Generates a ViewpointList looking at the origin in every dimension.
PointList makeEyePointList (NUM camW)
 Generates a list of camera positions camW units away from the origin in every dimension.
DistanceList makeScreenDistanceList (NUM scrW)
 Generates a list of screen distances scrW units away each.
BoolList makeDepthCueList (bool depthCue4D)
 Generates a list of bools which all are equal to depthCue4D.

Private Attributes

PointList _viewpoint
 List of view points for the downprojection in each dimension.
PointList _eye
 List of camera positions for the downprojection in each dimension.
DistanceList _screen_distance
 List of screen distances for the downprojection in each dimension.
BoolList _depth_cue
 List of flags whether depth cue is used for the downprojection in each dimension.

Detailed Description

template<unsigned N, unsigned Nnew, unsigned P, typename NUM = double, typename Policy = SimpleProjectionPolicy <N, Nnew, P, NUM>>
class Projection< N, Nnew, P, NUM, Policy >

Class that projects a N dimensional vertex array to Nnew dimensions.

Template Parameters:
NOriginal dimension of the Vector s to project.
NnewDimension to project into.
PDimension of parameter space of the projected vertex array.
NUMThe numeric type of the Vector s.
PolicyThe class executing the actual projection on the vertices.

Constructor & Destructor Documentation

template<unsigned N, unsigned Nnew, unsigned P, typename NUM , class Policy >
Projection< N, Nnew, P, NUM, Policy >::Projection ( const PointList viewpoint,
const PointList eye,
const DistanceList screenDistance,
const BoolList depthCue 
)

Create a Projection with arbitrary view- and camera points for each dimension.

Parameters:
viewpointList of view points for the downprojection in each dimension.
eyeList of camera positions for the downprojection in each dimension.
screenDistanceList of screen distances for the downprojection in each dimension.
depthCueList of flags whether depth cue is used for the downprojection in each dimension.

References Projection< N, Nnew, P, NUM, Policy >::checkConsistency().

Here is the call graph for this function:

template<unsigned N, unsigned Nnew, unsigned P, typename NUM, class Policy >
Projection< N, Nnew, P, NUM, Policy >::Projection ( NUM  scrW,
NUM  camW,
bool  depthCue4D 
)

Create a Projection with view point at the origin and same parameters for each dimension.

Camera is on the axis which is projected along at distance camW from the origin, the screen has distance scrW and depthCue4D indicates if depth cue is used, the same in every projection that is done to project from N to Nnew.


Member Function Documentation

template<unsigned N, unsigned Nnew, unsigned P, typename NUM , class Policy >
void Projection< N, Nnew, P, NUM, Policy >::checkConsistency ( ) [private]

Check whether this Projection is created with sensible parameters.

Todo:
check view points, eye points and distances.

Referenced by Projection< N, Nnew, P, NUM, Policy >::Projection().

Here is the caller graph for this function:

template<unsigned N, unsigned Nnew, unsigned P, typename NUM , class Policy >
void Projection< N, Nnew, P, NUM, Policy >::checkDimensions ( ) [private]

Check whether the template is instantiated with sensible values for the dimensions.

Todo:
I would prefer a compilation error to throwing an exception when N equals Nnew, but I don't see how to achieve this.
template<unsigned N, unsigned Nnew, unsigned P, typename NUM, class Policy >
VecMath::MultiDimensionalVector< VecMath::Vector< Nnew, NUM >, P > Projection< N, Nnew, P, NUM, Policy >::project ( const VecMath::MultiDimensionalVector< VecMath::Vector< N, NUM >, P > &  values)

Execute the Projection on a P dimensional field of N dimensional vertices.

Parameters:
valuesThe vertices which are projected to Nnew- space.

Referenced by VertexHolder< N, P, NUM >::Project().

Here is the caller graph for this function:


The documentation for this class was generated from the following files:
 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