MeVisLab Toolbox Reference
|
Defines the mesh component: node. More...
#include <WEMNode.h>
Public Member Functions | |
WEMNode () | |
Standard constructor. | |
WEMNode (const WEMNode &n) | |
Copy constructor. | |
WEMNode (WEMNode &&n) noexcept | |
WEMNode & | operator= (WEMNode &&n) noexcept |
~WEMNode () override | |
Standard destructor. | |
void | reset () |
Resets the object to default constructed state. | |
void | clone (WEMNode *n) |
Clones given node. | |
const Vector3 & | getPosition () const |
Returns the world position. | |
void | getPosition (double &x, double &y, double &z) const |
Returns the world position. | |
void | setPosition (const Vector3 &position) |
Sets the position in world coordinates. | |
void | setPosition (double x, double y, double z) |
Sets the position in world coordinates. | |
void | translate (const Vector3 &offset) |
Translates the position by the given vector. | |
void | applyMatrix (const Matrix4 &transformMatrix) |
Multiplies the node's position with the given transformation matrix. | |
void | scale (const Vector3 &scaleFactor) |
Scales the position by given vector. | |
unsigned int | getFaceValence () const |
Returns the face valence of node. The valence denotes the number of attached faces. | |
unsigned int | getEdgeValence () const |
Returns the edge valence of node. The valence denotes the number of attached edges. | |
unsigned int | getNumFaces () const |
Returns the number of faces attached to this node. | |
unsigned int | getNumEdges () const |
Returns the number of edges attached to this node. | |
Vector4 | getColor () const |
Returns the color of the node. | |
void | setColor (const Vector4 &color) |
Sets the color of the node. | |
void | setColor (float r, float g, float b) |
Sets the RGB color of the node. | |
void | setColor (float a) |
Sets the alpha color of the node. | |
Vector3 | getNormal () const |
Returns the normal of the node. | |
void | setNormal (const Vector3 &normal) |
Sets the normal of the node. | |
void | setNormal (float x, float y, float z) |
Sets the normal of the node. | |
void | computeNormal () |
Computes the normal of the node. | |
WEMFace * | getFaceAt (unsigned int index) |
Returns the face at the given index. | |
const WEMFace * | getFaceAt (unsigned int index) const |
Returns the face at the given index. | |
WEMTriangle * | getTriangleAt (unsigned int index) |
Returns the face at the given index and casts it to WEMTriangle. | |
const WEMTriangle * | getTriangleAt (unsigned int index) const |
Returns the face at the given index and casts it to WEMTriangle. | |
WEMQuad * | getQuadAt (unsigned int index) |
Returns the face at the given index and casts it to WEMQuad. | |
const WEMQuad * | getQuadAt (unsigned int index) const |
Returns the face at the given index and casts it to WEMQuad. | |
WEMPolygon * | getPolygonAt (unsigned int index) |
Returns the face at the given index and casts it to WEMPolygon. | |
const WEMPolygon * | getPolygonAt (unsigned int index) const |
Returns the face at the given index and casts it to WEMPolygon. | |
void | addFace (WEMFace *face) |
Adds the given face. | |
void | remove (WEMFace *face) |
Removes the given face. | |
WEMEdge * | getEdgeAt (unsigned int index) |
Returns the edge at the given index. | |
const WEMEdge * | getEdgeAt (unsigned int index) const |
Returns the edge at the given index. | |
void | addEdge (WEMEdge *edge) |
Adds the edge. | |
void | remove (WEMEdge *edge) |
Removes the given edge. | |
WEMEdge * | getEdgeWith (WEMNode *node) |
Returns the edge shared with the given node. | |
const WEMEdge * | getEdgeWith (WEMNode *node) const |
Returns the edge shared with the given node. | |
bool | isBoundary () const |
Returns whether the node has any edge which is a boundary edge. | |
void | replace (WEMEdge *orig, WEMEdge *replacement) |
Replaces an edge orig in the internal edge's vector by another edge replace . | |
void | replace (WEMFace *orig, WEMFace *replacement) |
Replaces a face orig in the internal face's vector by another face replace . | |
void | removeEdges () |
Removes all edges attached to this node. | |
void | removeFaces () |
Removes all faces attached to this node. | |
double | getLargestDihedralAngle () const |
Returns the largest angle between the node normal and any incident face's normal. | |
double | getPrimitiveValue (const WEMPrimitiveValueList *valueList) const |
Returns the node value from the given primitive value list. | |
Public Member Functions inherited from ml::WEMPrimitive | |
WEMPrimitive () | |
WEMPrimitive (const WEMPrimitive &)=default | |
WEMPrimitive (WEMPrimitive &&p) noexcept | |
WEMPrimitive & | operator= (const WEMPrimitive &)=default |
WEMPrimitive & | operator= (WEMPrimitive &&p) noexcept |
virtual | ~WEMPrimitive ()=default |
Standard destructor. | |
void | resetPrimitive () |
Resets the object to its default constructed state. | |
int | getEntryNumber () const |
Returns the entry number. | |
void | setEntryNumber (int e) |
Sets the entry number. | |
bool | isSet (unsigned int bit) const |
Returns whether the bit-flag is set. | |
void | setFlag (unsigned int bit) |
Sets the given bit-flag. | |
void | unsetFlag (unsigned int bit) |
Unsets the given bit-flag. | |
void | clearFlag () |
Clears the bit-flag. | |
bool | isTraversed () const |
Returns whether this primitive has been traversed. | |
void | setTraversed (bool traversed) |
Sets the traversed flag. | |
int | getHeapPosition () const |
Returns the heap position. | |
bool | inHeap () const |
Returns whether this primitive is in the heap. | |
void | setHeapPosition (int heapPosition) |
Sets the heap position. | |
double | getHeapValue () const |
Returns the heap value. | |
void | setHeapValue (double heapValue) |
Sets the heap value. | |
Additional Inherited Members | |
Protected Attributes inherited from ml::WEMPrimitive | |
unsigned int | _bitFlag |
Bit-wise flag for custom use. | |
int | _entryNumber |
Entry number in index vector, for easy deletion and reference. | |
int | _heapPosition |
Heap position, same like entryNumber but for heaps. | |
double | _heapValue |
Element value, used for heap sorting. | |
ml::WEMNode::WEMNode | ( | ) |
Standard constructor.
|
noexcept |
|
override |
Standard destructor.
Multiplies the node's position with the given transformation matrix.
Also transforms the node's normal without translating it.
void ml::WEMNode::computeNormal | ( | ) |
Computes the normal of the node.
|
inline |
Returns the edge at the given index.
Definition at line 112 of file WEMNode.h.
References getEdgeAt().
Referenced by getEdgeAt().
Returns the edge shared with the given node.
Definition at line 120 of file WEMNode.h.
References getEdgeWith().
Referenced by getEdgeWith().
Returns the face at the given index.
Definition at line 92 of file WEMNode.h.
References getFaceAt().
Referenced by getFaceAt().
double ml::WEMNode::getLargestDihedralAngle | ( | ) | const |
Returns the largest angle between the node normal and any incident face's normal.
|
inline |
|
inline |
Returns the face at the given index and casts it to WEMPolygon.
|
inline |
Returns the face at the given index and casts it to WEMPolygon.
Definition at line 104 of file WEMNode.h.
References getPolygonAt().
Referenced by getPolygonAt().
double ml::WEMNode::getPrimitiveValue | ( | const WEMPrimitiveValueList * | valueList | ) | const |
Returns the node value from the given primitive value list.
Averages over all edges/faces when the given primitive value list is not of the node type.
Returns the face at the given index and casts it to WEMQuad.
Definition at line 100 of file WEMNode.h.
References getQuadAt().
Referenced by getQuadAt().
|
inline |
Returns the face at the given index and casts it to WEMTriangle.
|
inline |
Returns the face at the given index and casts it to WEMTriangle.
Definition at line 96 of file WEMNode.h.
References getTriangleAt().
Referenced by getTriangleAt().
|
inline |
|
inline |
|
inline |
Replaces an edge orig
in the internal edge's vector by another edge replace
.
Replaces a face orig
in the internal face's vector by another face replace
.
void ml::WEMNode::reset | ( | ) |
Resets the object to default constructed state.