HyperspaceExplorer 0.7.1
|
Base class for all Rotope s. More...
#include <VertexData.h>
Classes | |
class | VertexDataPrinter |
Auxiliary class encapsulating printing and conversion to std::string. More... | |
Public Member Functions | |
virtual Realm & | realm () |
The array of realms (D-1 dimensional surfaces of D-dimensional object) | |
virtual const Realm & | realm () const |
The array of realms (D-1 dimensional surfaces of D-dimensional object) | |
const std::vector < VecMath::Vector< D > > & | raw_vertices () const |
Read-only access to the list of vertices managed by this object. | |
virtual std::vector < VecMath::Vector< 4 > > | projected_vertices () |
The array of vertices, projected to four dimensions if necessary. | |
virtual unsigned | dimension () const |
Dimension of the object. | |
virtual unsigned & | dimension () |
Direct access to the dimension member instead of setter for convenience. | |
virtual std::string | toString () |
String representation. | |
Protected Member Functions | |
VertexData () | |
Default c'tor. VertexData objects can only be initialized in derived classes. | |
virtual void | addTransform (unsigned, const VecMath::RotationBase *) |
Perform a D -dimensional transformation. | |
std::vector< VecMath::Vector < D > > & | raw_vertices () |
Read/write access to the list of vertices managed by this object. | |
void | set_raw_vertices (const std::vector< VecMath::Vector< D > > &new_vertices) |
Write access to the list of vertices managed by this object. | |
Private Attributes | |
unsigned | _dimension |
Dimension of the object. | |
std::vector< VecMath::Vector< D > > | _raw_vertices |
The array of vertices. | |
Realm | _realm |
The array of realms (D-1 dimensional surfaces of D-dimensional object) | |
std::vector< const VecMath::RotationBase * > | _transform |
List of transformations executed on the object in dimensions > 4. | |
Static Private Attributes | |
static constexpr double | PROJECTION_SCREEN_W = 2. |
Hardcoded screen distance for generation of the Projection in projected_vertices(). | |
static constexpr double | PROJECTION_CAMERA_W = 8. |
Hardcoded camera w coordinate for generation of the Projection in projected_vertices(). | |
Friends | |
class | RotopeFactory |
Allow RotopeFactory free access to create VertexData objects. |
Base class for all Rotope s.
Contains an array of vertices (Vectors) and a function to print them. This is used mainly in the development of Rotope objects.
D | Dimension of the vector space we're working in |
D
dimensions and scaling.void VertexData< D >::addTransform | ( | unsigned | d, |
const VecMath::RotationBase * | R | ||
) | [protected, virtual] |
Perform a D
-dimensional transformation.
R | Rotation component of the transformation |
d | Dimension on which the transform acts |
Implements RotopeInterface.
References std::cerr.
virtual unsigned& VertexData< D >::dimension | ( | ) | [inline, virtual] |
Direct access to the dimension member instead of setter for convenience.
This way, implementing classes can simply use
instead of the more cumbersome
Because Rotope operations (extrusion, tapering etc.) are all about increasing the dimension, I'll let this stand.
Implements RotopeInterface.
References VertexData< D >::_dimension.
std::vector< VecMath::Vector< 4 > > VertexData< D >::projected_vertices | ( | ) | [virtual] |
The array of vertices, projected to four dimensions if necessary.
Implements RotopeInterface.
constexpr double VertexData< D >::PROJECTION_CAMERA_W = 8. [static, private] |
Hardcoded camera w coordinate for generation of the Projection in projected_vertices().
constexpr double VertexData< D >::PROJECTION_SCREEN_W = 2. [static, private] |
Hardcoded screen distance for generation of the Projection in projected_vertices().