|
HyperspaceExplorer 0.7.1
|
A four-dimensional cube. More...
#include <ObjectImplementations.h>


Public Member Functions | |
| Hypercube (double a=1., const VecMath::Vector< 4 > &_center=VecMath::Vector< 4 >(0., 0., 0., 0.)) | |
| Construct a hypercube with a side length and a center. | |
| virtual std::string | getFunctionName () const |
| virtual void | SetParameters (const ParameterMap &parms) |
| Set parameters to the Displayable. | |
| virtual std::string | description () |
| virtual void | Draw (UI::View *view) |
| reimplement Draw() to make use of the stored vertices (instead of indices) | |
Protected Member Functions | |
| virtual void | Initialize () |
| Actually creates the Hypercube. | |
| void | DeclareSquare (unsigned, unsigned, unsigned, unsigned, unsigned, unsigned=0) |
Declare a square in the Surface array. | |
Protected Attributes | |
| double | _a |
| Side length of the hypercube. | |
| VecMath::Vector< 4 > | _center |
| Center of the hypercube. | |
| surface_vec_type | Surface |
| the surfaces, stored as vectors of indeces to the points in X | |
Static Protected Attributes | |
| static constexpr unsigned | num_vertices = 16 |
| static constexpr unsigned | num_faces = 24 |
A four-dimensional cube.
| Hypercube::Hypercube | ( | double | a = 1., |
| const VecMath::Vector< 4 > & | center = VecMath::Vector<4>(0., 0., 0., 0.) |
||
| ) |
Construct a hypercube with a side length and a center.
Hypercube constructor.
| center | center |
| a | side_length/2 |
References Displayable::declareParameter(), and Initialize().

| void Hypercube::DeclareSquare | ( | unsigned | i, |
| unsigned | a, | ||
| unsigned | b, | ||
| unsigned | c, | ||
| unsigned | d, | ||
| unsigned | offset = 0 |
||
| ) | [protected] |
Declare a square in the Surface array.
| i | index of the square |
| a | index of vertex 1 |
| b | index of vertex 2 |
| c | index of vertex 3 |
| d | index of vertex 4 |
| offset | if there are multiple cubes, the index of the cube |
References begin(), and VertexHolder< 4, 1, double >::X().
Referenced by Initialize().


| virtual std::string Hypercube::description | ( | ) | [inline, virtual] |
Reimplemented in Sponge, and AltSponge.
References _a, and std::ends().

| virtual std::string Hypercube::getFunctionName | ( | ) | const [inline, virtual] |
Implements Displayable.
| void Hypercube::Initialize | ( | void | ) | [protected, virtual] |
Actually creates the Hypercube.
sets up the vertices of the Hypercube in X[], then sets up the surfaces of the Hypercube by declaring the appropriate squares as a list in Surface[][].
Reimplemented from Object.
Reimplemented in Sponge, and AltSponge.
References _a, _center, DeclareSquare(), Object::setX(), size(), and VertexHolder< 4, 1, double >::X().
Referenced by Hypercube().


| virtual void Hypercube::SetParameters | ( | const ParameterMap & | ) | [inline, virtual] |
Set parameters to the Displayable.
Reimplemented from Displayable.
Reimplemented in Sponge, and AltSponge.
References _a, std::map< _Key, _Tp, _Compare, _Alloc >::begin(), std::map< _Key, _Tp, _Compare, _Alloc >::end(), and Displayable::setParameter().

1.7.4
-
Hosted by