HyperspaceExplorer 0.7.1
Classes | Public Types | Public Member Functions | Protected Member Functions | Private Attributes
VertexHolder< N, P, NUM > Class Template Reference

This class stores vertices in a P - dimensional (hyper-) grid in an N dimensional vector space. More...

#include <VertexHolder.h>

Inheritance diagram for VertexHolder< N, P, NUM >:
Inheritance graph
[legend]
Collaboration diagram for VertexHolder< N, P, NUM >:
Collaboration graph
[legend]

List of all members.

Classes

class  Impl

Public Types

typedef VecMath::Vector< N, NUM > vertex_type
 The type of the function that is evaluated on every vertex of the grid.
typedef VecMath::Vector< 3, NUM > projected_vertex_type
 A vertex projected into three dimensions.

Public Member Functions

 VertexHolder (ParameterMap parameters)
virtual void Transform (const VecMath::Rotation< N, NUM > &R, const vertex_type &T, const vertex_type &scale=vertex_type(1.))
virtual void Project (double ScrW, double CamW, bool DepthCue4D)
virtual void calibrateColors ()
 Called by the ColorManager after setting the Displayable on the CM.
virtual unsigned int getDefinitionSpaceDimensions ()
 number of argument given to the defining function
virtual void for_each_vertex (function_on_fourspace_vertex apply)
virtual void for_each_vertex_transformed (function_on_fourspace_and_transformed_vertex apply)
virtual void for_each_vertex_transformed_projected (function_on_fourspace_transformed_and_projected_vertex apply)
virtual void for_each_projected (function_on_projected_vertex apply)

Protected Member Functions

const
VecMath::MultiDimensionalVector
< vertex_type, P > & 
X () const
 Array of vertices.
void setX (const VertexGrid< N, P, NUM > &x)
 Replaces the array of vertices with x.
const
VecMath::MultiDimensionalVector
< vertex_type, P > & 
Xtrans () const
 Array of vertices after transform.
void setXtrans (const VecMath::MultiDimensionalVector< vertex_type, P > &x)
 Replaces the array of transformed vertices with x.
const
VecMath::MultiDimensionalVector
< projected_vertex_type, P > & 
Xscr () const
 Array of projected vertices.
void setXscr (const VecMath::MultiDimensionalVector< projected_vertex_type, P > &x)
 Replaces the array of projected vertices with x.
const VertexGrid< N, P, NUM > & getGrid () const
 Access to the vertices as VertexGrid<N, P, NUM>.
VertexGrid< N, P, NUM > & getGridNonConst ()
 Write access to the vertices as VertexGrid<N, P, NUM>.
void setColorCalibrationFunction (function_on_fourspace_vertex calibrate)
 Sets the function that is called for every vertex by calibrateColors().

Private Attributes

std::unique_ptr< ImplpImpl_

Detailed Description

template<unsigned N, unsigned P, typename NUM = double>
class VertexHolder< N, P, NUM >

This class stores vertices in a P - dimensional (hyper-) grid in an N dimensional vector space.

It provides functions to apply an arbitray Transform on the N dimensional vertices and Project them into three-dimensional space. The Draw() method must be implemented in inheriting classes.

Template Parameters:
NThe dimension of the definition vector space.
PThe dimension of the parameter vector space.
NUMThe numeric type managed by the grid.
Author:
Lene Preuss <lene.preuss@gmail.com>

Member Typedef Documentation

template<unsigned N, unsigned P, typename NUM = double>
typedef VecMath::Vector<N, NUM> VertexHolder< N, P, NUM >::vertex_type

The type of the function that is evaluated on every vertex of the grid.

A vertex in N - space.

Reimplemented in FunctionHolder< N, P, NUM >, FunctionHolder< 4, 3, double >, and FunctionHolder< 4, 2, double >.


Constructor & Destructor Documentation

template<unsigned N, unsigned P, typename NUM >
VertexHolder< N, P, NUM >::VertexHolder ( ParameterMap  parms)
Parameters:
parmsParameters for the Displayable

References this.


Member Function Documentation

template<unsigned N, unsigned P, typename NUM >
void VertexHolder< N, P, NUM >::for_each_projected ( Displayable::function_on_projected_vertex  apply) [virtual]
Parameters:
applythe function called for every projected vertex

Implements Displayable.

template<unsigned N, unsigned P, typename NUM >
void VertexHolder< N, P, NUM >::for_each_vertex ( Displayable::function_on_fourspace_vertex  apply) [virtual]
Parameters:
applythe function called for every vertex

Implements Displayable.

template<unsigned N, unsigned P, typename NUM >
void VertexHolder< N, P, NUM >::for_each_vertex_transformed ( Displayable::function_on_fourspace_and_transformed_vertex  apply) [virtual]
Parameters:
applythe function called for every vertex and transformed vertex

Reimplemented from Displayable.

References VecMath::for_each().

Here is the call graph for this function:

template<unsigned N, unsigned P, typename NUM >
void VertexHolder< N, P, NUM >::for_each_vertex_transformed_projected ( Displayable::function_on_fourspace_transformed_and_projected_vertex  apply) [virtual]
Parameters:
applythe function called for every vertex, transformed and projected vertex

Reimplemented from Displayable.

References VecMath::for_each().

Here is the call graph for this function:

template<unsigned N, unsigned P, typename NUM >
void VertexHolder< N, P, NUM >::Project ( double  ScrW,
double  CamW,
bool  DepthCue4D 
) [virtual]
Parameters:
ScrWw coordinate of the screen projected onto
CamWw coordinate of the camera
DepthCue4Dwhether to apply four-dimensional depth cue

Implements Displayable.

Reimplemented in Gasket, and Sponge.

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

Here is the call graph for this function:

template<unsigned N, unsigned P, typename NUM >
void VertexHolder< N, P, NUM >::setColorCalibrationFunction ( function_on_fourspace_vertex  calibrate) [protected]

Sets the function that is called for every vertex by calibrateColors().

Parameters:
calibrateThe function called on every vertex to calibrate the ColorManager
template<unsigned N, unsigned P, typename NUM>
void VertexHolder< N, P, NUM >::setX ( const VertexGrid< N, P, NUM > &  x) [protected]

Replaces the array of vertices with x.

Parameters:
xthe new values for the vertices

Referenced by FunctionHolder< N, P, NUM >::Initialize().

Here is the caller graph for this function:

template<unsigned N, unsigned P, typename NUM >
void VertexHolder< N, P, NUM >::setXtrans ( const VecMath::MultiDimensionalVector< vertex_type, P > &  x) [protected]

Replaces the array of transformed vertices with x.

Parameters:
xthe new values for the transformed vertices
template<unsigned N, unsigned P, typename NUM>
void VertexHolder< N, P, NUM >::Transform ( const VecMath::Rotation< N, NUM > &  R,
const vertex_type T,
const vertex_type scale = vertex_type(1.) 
) [virtual]
Parameters:
Rrotation
Ttranslation
scalescaling

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