HyperspaceExplorer 0.7.1
|
A class template to execute rotate actions on an object. More...
#include <Rotate.h>
Public Member Functions | |
Rotate (const VertexData< D > &v) | |
Create a Rotate object from an already existing object. |
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:
Extrude<4, 0, 0> line;
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.
D | Dimension of the vector space we're working in |
Dmin | First of the set of dimensions being rotated into |
Dmax | Last of the set of dimensions being rotated into |
Rotate< D, Dmin, Dmax >::Rotate | ( | const VertexData< D > & | v | ) | [inline] |