25 #ifndef WBUTTERFLYFACTORY_H_
26 #define WBUTTERFLYFACTORY_H_
32 #include "WButterflyCalculator.h"
33 #include "WSubdivisionValidator.h"
34 #include "core/kernel/WModule.h"
35 #include "structure/WVertexFactory.h"
113 std::shared_ptr< WTriangleMesh >
getSubdividedMesh( std::shared_ptr< WTriangleMesh > edgedMmesh );
Class that depicts the whole Butterfly subdivision algorithm but nothing more as such.
Class that depicts the whole Butterfly subdivision algorithm but nothing more as such.
virtual ~WButterflyFactory()
Destroys the Butterfly instance object and its substructures.
WSubdivisionValidator * getValidator()
Returns the Butterfly subdivision validator.
size_t m_cpuThreadCount
CPU threads count for multithreading support.
void addInterpolatedContent()
Adds interpolated vertices and triangles to the output triangle mesh.
std::shared_ptr< WProgressCombiner > m_associatedProgressCombiner
Progress combiner for changing the plugin status in the modules overview.
void setCpuThreadCount(size_t cpuThreadCount)
Sets the count of CPU threads to use.
void setProgressSettings(size_t iteration, size_t steps)
Sets progress which iteration step and kind of cumputing step is currently done.
vector< boost::thread * > m_cpuThreads
CPU threads object for multithreading support.
size_t m_iterations
Iteration steps to apply iteratedly.
WSubdivisionValidator * m_validator
Triangle mesh validation instance.
WVertexFactory * m_verts
Data set used for analyzation of the triangle mesh.
std::shared_ptr< WTriangleMesh > getSubdividedMesh(std::shared_ptr< WTriangleMesh > edgedMmesh)
Launch the Butterfly subdivision.
size_t m_maxTriangles
Maximal allowed triangle count applyable for subdivision.
void examineStencilAll()
Examines Butterfly stencils of all vertices and stores data.
std::shared_ptr< WTriangleMesh > m_inputMesh
Base triangle mesh used for calculations.
void attachUncalculatedNewVertices()
Attachs new vertices that are used for the subdivision.
size_t m_triCount
Total triangle count.
void applyMeshPreprocessing(size_t iteration)
Applies triangle mesh preprocessing if vertex flip or triangle flip setting is not default.
WButterflyCalculator * m_butterflyCalculator
Instance for interpolating new vertices.
std::shared_ptr< WProgress > m_progressStatus
Current progress status.
size_t m_vertCount
Current count of currently added vertices during interpolation.
void setButterflySettingW(float butterflySettingW)
Set the general Butterfly Subdivision setting w that affects the subdivision.
void assignProgressCombiner(std::shared_ptr< WProgressCombiner > associatedProgressCombiner)
Assigns a ProbressCombiner to the Butterfly factory.
std::shared_ptr< WTriangleMesh > m_outputMesh
Triangle mesh that is set up by interpolation.
WButterflyFactory()
Butterfly subdivision tool object creating instance.
void interpolateNewVerticesRange(size_t fromVertex, size_t toVertex)
Calculates coordinates of the new vertices.
void setIterationsSettings(float m_iterations, float m_maxTriangles10n)
Assign main butterfly subdivision iterations settings.
void interpolateNewVertices()
Calculates coordinates of the new vertices.
void examineVertexNeighborhood(size_t iteration)
Examine The triangle mesh before Butterfly subdivision.
Class that validates the Butterfly subdivision.
Class that manages all vertex properties.