OpenWalnut  1.5.0dev
Public Member Functions | Private Attributes | List of all members
WVertexProperty Class Reference

Object that contains all necessary properties of a vertex necessary for a sufficient analysis. More...

#include <WVertexProperty.h>

+ Collaboration diagram for WVertexProperty:

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...
 
WNewVertexgetNewVertexProperty (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...
 

Detailed Description

Object that contains all necessary properties of a vertex necessary for a sufficient analysis.

Definition at line 47 of file WVertexProperty.h.

Constructor & Destructor Documentation

◆ WVertexProperty()

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.

◆ ~WVertexProperty()

WVertexProperty::~WVertexProperty ( )
virtual

Destroys the vertex property object.

Definition at line 37 of file WVertexProperty.cpp.

References m_attachedTriangle, m_newVertices, and m_stencilOnNeighbours.

Member Function Documentation

◆ addStencilNeighbourIDToBack()

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.

Author
schwarzkopf
Parameters
stencilNeighbourIDNeighbour vertex ID to be regarded in the Butterfly stencil.

Definition at line 75 of file WVertexProperty.cpp.

References m_stencilOnNeighbours.

Referenced by insertStencilNeighbourIDToFront().

+ Here is the caller graph for this function:

◆ attachNewVertex()

void WVertexProperty::attachNewVertex ( size_t  toID)

Attachs properties of a new vertex on a line which lies between two original vertices.

Author
schwarzkopf
Parameters
toIDThe 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.

◆ attachTriangle()

void WVertexProperty::attachTriangle ( size_t  triangleID)

Registers a triangle to the current vertex.

Author
schwarzkopf
Parameters
triangleIDTriangle ID to be registered.

Definition at line 97 of file WVertexProperty.cpp.

References m_attachedTriangle.

Referenced by butterfly::WSubdivisionValidator::flipTrianglesAtLowAngles(), and butterfly::WSubdivisionValidator::joinNarrowVertices().

+ Here is the caller graph for this function:

◆ containsTriangle()

bool WVertexProperty::containsTriangle ( size_t  triangleID)

Returns true if a triangle of the triangleID is connected to the vertex.

Author
schwarzkopf
Parameters
triangleIDTriangle ID which is checked for existence
Returns
Triangle ID exists or not

Definition at line 125 of file WVertexProperty.cpp.

References getTriangleCount(), and m_attachedTriangle.

+ Here is the call graph for this function:

◆ detachTriangle()

void WVertexProperty::detachTriangle ( size_t  triangleID)

Unregisters a triangle to the current vertex.

Author
schwarzkopf
Parameters
triangleIDTriangle ID to be registered.

Definition at line 108 of file WVertexProperty.cpp.

References m_attachedTriangle.

Referenced by butterfly::WSubdivisionValidator::flipTrianglesAtLowAngles(), and butterfly::WSubdivisionValidator::joinNarrowVertices().

+ Here is the caller graph for this function:

◆ getAttachedTriangles()

std::vector< size_t > WVertexProperty::getAttachedTriangles ( )

Get all triangle IDs attached to the current vertex.

They are not organized by the correct circular order.

Author
schwarzkopf
Returns
All triangle IDs attached to the current vertex.

Definition at line 58 of file WVertexProperty.cpp.

References m_attachedTriangle.

Referenced by butterfly::WSubdivisionValidator::joinNarrowVertices().

+ Here is the caller graph for this function:

◆ getBoundClass()

int WVertexProperty::getBoundClass ( )

Returns the bound count class of the stencil's center point.

Author
schwarzkopf
Returns
Bound class of the stencil (see description).

Definition at line 88 of file WVertexProperty.cpp.

References m_boundClass.

Referenced by butterfly::WButterflyCalculator::calcNewVertex().

+ Here is the caller graph for this function:

◆ getMaxNeighbourDistance()

float WVertexProperty::getMaxNeighbourDistance ( )

Returns the maximal neighbor distance within the current vertex.

Author
schwarzkopf
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().

+ Here is the caller graph for this function:

◆ getNewVertexProperty()

WNewVertex * WVertexProperty::getNewVertexProperty ( size_t  toID)

Returns properties of the new vertex between the current vertex ID and toID.

Author
schwarzkopf
Parameters
toIDThe point lies between the current ID and toID. toID must always be greater than the current vertex ID.
Returns
Properties of the new vertex.

Definition at line 158 of file WVertexProperty.cpp.

References m_newVertices.

◆ getNewVerticesToHigherNeighborID()

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.

Author
schwarzkopf
Returns
The properties of new registered vertices but only those which are connected to a higher neighbor vertex ID than the actual.

Definition at line 193 of file WVertexProperty.cpp.

References m_newVertices.

Referenced by butterfly::WButterflyFactory::addInterpolatedContent(), and butterfly::WButterflyFactory::interpolateNewVerticesRange().

+ Here is the caller graph for this function:

◆ getStencilNeighbourID()

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.

Author
schwarzkopf
Parameters
indexPosition in the list of the stencil neighbor id.
Returns
Neighbour count of a vertex that is used for the Butterfly stencil.

Definition at line 63 of file WVertexProperty.cpp.

References m_stencilOnNeighbours.

Referenced by butterfly::WButterflyCalculator::calcNewVertex(), and getStencilNeighbourIndex().

+ Here is the caller graph for this function:

◆ getStencilNeighbourIndex()

int WVertexProperty::getStencilNeighbourIndex ( size_t  neighbourID)

Returns the Stencil neighbor index of a particular vertex ID.

Author
schwarzkopf
Parameters
neighbourIDVertex ID to examine.
Returns
Array index of the Neighbour vertex ID.

Definition at line 184 of file WVertexProperty.cpp.

References getStencilNeighbourID(), and getValence().

Referenced by butterfly::WButterflyCalculator::calcNewVertex(), and butterfly::WButterflyCalculator::getInterpolatedValue().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSumNeighbourDistance()

float WVertexProperty::getSumNeighbourDistance ( )

Returns summed neighbor distance within the current vertex.

Author
schwarzkopf
Returns
The average neighbor distance within the current vertex.

Definition at line 171 of file WVertexProperty.cpp.

References m_sumNeighbourDistance.

Referenced by butterfly::WSubdivisionValidator::isValidMinAmountOfAverage().

+ Here is the caller graph for this function:

◆ getTriangleCount()

size_t WVertexProperty::getTriangleCount ( )

Returns the attached triangle count to the current vertex.

Returns
Attached triangle count to the current vertex.

Definition at line 53 of file WVertexProperty.cpp.

References m_attachedTriangle.

Referenced by containsTriangle().

+ Here is the caller graph for this function:

◆ getValence()

size_t WVertexProperty::getValence ( )

Returns the Neighbor vertex count of the current vertex.

Author
schwarzkopf It's called "valence" in the Butterfly document sheet.
Returns
Valence (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().

+ Here is the caller graph for this function:

◆ insertStencilNeighbourIDToFront()

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.

Author
schwarzkopf
Parameters
stencilNeighbourIDNeighbour vertex ID to be regarded in the Butterfly stencil.

Definition at line 68 of file WVertexProperty.cpp.

References addStencilNeighbourIDToBack(), and m_stencilOnNeighbours.

+ Here is the call graph for this function:

◆ newVertexExists()

bool WVertexProperty::newVertexExists ( size_t  toID)

Checks whether the properties of a new vertex exists between the current vertex and toID.

Author
schwarzkopf
Parameters
toIDThe point lies between the current ID and toID. toID must always be greater than the current vertex ID.
Returns
Properties of new vertex exist or not.

Definition at line 151 of file WVertexProperty.cpp.

References m_newVertices.

◆ setBoundClass()

void WVertexProperty::setBoundClass ( int  boundCountClass)

Sets the bound count class of the stencil's center point.

Author
schwarzkopf
Parameters
boundCountClassBound class of the stencil (see description)

Definition at line 92 of file WVertexProperty.cpp.

References m_boundClass.

◆ setMaxNeighbourDistance()

void WVertexProperty::setMaxNeighbourDistance ( float  maxNeighbourDistance)

Sets maximal neighbor distance within the current vertex.

Author
schwarzkopf
Parameters
maxNeighbourDistanceThe average neighbor distance within the current vertex.

Definition at line 175 of file WVertexProperty.cpp.

References m_maxNeighbourDistance.

◆ setSumNeighbourDistance()

void WVertexProperty::setSumNeighbourDistance ( float  sumNeighbourDistance)

Sets the summed neighbor distance within the current vertex.

Author
schwarzkopf
Parameters
sumNeighbourDistanceThe average neighbor distance within the current vertex.

Definition at line 179 of file WVertexProperty.cpp.

References m_sumNeighbourDistance.

Member Data Documentation

◆ m_attachedTriangle

std::vector<size_t> WVertexProperty::m_attachedTriangle
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().

◆ m_boundClass

int WVertexProperty::m_boundClass
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().

◆ m_maxNeighbourDistance

float WVertexProperty::m_maxNeighbourDistance
private

Maximal Neighbor vertex distance to the current vertex.

Definition at line 255 of file WVertexProperty.h.

Referenced by getMaxNeighbourDistance(), setMaxNeighbourDistance(), and WVertexProperty().

◆ m_newVertices

std::vector<WNewVertex*> WVertexProperty::m_newVertices
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().

◆ m_stencilOnNeighbours

vector<size_t> WVertexProperty::m_stencilOnNeighbours
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().

◆ m_sumNeighbourDistance

float WVertexProperty::m_sumNeighbourDistance
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().


The documentation for this class was generated from the following files: