|
HilVert
1v2
A demo of the Hilbert Curve in SVG.
|
Implementation of the HilVert class. More...

Go to the source code of this file.
Typedefs | |
| using | Hen = HilVert::HVenm |
Functions | |
| auto & | operator^= (Hen &e, const bool &b) |
| Swap clockwise with anticlock on condition. More... | |
| auto & | operator++ (Hen &e) |
| Turn to the right of the current heading. More... | |
| Hen & | operator-- (Hen &e) |
| Turn to the left of the current heading. More... | |
Variables | |
| constexpr auto | right = Hen::right |
| constexpr auto | down = Hen::down |
| constexpr auto | left = Hen::left |
| constexpr auto | up = Hen::up |
| constexpr auto | stard = Hen::stard |
| constexpr auto | anticlock = Hen::anticlock |
| constexpr auto | clockwise = Hen::clockwise |
| constexpr auto | alike = Hen::alike |
| constexpr auto | widdershins = Hen::widdershins |
The HilVert class generates the SVG code needed to draw Hilbert Curves of 12th. order, or below. Within your own C++ code you can #include "HilVert.hpp" and create at least one HilVert object. Use constructor arguments to select the curve options (there are four) you need, or call cmndLn() to modify the defaults. Then call draw() or grfc().
HilVert. The first is programmatically, as a free-standing
See HilVert.hpp for usage.
There are two ways to use HilVert. The first is programmatically; as a stand-alone class that you can include in a larger C++ project. See HilVert.hpp for usage.
Note: To setup the command line arguments for tests under XCode hit
Product:Scheme:Edit_Scheme and select the Arguments tab.
See also -
https://en.wikipedia.org/wiki/Hilbert_curve The enum HilVert::HVenm :
Definition in file HilVert.cpp.
| using Hen = HilVert::HVenm |
Definition at line 86 of file HilVert.cpp.
| auto& operator++ | ( | Hen & | e | ) |
| Pre-call e | Return |
|---|---|
| right | down |
| down | left |
| left | up |
| up | right |
| e | The enumerator specifying the current heading. May be one of HilVert::HVenm::right, HilVert::HVenm::down, HilVert::HVenm::left or HilVert::HVenm::up , |
Definition at line 212 of file HilVert.cpp.
| Pre-call e | Return |
|---|---|
| right | up |
| down | right |
| left | down |
| up | left |
| e | The enumerator specifying the current heading. May be one of HilVert::HVenm::right, HilVert::HVenm::down, HilVert::HVenm::left or HilVert::HVenm::up , |
Definition at line 241 of file HilVert.cpp.
| auto& operator^= | ( | Hen & | e, |
| const bool & | b | ||
| ) |
Predicated reversal of rotation direction.
| Pre-call e | b | Post-call e |
|---|---|---|
| anticlock | false | anticlock |
| clockwise | false | clockwise |
| anticlock | true | clockwise |
| clockwise | true | anticlock |
| e | The enumerator specifying a current rotation. May be either HilVert::HVenm::clockwise or HilVert::HVenm::anticlock. |
| b | Set true if the rotation is to be reversed, or set false if the rotation must remain unchanged. |
Definition at line 187 of file HilVert.cpp.
|
constexpr |
Definition at line 96 of file HilVert.cpp.
|
constexpr |
Definition at line 94 of file HilVert.cpp.
|
constexpr |
Definition at line 95 of file HilVert.cpp.
|
constexpr |
Definition at line 90 of file HilVert.cpp.
|
constexpr |
Definition at line 91 of file HilVert.cpp.
|
constexpr |
Definition at line 89 of file HilVert.cpp.
|
constexpr |
Definition at line 93 of file HilVert.cpp.
|
constexpr |
Definition at line 92 of file HilVert.cpp.
|
constexpr |
Definition at line 97 of file HilVert.cpp.