HyperspaceExplorer 0.7.1
Public Member Functions | Static Public Member Functions | Private Attributes
ViewpointList< N, Nnew, NUM > Class Template Reference

A list of Vector s of dimension Nnew+1 through N. More...

#include <ViewpointList.h>

Inheritance diagram for ViewpointList< N, Nnew, NUM >:
Inheritance graph
[legend]
Collaboration diagram for ViewpointList< N, Nnew, NUM >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ViewpointList ()
 Creates a ViewpointList with all elements at the origin.
 ViewpointList (NUM camW)
 Creates a list of Vector s whose highest element is set to camW.
 ViewpointList (const VecMath::Vector< N, NUM > &single_element)
 Construct a ViewpointList with a single element.
 ViewpointList (const VecMath::Vector< N, NUM > &head, const ViewpointList< N-1, Nnew, NUM > &tail)
 Construct a ViewpointList from an element and another ViewpointList.
const VecMath::Vector< N, NUM > & head () const
 Return the first element of a ViewpointList.
VecMath::Vector< N, NUM > & head ()
 Return the first element of a ViewpointList.
const ViewpointList< N-1, Nnew,
NUM > & 
tail () const
 Return a ViewpointList that contains all but the first element.
ViewpointList< N-1, Nnew, NUM > & tail ()
 Return a ViewpointList that contains all but the first element.
template<unsigned i>
VecMath::Vector< N-i, NUM > get ()
 Returns element i from the list.
std::string toString () const
 String representation.

Static Public Member Functions

static ViewpointList make (const VecMath::Vector< N, NUM > &x0)
 Constructs a ViewpointList with one Member.
static ViewpointList make (const VecMath::Vector< N, NUM > &x0, const VecMath::Vector< N-1, NUM > &x1)
 Constructs a ViewpointList with two Members.
static ViewpointList make (const VecMath::Vector< N, NUM > &x0, const VecMath::Vector< N-1, NUM > &x1, const VecMath::Vector< N-2, NUM > &x2)
 Constructs a ViewpointList with three Members.
static ViewpointList make (const VecMath::Vector< N, NUM > &x0, const VecMath::Vector< N-1, NUM > &x1, const VecMath::Vector< N-2, NUM > &x2, const VecMath::Vector< N-3, NUM > &x3)
 Constructs a ViewpointList with four Members.
static ViewpointList make (const VecMath::Vector< N, NUM > &x0, const VecMath::Vector< N-1, NUM > &x1, const VecMath::Vector< N-2, NUM > &x2, const VecMath::Vector< N-3, NUM > &x3, const VecMath::Vector< N-4, NUM > &x4)
 Constructs a ViewpointList with five Members.
static ViewpointList make (const VecMath::Vector< N, NUM > &x0, const VecMath::Vector< N-1, NUM > &x1, const VecMath::Vector< N-2, NUM > &x2, const VecMath::Vector< N-3, NUM > &x3, const VecMath::Vector< N-4, NUM > &x4, const VecMath::Vector< N-5, NUM > &x5)
 Constructs a ViewpointList with six Members.
static ViewpointList make (const VecMath::Vector< N, NUM > &x0, const VecMath::Vector< N-1, NUM > &x1, const VecMath::Vector< N-2, NUM > &x2, const VecMath::Vector< N-3, NUM > &x3, const VecMath::Vector< N-4, NUM > &x4, const VecMath::Vector< N-5, NUM > &x5, const VecMath::Vector< N-6, NUM > &x6)
 Constructs a ViewpointList with seven Members.
static ViewpointList make (const VecMath::Vector< N, NUM > &x0, const VecMath::Vector< N-1, NUM > &x1, const VecMath::Vector< N-2, NUM > &x2, const VecMath::Vector< N-3, NUM > &x3, const VecMath::Vector< N-4, NUM > &x4, const VecMath::Vector< N-5, NUM > &x5, const VecMath::Vector< N-6, NUM > &x6, const VecMath::Vector< N-7, NUM > &x7)
 Constructs a ViewpointList with eight Members.

Private Attributes

std::pair< VecMath::Vector< N,
NUM >, ViewpointList< N-1,
Nnew, NUM > > 
_elements
 The elements of the list are stored as a tuple, recursively defined.

Detailed Description

template<unsigned N, unsigned Nnew, typename NUM = double>
class ViewpointList< N, Nnew, NUM >

A list of Vector s of dimension Nnew+1 through N.

These are used in storing the view points and camera positions when projecting a point in N space into Nnew dimensions. Every projection from one dimension to the next lower dimension needs a Vector of the original dimension as camera position and one as view point.

Template Parameters:
NThe dimension of the original vector space.
NnewThe dimension of the vector space into which is projected.
NUMThe numeric type of the Vector s.

Constructor & Destructor Documentation

template<unsigned N, unsigned Nnew, typename NUM>
ViewpointList< N, Nnew, NUM >::ViewpointList ( NUM  camW)

Creates a list of Vector s whose highest element is set to camW.

Parameters:
camWCoordinate of camera in the axis along which each Projection occurs.

References ViewpointList< N, Nnew, NUM >::_elements, std::pair< _T1, _T2 >::first, and std::pair< _T1, _T2 >::second.


Member Function Documentation

template<unsigned N, unsigned Nnew, typename NUM = double>
template<unsigned i>
VecMath::Vector<N-i, NUM> ViewpointList< N, Nnew, NUM >::get ( ) [inline]

Returns element i from the list.

Template Parameters:
iThe index of the requested element.

Referenced by ViewpointList< N-1, Nnew, NUM >::get().

Here is the caller graph for this function:

template<unsigned N, unsigned Nnew, typename NUM>
ViewpointList< N, Nnew, NUM > ViewpointList< N, Nnew, NUM >::make ( const VecMath::Vector< N, NUM > &  x0,
const VecMath::Vector< N-1, NUM > &  x1,
const VecMath::Vector< N-2, NUM > &  x2,
const VecMath::Vector< N-3, NUM > &  x3,
const VecMath::Vector< N-4, NUM > &  x4,
const VecMath::Vector< N-5, NUM > &  x5,
const VecMath::Vector< N-6, NUM > &  x6 
) [static]

Constructs a ViewpointList with seven Members.

Parameters:
x0Viewpoint in Projection in first dimension.
x1Viewpoint in Projection in second dimension.
x2Viewpoint in Projection in third dimension.
x3Viewpoint in Projection in fourth dimension.
x4Viewpoint in Projection in fifth dimension.
x5Viewpoint in Projection in sixth dimension.
x6Viewpoint in Projection in seventh dimension.
template<unsigned N, unsigned Nnew, typename NUM>
ViewpointList< N, Nnew, NUM > ViewpointList< N, Nnew, NUM >::make ( const VecMath::Vector< N, NUM > &  x0,
const VecMath::Vector< N-1, NUM > &  x1,
const VecMath::Vector< N-2, NUM > &  x2,
const VecMath::Vector< N-3, NUM > &  x3,
const VecMath::Vector< N-4, NUM > &  x4 
) [static]

Constructs a ViewpointList with five Members.

Parameters:
x0Viewpoint in Projection in first dimension.
x1Viewpoint in Projection in second dimension.
x2Viewpoint in Projection in third dimension.
x3Viewpoint in Projection in fourth dimension.
x4Viewpoint in Projection in fifth dimension.
template<unsigned N, unsigned Nnew, typename NUM>
ViewpointList< N, Nnew, NUM > ViewpointList< N, Nnew, NUM >::make ( const VecMath::Vector< N, NUM > &  x0,
const VecMath::Vector< N-1, NUM > &  x1 
) [static]

Constructs a ViewpointList with two Members.

Parameters:
x0Viewpoint in Projection in first dimension.
x1Viewpoint in Projection in second dimension.
template<unsigned N, unsigned Nnew, typename NUM>
ViewpointList< N, Nnew, NUM > ViewpointList< N, Nnew, NUM >::make ( const VecMath::Vector< N, NUM > &  x0,
const VecMath::Vector< N-1, NUM > &  x1,
const VecMath::Vector< N-2, NUM > &  x2 
) [static]

Constructs a ViewpointList with three Members.

Parameters:
x0Viewpoint in Projection in first dimension.
x1Viewpoint in Projection in second dimension.
x2Viewpoint in Projection in third dimension.
template<unsigned N, unsigned Nnew, typename NUM>
ViewpointList< N, Nnew, NUM > ViewpointList< N, Nnew, NUM >::make ( const VecMath::Vector< N, NUM > &  x0,
const VecMath::Vector< N-1, NUM > &  x1,
const VecMath::Vector< N-2, NUM > &  x2,
const VecMath::Vector< N-3, NUM > &  x3 
) [static]

Constructs a ViewpointList with four Members.

Parameters:
x0Viewpoint in Projection in first dimension.
x1Viewpoint in Projection in second dimension.
x2Viewpoint in Projection in third dimension.
x3Viewpoint in Projection in fourth dimension.
template<unsigned N, unsigned Nnew, typename NUM>
ViewpointList< N, Nnew, NUM > ViewpointList< N, Nnew, NUM >::make ( const VecMath::Vector< N, NUM > &  x0,
const VecMath::Vector< N-1, NUM > &  x1,
const VecMath::Vector< N-2, NUM > &  x2,
const VecMath::Vector< N-3, NUM > &  x3,
const VecMath::Vector< N-4, NUM > &  x4,
const VecMath::Vector< N-5, NUM > &  x5,
const VecMath::Vector< N-6, NUM > &  x6,
const VecMath::Vector< N-7, NUM > &  x7 
) [static]

Constructs a ViewpointList with eight Members.

Parameters:
x0Viewpoint in Projection in first dimension.
x1Viewpoint in Projection in second dimension.
x2Viewpoint in Projection in third dimension.
x3Viewpoint in Projection in fourth dimension.
x4Viewpoint in Projection in fifth dimension.
x5Viewpoint in Projection in sixth dimension.
x6Viewpoint in Projection in seventh dimension.
x7Viewpoint in Projection in eight dimension.
template<unsigned N, unsigned Nnew, typename NUM>
ViewpointList< N, Nnew, NUM > ViewpointList< N, Nnew, NUM >::make ( const VecMath::Vector< N, NUM > &  x0,
const VecMath::Vector< N-1, NUM > &  x1,
const VecMath::Vector< N-2, NUM > &  x2,
const VecMath::Vector< N-3, NUM > &  x3,
const VecMath::Vector< N-4, NUM > &  x4,
const VecMath::Vector< N-5, NUM > &  x5 
) [static]

Constructs a ViewpointList with six Members.

Parameters:
x0Viewpoint in Projection in first dimension.
x1Viewpoint in Projection in second dimension.
x2Viewpoint in Projection in third dimension.
x3Viewpoint in Projection in fourth dimension.
x4Viewpoint in Projection in fifth dimension.
x5Viewpoint in Projection in sixth dimension.
template<unsigned N, unsigned Nnew, typename NUM>
ViewpointList< N, Nnew, NUM > ViewpointList< N, Nnew, NUM >::make ( const VecMath::Vector< N, NUM > &  x0) [static]

Constructs a ViewpointList with one Member.

Parameters:
x0Viewpoint in Projection in first dimension.

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:19 for HyperspaceExplorer 0.7.1 by doxygen 1.7.4  -  Hosted bySourceForge.net Logo