OpenWalnut
1.5.0dev
|
Depicts a point that is subdivided on a line between two vertices. More...
#include <WNewVertex.h>
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... | |
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.
|
explicit |
Initializes properties of a new vertex with all its necessary parameters.
toID | The 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.
|
virtual |
Destroys the new vertex property.
Definition at line 38 of file WNewVertex.cpp.
osg::Vec3 butterfly::WNewVertex::getCoordinate | ( | ) |
Returns coordinates of the new vertex.
Definition at line 64 of file WNewVertex.cpp.
References m_coordinate.
Referenced by butterfly::WButterflyFactory::addInterpolatedContent().
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.
Definition at line 43 of file WNewVertex.cpp.
References m_newVertexID.
Referenced by butterfly::WSubdivisionValidator::subdivideTriangle().
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.
Definition at line 52 of file WNewVertex.cpp.
References m_toID.
Referenced by butterfly::WButterflyFactory::interpolateNewVerticesRange().
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.
Definition at line 60 of file WNewVertex.cpp.
References m_isValid.
Referenced by butterfly::WButterflyFactory::addInterpolatedContent(), setValid(), and butterfly::WSubdivisionValidator::subdivideTriangle().
void butterfly::WNewVertex::setCoordinate | ( | osg::Vec3 | coordinate | ) |
Sets coordinates of the new vertex.
coordinate | coordinate of the new vertex ID. |
Definition at line 68 of file WNewVertex.cpp.
References m_coordinate.
Referenced by butterfly::WButterflyFactory::interpolateNewVerticesRange().
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.
newVertexID | Vertex ID to set. |
Definition at line 47 of file WNewVertex.cpp.
References m_newVertexID.
Referenced by butterfly::WButterflyFactory::addInterpolatedContent().
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.
isValid | Whether 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().
|
private |
Coordinate of the new vertex.
Definition at line 125 of file WNewVertex.h.
Referenced by getCoordinate(), setCoordinate(), and WNewVertex().
|
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().
|
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().
|
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().