OpenWalnut  1.5.0dev
Public Member Functions | Private Attributes | List of all members
butterfly::WNewVertex Class Reference

Depicts a point that is subdivided on a line between two vertices. More...

#include <WNewVertex.h>

+ Collaboration diagram for butterfly::WNewVertex:

Public Member Functions

 WNewVertex (size_t toID)
 Initializes properties of a new vertex with all its necessary parameters. More...
 
virtual ~WNewVertex ()
 Destroys the new vertex property. More...
 
size_t getNewVertexID ()
 Returns the proposed ID of that new vertex. More...
 
void setNewVertexID (size_t newVertexID)
 Sets the proposed ID for that new vertex. More...
 
size_t getToID ()
 Returns the second vertex ID where the new vertex lies between these two points. More...
 
void setValid (bool isValid)
 Sets the new vertex property whether it's valid for butterfly subdivision or not. More...
 
bool isValid ()
 Returns whether the new vertex is marked to be valid for the butterfly subdivison of a line between two vertices. More...
 
osg::Vec3 getCoordinate ()
 Returns coordinates of the new vertex. More...
 
void setCoordinate (osg::Vec3 coordinate)
 Sets coordinates of the new vertex. More...
 

Private Attributes

size_t m_toID
 The id of the second vertex the new vertex is connected to. More...
 
size_t m_newVertexID
 ID the new vertex is proposed to have in the final triangle mesh. More...
 
osg::Vec3 m_coordinate
 Coordinate of the new vertex. More...
 
bool m_isValid
 Property whether the new vertex is valid for subdivision. More...
 

Detailed Description

Depicts a point that is subdivided on a line between two vertices.

It's stored in a vertex property. The second relationship is depicted by the toID field.

Definition at line 39 of file WNewVertex.h.

Constructor & Destructor Documentation

◆ WNewVertex()

butterfly::WNewVertex::WNewVertex ( size_t  toID)
explicit

Initializes properties of a new vertex with all its necessary parameters.

Parameters
toIDThe other point which the new vertex is interpolated between. The first point stores the new vertex object. toID is always bigger.

Definition at line 30 of file WNewVertex.cpp.

References m_coordinate, m_isValid, m_newVertexID, and m_toID.

◆ ~WNewVertex()

butterfly::WNewVertex::~WNewVertex ( )
virtual

Destroys the new vertex property.

Definition at line 38 of file WNewVertex.cpp.

Member Function Documentation

◆ getCoordinate()

osg::Vec3 butterfly::WNewVertex::getCoordinate ( )

Returns coordinates of the new vertex.

Author
schwarzkopf
Returns
Coordinate of the new vertex ID.

Definition at line 64 of file WNewVertex.cpp.

References m_coordinate.

Referenced by butterfly::WButterflyFactory::addInterpolatedContent().

+ Here is the caller graph for this function:

◆ getNewVertexID()

size_t butterfly::WNewVertex::getNewVertexID ( )

Returns the proposed ID of that new vertex.

The ID should be equal to the one of the final Triangle Mesh.

Author
schwarzkopf
Returns
ID of the new vertex.

Definition at line 43 of file WNewVertex.cpp.

References m_newVertexID.

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

+ Here is the caller graph for this function:

◆ getToID()

size_t butterfly::WNewVertex::getToID ( )

Returns the second vertex ID where the new vertex lies between these two points.

It's still not necessary to store the first connected one. The second ID is always bigger than the first one.

Author
schwarzkopf
Returns
The second connected Vertex ID.

Definition at line 52 of file WNewVertex.cpp.

References m_toID.

Referenced by butterfly::WButterflyFactory::interpolateNewVerticesRange().

+ Here is the caller graph for this function:

◆ isValid()

bool butterfly::WNewVertex::isValid ( )

Returns whether the new vertex is marked to be valid for the butterfly subdivison of a line between two vertices.

Invalid lines are not subdivided.

Author
schwarzkopf
Returns
Whether the new vertex is marked to be valid for butterfly subdivision or not.

Definition at line 60 of file WNewVertex.cpp.

References m_isValid.

Referenced by butterfly::WButterflyFactory::addInterpolatedContent(), setValid(), and butterfly::WSubdivisionValidator::subdivideTriangle().

+ Here is the caller graph for this function:

◆ setCoordinate()

void butterfly::WNewVertex::setCoordinate ( osg::Vec3  coordinate)

Sets coordinates of the new vertex.

Author
schwarzkopf
Parameters
coordinatecoordinate of the new vertex ID.

Definition at line 68 of file WNewVertex.cpp.

References m_coordinate.

Referenced by butterfly::WButterflyFactory::interpolateNewVerticesRange().

+ Here is the caller graph for this function:

◆ setNewVertexID()

void butterfly::WNewVertex::setNewVertexID ( size_t  newVertexID)

Sets the proposed ID for that new vertex.

The ID should be equal to the one of the final Triangle Mesh.

Author
schwarzkopf
Parameters
newVertexIDVertex ID to set.

Definition at line 47 of file WNewVertex.cpp.

References m_newVertexID.

Referenced by butterfly::WButterflyFactory::addInterpolatedContent().

+ Here is the caller graph for this function:

◆ setValid()

void butterfly::WNewVertex::setValid ( bool  isValid)

Sets the new vertex property whether it's valid for butterfly subdivision or not.

Invalid lines are not subdivided.

Author
schwarzkopf
Parameters
isValidWhether the new vertex is marked to be valid for butterfly subdivision or not.

Definition at line 56 of file WNewVertex.cpp.

References isValid(), and m_isValid.

Referenced by butterfly::WVertexFactory::getNewVertexProperty(), and butterfly::WButterflyFactory::interpolateNewVerticesRange().

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

Member Data Documentation

◆ m_coordinate

osg::Vec3 butterfly::WNewVertex::m_coordinate
private

Coordinate of the new vertex.

Definition at line 125 of file WNewVertex.h.

Referenced by getCoordinate(), setCoordinate(), and WNewVertex().

◆ m_isValid

bool butterfly::WNewVertex::m_isValid
private

Property whether the new vertex is valid for subdivision.

Not validly marked lines are not subdivided. Therefore an alternative triangulation is taken.

Definition at line 131 of file WNewVertex.h.

Referenced by isValid(), setValid(), and WNewVertex().

◆ m_newVertexID

size_t butterfly::WNewVertex::m_newVertexID
private

ID the new vertex is proposed to have in the final triangle mesh.

Definition at line 120 of file WNewVertex.h.

Referenced by getNewVertexID(), setNewVertexID(), and WNewVertex().

◆ m_toID

size_t butterfly::WNewVertex::m_toID
private

The id of the second vertex the new vertex is connected to.

The first point is defined by the number of the stored vertex property where this object lies in. The toID is always bigger than the first ID due to data organization issue.

Definition at line 115 of file WNewVertex.h.

Referenced by getToID(), and WNewVertex().


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