![]() |
OpenWalnut
1.5.0dev
|
Creates a pattern of evenly spaced dots via simulating a chemical reaction. More...
#include <WTuringPatternCreator.h>
Collaboration diagram for WTuringPatternCreator:Classes | |
| class | PatternThread |
| A thread calculating the reaction for a certain part of the domain. More... | |
Public Member Functions | |
| WTuringPatternCreator (std::shared_ptr< WProgress > const progress, std::size_t numThreads=boost::thread::hardware_concurrency()) | |
| Constructor. More... | |
| ~WTuringPatternCreator () | |
| Destructor. More... | |
| std::shared_ptr< std::vector< float > > | create (std::size_t sizeX, std::size_t sizeY, std::size_t sizeZ) |
| Creates the 3D pattern and writes it into a vector of floats. More... | |
| void | setSpotSize (float size) |
| Sets the spotsize parameter. More... | |
| void | setSpotIrregularity (float irr) |
| Sets the spot irregularity parameter. More... | |
| void | setNumIterations (std::size_t iter) |
| Sets the number of iterations for the chemical simulation that creates the pattern. More... | |
Private Attributes | |
| std::size_t | m_numThreads |
| The number of threads to use. More... | |
| float | m_numIterations |
| The number of iterations for the simulation. More... | |
| float | m_spotIrregularity |
| The spot irregularity parameter. More... | |
| float | m_spotSize |
| The spot size parameter. More... | |
| std::shared_ptr< WProgress > | m_progress |
| The progress to increment. More... | |
Creates a pattern of evenly spaced dots via simulating a chemical reaction.
The pattern is created on a regular 3D grid.
Definition at line 43 of file WTuringPatternCreator.h.
| WTuringPatternCreator::WTuringPatternCreator | ( | std::shared_ptr< WProgress > const | progress, |
| std::size_t | numThreads = boost::thread::hardware_concurrency() |
||
| ) |
Constructor.
| progress | The progress indicator to use. |
| numThreads | The number of threads to use. |
Definition at line 34 of file WTuringPatternCreator.cpp.
| WTuringPatternCreator::~WTuringPatternCreator | ( | ) |
Destructor.
Definition at line 44 of file WTuringPatternCreator.cpp.
| std::shared_ptr< std::vector< float > > WTuringPatternCreator::create | ( | std::size_t | sizeX, |
| std::size_t | sizeY, | ||
| std::size_t | sizeZ | ||
| ) |
Creates the 3D pattern and writes it into a vector of floats.
This vector can simply be added to a valueset.
| sizeX | The size of the grid in x-direction. |
| sizeY | The size of the grid in y-direction. |
| sizeZ | The size of the grid in z-direction. |
Definition at line 69 of file WTuringPatternCreator.cpp.
References m_numIterations, m_numThreads, m_progress, m_spotIrregularity, and m_spotSize.
| void WTuringPatternCreator::setNumIterations | ( | std::size_t | iter | ) |
Sets the number of iterations for the chemical simulation that creates the pattern.
| iter | The number of iterations. |
Definition at line 48 of file WTuringPatternCreator.cpp.
References m_numIterations.
| void WTuringPatternCreator::setSpotIrregularity | ( | float | irr | ) |
Sets the spot irregularity parameter.
| irr | A value between 0 and 1. |
Definition at line 55 of file WTuringPatternCreator.cpp.
References m_spotIrregularity.
| void WTuringPatternCreator::setSpotSize | ( | float | size | ) |
Sets the spotsize parameter.
| size | A value between 0 and 1. |
Definition at line 62 of file WTuringPatternCreator.cpp.
References m_spotSize.
|
private |
The number of iterations for the simulation.
Definition at line 223 of file WTuringPatternCreator.h.
Referenced by create(), and setNumIterations().
|
private |
The number of threads to use.
Definition at line 220 of file WTuringPatternCreator.h.
Referenced by create().
|
private |
The progress to increment.
Definition at line 232 of file WTuringPatternCreator.h.
Referenced by create().
|
private |
The spot irregularity parameter.
Definition at line 226 of file WTuringPatternCreator.h.
Referenced by create(), and setSpotIrregularity().
|
private |
The spot size parameter.
Definition at line 229 of file WTuringPatternCreator.h.
Referenced by create(), and setSpotSize().