OpenWalnut
1.5.0dev
|
Object that contains all necessary properties of a vertex necessary for a sufficient analysis. More...
#include <WVertexProperty.h>
Public Member Functions | |
WVertexProperty () | |
Initializes a vertex property object and sets settings to defaults. More... | |
virtual | ~WVertexProperty () |
Destroys the vertex property object. More... | |
size_t | getTriangleCount () |
Returns the attached triangle count to the current vertex. More... | |
void | attachTriangle (size_t triangleID) |
Registers a triangle to the current vertex. More... | |
void | detachTriangle (size_t triangleID) |
Unregisters a triangle to the current vertex. More... | |
vector< size_t > | getAttachedTriangles () |
Get all triangle IDs attached to the current vertex. More... | |
size_t | getStencilNeighbourID (size_t index) |
Returns a neighbor ID within the stencil by the index. More... | |
void | insertStencilNeighbourIDToFront (size_t stencilNeighbourID) |
Pushes a stencil neighbor vertex ID before the first Item of the list. More... | |
void | addStencilNeighbourIDToBack (size_t stencilNeighbourID) |
Pushs a stencil neighbour vertex ID after the last Item of the list. More... | |
size_t | getValence () |
Returns the Neighbor vertex count of the current vertex. More... | |
int | getBoundClass () |
Returns the bound count class of the stencil's center point. More... | |
void | setBoundClass (int boundCountClass) |
Sets the bound count class of the stencil's center point. More... | |
bool | containsTriangle (size_t triangleID) |
Returns true if a triangle of the triangleID is connected to the vertex. More... | |
void | attachNewVertex (size_t toID) |
Attachs properties of a new vertex on a line which lies between two original vertices. More... | |
bool | newVertexExists (size_t toID) |
Checks whether the properties of a new vertex exists between the current vertex and toID. More... | |
WNewVertex * | getNewVertexProperty (size_t toID) |
Returns properties of the new vertex between the current vertex ID and toID. More... | |
float | getMaxNeighbourDistance () |
Returns the maximal neighbor distance within the current vertex. More... | |
float | getSumNeighbourDistance () |
Returns summed neighbor distance within the current vertex. More... | |
void | setMaxNeighbourDistance (float maxNeighbourDistance) |
Sets maximal neighbor distance within the current vertex. More... | |
void | setSumNeighbourDistance (float sumNeighbourDistance) |
Sets the summed neighbor distance within the current vertex. More... | |
int | getStencilNeighbourIndex (size_t neighbourID) |
Returns the Stencil neighbor index of a particular vertex ID. More... | |
std::vector< WNewVertex * > | getNewVerticesToHigherNeighborID () |
Returns the properties of new registered vertices of the current vertex. More... | |
Private Attributes | |
std::vector< size_t > | m_attachedTriangle |
List of attached triangles to the current vertex. More... | |
std::vector< WNewVertex * > | m_newVertices |
List of attached new vertices of the current vertex. More... | |
vector< size_t > | m_stencilOnNeighbours |
List that keeps neighbour vertices IDs sorted by the circular order. More... | |
int | m_boundClass |
Depicts the Vertex' kind of bound iit lies on <0: Extraordinary case. More... | |
float | m_maxNeighbourDistance |
Maximal Neighbor vertex distance to the current vertex. More... | |
float | m_sumNeighbourDistance |
Sum of all Neighbor vertex distances to the current vertex. More... | |
Object that contains all necessary properties of a vertex necessary for a sufficient analysis.
Definition at line 47 of file WVertexProperty.h.
WVertexProperty::WVertexProperty | ( | ) |
Initializes a vertex property object and sets settings to defaults.
Definition at line 30 of file WVertexProperty.cpp.
References m_boundClass, m_maxNeighbourDistance, and m_sumNeighbourDistance.
|
virtual |
Destroys the vertex property object.
Definition at line 37 of file WVertexProperty.cpp.
References m_attachedTriangle, m_newVertices, and m_stencilOnNeighbours.
void WVertexProperty::addStencilNeighbourIDToBack | ( | size_t | stencilNeighbourID | ) |
Pushs a stencil neighbour vertex ID after the last Item of the list.
Items must be added in the correct circular order in order to figure out the Butterfly stencil correctly.
stencilNeighbourID | Neighbour vertex ID to be regarded in the Butterfly stencil. |
Definition at line 75 of file WVertexProperty.cpp.
References m_stencilOnNeighbours.
Referenced by insertStencilNeighbourIDToFront().
void WVertexProperty::attachNewVertex | ( | size_t | toID | ) |
Attachs properties of a new vertex on a line which lies between two original vertices.
toID | The point lies between the current ID and toID. toID must always be greater than the current vertex ID. |
Definition at line 135 of file WVertexProperty.cpp.
References m_newVertices.
void WVertexProperty::attachTriangle | ( | size_t | triangleID | ) |
Registers a triangle to the current vertex.
triangleID | Triangle ID to be registered. |
Definition at line 97 of file WVertexProperty.cpp.
References m_attachedTriangle.
Referenced by butterfly::WSubdivisionValidator::flipTrianglesAtLowAngles(), and butterfly::WSubdivisionValidator::joinNarrowVertices().
bool WVertexProperty::containsTriangle | ( | size_t | triangleID | ) |
Returns true if a triangle of the triangleID is connected to the vertex.
triangleID | Triangle ID which is checked for existence |
Definition at line 125 of file WVertexProperty.cpp.
References getTriangleCount(), and m_attachedTriangle.
void WVertexProperty::detachTriangle | ( | size_t | triangleID | ) |
Unregisters a triangle to the current vertex.
triangleID | Triangle ID to be registered. |
Definition at line 108 of file WVertexProperty.cpp.
References m_attachedTriangle.
Referenced by butterfly::WSubdivisionValidator::flipTrianglesAtLowAngles(), and butterfly::WSubdivisionValidator::joinNarrowVertices().
std::vector< size_t > WVertexProperty::getAttachedTriangles | ( | ) |
Get all triangle IDs attached to the current vertex.
They are not organized by the correct circular order.
Definition at line 58 of file WVertexProperty.cpp.
References m_attachedTriangle.
Referenced by butterfly::WSubdivisionValidator::joinNarrowVertices().
int WVertexProperty::getBoundClass | ( | ) |
Returns the bound count class of the stencil's center point.
Definition at line 88 of file WVertexProperty.cpp.
References m_boundClass.
Referenced by butterfly::WButterflyCalculator::calcNewVertex().
float WVertexProperty::getMaxNeighbourDistance | ( | ) |
Returns the maximal neighbor distance within the current vertex.
Definition at line 167 of file WVertexProperty.cpp.
References m_maxNeighbourDistance.
Referenced by butterfly::WSubdivisionValidator::isValidMinAmountOfMax().
WNewVertex * WVertexProperty::getNewVertexProperty | ( | size_t | toID | ) |
Returns properties of the new vertex between the current vertex ID and toID.
toID | The point lies between the current ID and toID. toID must always be greater than the current vertex ID. |
Definition at line 158 of file WVertexProperty.cpp.
References m_newVertices.
std::vector< WNewVertex * > WVertexProperty::getNewVerticesToHigherNeighborID | ( | ) |
Returns the properties of new registered vertices of the current vertex.
New vertices of that which are connected to a vertex with a lower ID than this vertex are not stored because each data set should be stored one timed due to the data holding issue. The method has the advantage that every new vertex can be traversed only once.
Definition at line 193 of file WVertexProperty.cpp.
References m_newVertices.
Referenced by butterfly::WButterflyFactory::addInterpolatedContent(), and butterfly::WButterflyFactory::interpolateNewVerticesRange().
size_t WVertexProperty::getStencilNeighbourID | ( | size_t | index | ) |
Returns a neighbor ID within the stencil by the index.
Items must be added in the correct circular order in order to figure out the Butterfly stencil correctly.
index | Position in the list of the stencil neighbor id. |
Definition at line 63 of file WVertexProperty.cpp.
References m_stencilOnNeighbours.
Referenced by butterfly::WButterflyCalculator::calcNewVertex(), and getStencilNeighbourIndex().
int WVertexProperty::getStencilNeighbourIndex | ( | size_t | neighbourID | ) |
Returns the Stencil neighbor index of a particular vertex ID.
neighbourID | Vertex ID to examine. |
Definition at line 184 of file WVertexProperty.cpp.
References getStencilNeighbourID(), and getValence().
Referenced by butterfly::WButterflyCalculator::calcNewVertex(), and butterfly::WButterflyCalculator::getInterpolatedValue().
float WVertexProperty::getSumNeighbourDistance | ( | ) |
Returns summed neighbor distance within the current vertex.
Definition at line 171 of file WVertexProperty.cpp.
References m_sumNeighbourDistance.
Referenced by butterfly::WSubdivisionValidator::isValidMinAmountOfAverage().
size_t WVertexProperty::getTriangleCount | ( | ) |
Returns the attached triangle count to the current vertex.
Definition at line 53 of file WVertexProperty.cpp.
References m_attachedTriangle.
Referenced by containsTriangle().
size_t WVertexProperty::getValence | ( | ) |
Returns the Neighbor vertex count of the current vertex.
Definition at line 83 of file WVertexProperty.cpp.
References m_stencilOnNeighbours.
Referenced by butterfly::WButterflyCalculator::calcNewVertex(), butterfly::WSubdivisionValidator::generateStatisticalInformation(), getStencilNeighbourIndex(), and butterfly::WSubdivisionValidator::isValidMinAmountOfAverage().
void WVertexProperty::insertStencilNeighbourIDToFront | ( | size_t | stencilNeighbourID | ) |
Pushes a stencil neighbor vertex ID before the first Item of the list.
Items must be added in the correct circular order in order to figure out the Butterfly stencil correctly. Use rather addStencilNeighbourIDToBack than this function due to the performance issue.
stencilNeighbourID | Neighbour vertex ID to be regarded in the Butterfly stencil. |
Definition at line 68 of file WVertexProperty.cpp.
References addStencilNeighbourIDToBack(), and m_stencilOnNeighbours.
bool WVertexProperty::newVertexExists | ( | size_t | toID | ) |
Checks whether the properties of a new vertex exists between the current vertex and toID.
toID | The point lies between the current ID and toID. toID must always be greater than the current vertex ID. |
Definition at line 151 of file WVertexProperty.cpp.
References m_newVertices.
void WVertexProperty::setBoundClass | ( | int | boundCountClass | ) |
Sets the bound count class of the stencil's center point.
boundCountClass | Bound class of the stencil (see description) |
Definition at line 92 of file WVertexProperty.cpp.
References m_boundClass.
void WVertexProperty::setMaxNeighbourDistance | ( | float | maxNeighbourDistance | ) |
Sets maximal neighbor distance within the current vertex.
maxNeighbourDistance | The average neighbor distance within the current vertex. |
Definition at line 175 of file WVertexProperty.cpp.
References m_maxNeighbourDistance.
void WVertexProperty::setSumNeighbourDistance | ( | float | sumNeighbourDistance | ) |
Sets the summed neighbor distance within the current vertex.
sumNeighbourDistance | The average neighbor distance within the current vertex. |
Definition at line 179 of file WVertexProperty.cpp.
References m_sumNeighbourDistance.
|
private |
List of attached triangles to the current vertex.
Definition at line 226 of file WVertexProperty.h.
Referenced by attachTriangle(), containsTriangle(), detachTriangle(), getAttachedTriangles(), getTriangleCount(), and ~WVertexProperty().
|
private |
Depicts the Vertex' kind of bound iit lies on <0: Extraordinary case.
More triangles ran through than actually exist 0: Vertex lies not on the bound. 1: Vertex lies on a bound. >=2: Vertex lies on at least two bounds that are separated by triangles. or it contains a vertex connection which hits at least three triangles.
Definition at line 250 of file WVertexProperty.h.
Referenced by getBoundClass(), setBoundClass(), and WVertexProperty().
|
private |
Maximal Neighbor vertex distance to the current vertex.
Definition at line 255 of file WVertexProperty.h.
Referenced by getMaxNeighbourDistance(), setMaxNeighbourDistance(), and WVertexProperty().
|
private |
List of attached new vertices of the current vertex.
Due to Organization problems only that vertices are in this list which are of a higher connected vertex ID than the current. To get ones of the lower ID you should examine all neighbours of the lower ID and fetch all new points where toID equals to the current neighbor vertex ID.
Definition at line 234 of file WVertexProperty.h.
Referenced by attachNewVertex(), getNewVertexProperty(), getNewVerticesToHigherNeighborID(), newVertexExists(), and ~WVertexProperty().
|
private |
List that keeps neighbour vertices IDs sorted by the circular order.
The whole Butterfly stencil can be compound using the neighbour array of the other stencil center vertex.
Definition at line 240 of file WVertexProperty.h.
Referenced by addStencilNeighbourIDToBack(), getStencilNeighbourID(), getValence(), insertStencilNeighbourIDToFront(), and ~WVertexProperty().
|
private |
Sum of all Neighbor vertex distances to the current vertex.
Definition at line 260 of file WVertexProperty.h.
Referenced by getSumNeighbourDistance(), setSumNeighbourDistance(), and WVertexProperty().