34 #ifndef WBUTTERFLYCALCULATOR_H_ 
   35 #define WBUTTERFLYCALCULATOR_H_ 
   41 #include "WSubdivisionValidator.h" 
   42 #include "core/kernel/WModule.h" 
   43 #include "structure/WVertexFactory.h" 
  129         osg::Vec3 
calcMean( 
size_t vertID1, 
size_t vertID2 );
 
  140         Vec3 
getInterpolatedValue( 
size_t stencilCenterVertID, 
size_t directedNeighbourVertID, 
bool isIrregular );
 
Class that depicts the whole Butterfly subdivision algorithm but nothing more as such.
 
osg::Vec3 calcMean(size_t vertID1, size_t vertID2)
Calculate a subdivided mit point between two vertices using the mean calculation.
 
void assignInputMesh(std::shared_ptr< WTriangleMesh > inputMesh, WVertexFactory *vertexProperties)
Assigns the input mesh andd its analyzed data that are required for the butterfly subdivision.
 
Vec3 getInterpolatedValue(size_t stencilCenterVertID, size_t directedNeighbourVertID, bool isIrregular)
Calculate the coordinates of a stencil half using the Butterfly subdivision algorithm.
 
WVertexFactory * m_verts
Associated data set used for analyzation of the triangle mesh.
 
static float m_weightCenterAtBorder
Weight where both stencil centers lie on a border.
 
std::shared_ptr< WTriangleMesh > m_inputMesh
Base triangle mesh used for calculations.
 
static float m_weightRimAtBorder
Weight where both stencil centers lie on a border.
 
void setButterflySettingW(float butterflySettingW)
Set the general Butterfly Subdivision setting w that affects the subdivision.
 
osg::Vec3 calcNewVertex(size_t vertID1, size_t vertID2)
Calculate the subdivided new vertex between two vertices using the Butterfly Subdivision.
 
WButterflyCalculator()
Butterfly subdivision tool object creating instance.
 
virtual ~WButterflyCalculator()
Destroys the Butterfly instance object and its substructures.
 
static float m_weights[4][7]
Butterfly subdivision Weights for each neighbor which always are applied for valences 3 and 4.
 
static float m_w
The general Butterfly Subdivision setting w that affects the subdivision.
 
Class that manages all vertex properties.