HyperspaceExplorer 0.7.1
Public Member Functions
Rotate< D, Dmin, Dmax > Class Template Reference

A class template to execute rotate actions on an object. More...

#include <Rotate.h>

List of all members.

Public Member Functions

 Rotate (const VertexData< D > &v)
 Create a Rotate object from an already existing object.

Detailed Description

template<unsigned D, unsigned Dmin, unsigned Dmax>
class Rotate< D, Dmin, Dmax >

A class template to execute rotate actions on an object.

The vertex array of the object is rotated into a set of consecutive dimensions.

As I find the concept hard to explain in words, let me give a few examples to illustrate the idea:

A line in four-space. A point is extruded along dimension 0 ( x ).

 Rotate<4, 1, 1> circle(line); 

The line along x is rotated into the y - dimension resulting in a circle in the xy -plane.

 Rotate<4, 2, 2> sphere(circle); 

Create a sphere from a circle by rotating along the z axis.

 Rotate<4, 1, 2> also_a_sphere(line); 

Create another sphere from a line by rotating it into the dimensions 1 to 2, ie. along y and z, in one operation.

 Extrude<4, 0, 1> square;
 Rotate<4, 2, 2> cylinder(square); 

A cylinder is created by rotating a square along the z axis. Alternately you could have extruded a circle.

 Rotate<4, 1, 3> glome(line); 

A four-dimensional sphere, also known as glome, is created by rotating a line three times.

Template Parameters:
DDimension of the vector space we're working in
DminFirst of the set of dimensions being rotated into
DmaxLast of the set of dimensions being rotated into
Author:
Helge Preuss <lene.preuss@gmail.com>

Constructor & Destructor Documentation

template<unsigned D, unsigned Dmin, unsigned Dmax>
Rotate< D, Dmin, Dmax >::Rotate ( const VertexData< D > &  v) [inline]

Create a Rotate object from an already existing object.

Todo:
Guard against bad template parameters:

- Dmin >= Dmax

  • Dmin or Dmax >= D
  • Dmin or Dmax >= vertex_data::_dimension
  • vertex_data::_dimension == 0

References rotate().

Here is the call graph for this function:


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