MeVisLab Toolbox Reference
ml::WEMNode Class Reference

Defines the mesh component: node. More...

#include <WEMNode.h>

Inheritance diagram for ml::WEMNode:
ml::WEMPrimitive

Public Member Functions

 WEMNode ()
 Standard constructor. More...
 
 WEMNode (const WEMNode &n)
 Copy constructor. More...
 
 WEMNode (WEMNode &&n) noexcept
 
WEMNodeoperator= (WEMNode &&n) noexcept
 
 ~WEMNode () override
 Standard destructor. More...
 
void reset ()
 Resets the object to default constructed state. More...
 
void clone (WEMNode *n)
 Clones given node. More...
 
const Vector3getPosition () const
 Returns the world position. More...
 
void getPosition (double &x, double &y, double &z) const
 Returns the world position. More...
 
void setPosition (const Vector3 &position)
 Sets the position in world coordinates. More...
 
void setPosition (double x, double y, double z)
 Sets the position in world coordinates. More...
 
void translate (const Vector3 &offset)
 Translates the position by the given vector. More...
 
void applyMatrix (const Matrix4 &transformMatrix)
 Multiplies the node's position with the given transformation matrix. More...
 
void scale (const Vector3 &scaleFactor)
 Scales the position by given vector. More...
 
unsigned int getFaceValence () const
 Returns the face valence of node. The valence denotes the number of attached faces. More...
 
unsigned int getEdgeValence () const
 Returns the edge valence of node. The valence denotes the number of attached edges. More...
 
unsigned int getNumFaces () const
 Returns the number of faces attached to this node. More...
 
unsigned int getNumEdges () const
 Returns the number of edges attached to this node. More...
 
Vector4 getColor () const
 Returns the color of the node. More...
 
void setColor (const Vector4 &color)
 Sets the color of the node. More...
 
void setColor (float r, float g, float b)
 Sets the RGB color of the node. More...
 
void setColor (float a)
 Sets the alpha color of the node. More...
 
Vector3 getNormal () const
 Returns the normal of the node. More...
 
void setNormal (const Vector3 &normal)
 Sets the normal of the node. More...
 
void setNormal (float x, float y, float z)
 Sets the normal of the node. More...
 
void computeNormal ()
 Computes the normal of the node. More...
 
WEMFacegetFaceAt (unsigned int index)
 Returns the face at the given index. More...
 
const WEMFacegetFaceAt (unsigned int index) const
 Returns the face at the given index. More...
 
WEMTrianglegetTriangleAt (unsigned int index)
 Returns the face at the given index and casts it to WEMTriangle. More...
 
const WEMTrianglegetTriangleAt (unsigned int index) const
 Returns the face at the given index and casts it to WEMTriangle. More...
 
WEMQuadgetQuadAt (unsigned int index)
 Returns the face at the given index and casts it to WEMQuad. More...
 
const WEMQuadgetQuadAt (unsigned int index) const
 Returns the face at the given index and casts it to WEMQuad. More...
 
WEMPolygongetPolygonAt (unsigned int index)
 Returns the face at the given index and casts it to WEMPolygon. More...
 
const WEMPolygongetPolygonAt (unsigned int index) const
 Returns the face at the given index and casts it to WEMPolygon. More...
 
void addFace (WEMFace *face)
 Adds the given face. More...
 
void remove (WEMFace *face)
 Removes the given face. More...
 
WEMEdgegetEdgeAt (unsigned int index)
 Returns the edge at the given index. More...
 
const WEMEdgegetEdgeAt (unsigned int index) const
 Returns the edge at the given index. More...
 
void addEdge (WEMEdge *edge)
 Adds the edge. More...
 
void remove (WEMEdge *edge)
 Removes the given edge. More...
 
WEMEdgegetEdgeWith (WEMNode *node)
 Returns the edge shared with the given node. More...
 
const WEMEdgegetEdgeWith (WEMNode *node) const
 Returns the edge shared with the given node. More...
 
bool isBoundary () const
 Returns whether the node has any edge which is a boundary edge. More...
 
void replace (WEMEdge *orig, WEMEdge *replacement)
 Replaces an edge orig in the internal edge's vector by another edge replace. More...
 
void replace (WEMFace *orig, WEMFace *replacement)
 Replaces a face orig in the internal face's vector by another face replace. More...
 
void removeEdges ()
 Removes all edges attached to this node. More...
 
void removeFaces ()
 Removes all faces attached to this node. More...
 
double getLargestDihedralAngle () const
 Returns the largest angle between the node normal and any incident face's normal. More...
 
double getPrimitiveValue (const WEMPrimitiveValueList *valueList) const
 Returns the node value from the given primitive value list. More...
 
- Public Member Functions inherited from ml::WEMPrimitive
 WEMPrimitive ()
 
 WEMPrimitive (const WEMPrimitive &)=default
 
 WEMPrimitive (WEMPrimitive &&p) noexcept
 
WEMPrimitiveoperator= (const WEMPrimitive &)=default
 
WEMPrimitiveoperator= (WEMPrimitive &&p) noexcept
 
virtual ~WEMPrimitive ()=default
 Standard destructor. More...
 
void resetPrimitive ()
 Resets the object to its default constructed state. More...
 
int getEntryNumber () const
 Returns the entry number. More...
 
void setEntryNumber (int e)
 Sets the entry number. More...
 
bool isSet (unsigned int bit) const
 Returns whether the bit-flag is set. More...
 
void setFlag (unsigned int bit)
 Sets the given bit-flag. More...
 
void unsetFlag (unsigned int bit)
 Unsets the given bit-flag. More...
 
void clearFlag ()
 Clears the bit-flag. More...
 
bool isTraversed () const
 Returns whether this primitive has been traversed. More...
 
void setTraversed (bool traversed)
 Sets the traversed flag. More...
 
int getHeapPosition () const
 Returns the heap position. More...
 
bool inHeap () const
 Returns whether this primitive is in the heap. More...
 
void setHeapPosition (int heapPosition)
 Sets the heap position. More...
 
double getHeapValue () const
 Returns the heap value. More...
 
void setHeapValue (double heapValue)
 Sets the heap value. More...
 

Additional Inherited Members

- Protected Attributes inherited from ml::WEMPrimitive
unsigned int _bitFlag
 Bit-wise flag for custom use. More...
 
int _entryNumber
 Entry number in index vector, for easy deletion and reference. More...
 
int _heapPosition
 Heap position, same like entryNumber but for heaps. More...
 
double _heapValue
 Element value, used for heap sorting. More...
 

Detailed Description

Defines the mesh component: node.

Definition at line 32 of file WEMNode.h.

Constructor & Destructor Documentation

◆ WEMNode() [1/3]

ml::WEMNode::WEMNode ( )

Standard constructor.

◆ WEMNode() [2/3]

ml::WEMNode::WEMNode ( const WEMNode n)

Copy constructor.

◆ WEMNode() [3/3]

ml::WEMNode::WEMNode ( WEMNode &&  n)
noexcept

◆ ~WEMNode()

ml::WEMNode::~WEMNode ( )
override

Standard destructor.

Member Function Documentation

◆ addEdge()

void ml::WEMNode::addEdge ( WEMEdge edge)
inline

Adds the edge.

Definition at line 129 of file WEMNode.h.

◆ addFace()

void ml::WEMNode::addFace ( WEMFace face)
inline

Adds the given face.

Definition at line 121 of file WEMNode.h.

◆ applyMatrix()

void ml::WEMNode::applyMatrix ( const Matrix4 transformMatrix)

Multiplies the node's position with the given transformation matrix.

Also transforms the node's normal without translating it.

◆ clone()

void ml::WEMNode::clone ( WEMNode n)

Clones given node.

◆ computeNormal()

void ml::WEMNode::computeNormal ( )

Computes the normal of the node.

◆ getColor()

Vector4 ml::WEMNode::getColor ( ) const
inline

Returns the color of the node.

Definition at line 89 of file WEMNode.h.

◆ getEdgeAt() [1/2]

WEMEdge* ml::WEMNode::getEdgeAt ( unsigned int  index)
inline

Returns the edge at the given index.

Definition at line 125 of file WEMNode.h.

◆ getEdgeAt() [2/2]

const WEMEdge* ml::WEMNode::getEdgeAt ( unsigned int  index) const
inline

Returns the edge at the given index.

Definition at line 127 of file WEMNode.h.

References getEdgeAt().

Referenced by getEdgeAt().

◆ getEdgeValence()

unsigned int ml::WEMNode::getEdgeValence ( ) const
inline

Returns the edge valence of node. The valence denotes the number of attached edges.

Definition at line 83 of file WEMNode.h.

◆ getEdgeWith() [1/2]

WEMEdge* ml::WEMNode::getEdgeWith ( WEMNode node)

Returns the edge shared with the given node.

◆ getEdgeWith() [2/2]

const WEMEdge* ml::WEMNode::getEdgeWith ( WEMNode node) const
inline

Returns the edge shared with the given node.

Definition at line 135 of file WEMNode.h.

References getEdgeWith().

Referenced by getEdgeWith().

◆ getFaceAt() [1/2]

WEMFace* ml::WEMNode::getFaceAt ( unsigned int  index)
inline

Returns the face at the given index.

Definition at line 105 of file WEMNode.h.

◆ getFaceAt() [2/2]

const WEMFace* ml::WEMNode::getFaceAt ( unsigned int  index) const
inline

Returns the face at the given index.

Definition at line 107 of file WEMNode.h.

References getFaceAt().

Referenced by getFaceAt().

◆ getFaceValence()

unsigned int ml::WEMNode::getFaceValence ( ) const
inline

Returns the face valence of node. The valence denotes the number of attached faces.

Definition at line 81 of file WEMNode.h.

◆ getLargestDihedralAngle()

double ml::WEMNode::getLargestDihedralAngle ( ) const

Returns the largest angle between the node normal and any incident face's normal.

◆ getNormal()

Vector3 ml::WEMNode::getNormal ( ) const
inline

Returns the normal of the node.

Definition at line 97 of file WEMNode.h.

◆ getNumEdges()

unsigned int ml::WEMNode::getNumEdges ( ) const
inline

Returns the number of edges attached to this node.

Definition at line 87 of file WEMNode.h.

◆ getNumFaces()

unsigned int ml::WEMNode::getNumFaces ( ) const
inline

Returns the number of faces attached to this node.

Definition at line 85 of file WEMNode.h.

◆ getPolygonAt() [1/2]

WEMPolygon* ml::WEMNode::getPolygonAt ( unsigned int  index)
inline

Returns the face at the given index and casts it to WEMPolygon.

Definition at line 117 of file WEMNode.h.

◆ getPolygonAt() [2/2]

const WEMPolygon* ml::WEMNode::getPolygonAt ( unsigned int  index) const
inline

Returns the face at the given index and casts it to WEMPolygon.

Definition at line 119 of file WEMNode.h.

References getPolygonAt().

Referenced by getPolygonAt().

◆ getPosition() [1/2]

const Vector3& ml::WEMNode::getPosition ( ) const
inline

Returns the world position.

Definition at line 50 of file WEMNode.h.

◆ getPosition() [2/2]

void ml::WEMNode::getPosition ( double &  x,
double &  y,
double &  z 
) const
inline

Returns the world position.

Definition at line 52 of file WEMNode.h.

◆ getPrimitiveValue()

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.

◆ getQuadAt() [1/2]

WEMQuad* ml::WEMNode::getQuadAt ( unsigned int  index)
inline

Returns the face at the given index and casts it to WEMQuad.

Definition at line 113 of file WEMNode.h.

◆ getQuadAt() [2/2]

const WEMQuad* ml::WEMNode::getQuadAt ( unsigned int  index) const
inline

Returns the face at the given index and casts it to WEMQuad.

Definition at line 115 of file WEMNode.h.

References getQuadAt().

Referenced by getQuadAt().

◆ getTriangleAt() [1/2]

WEMTriangle* ml::WEMNode::getTriangleAt ( unsigned int  index)
inline

Returns the face at the given index and casts it to WEMTriangle.

Definition at line 109 of file WEMNode.h.

◆ getTriangleAt() [2/2]

const WEMTriangle* ml::WEMNode::getTriangleAt ( unsigned int  index) const
inline

Returns the face at the given index and casts it to WEMTriangle.

Definition at line 111 of file WEMNode.h.

References getTriangleAt().

Referenced by getTriangleAt().

◆ isBoundary()

bool ml::WEMNode::isBoundary ( ) const
inline

Returns whether the node has any edge which is a boundary edge.

Definition at line 137 of file WEMNode.h.

◆ operator=()

WEMNode& ml::WEMNode::operator= ( WEMNode &&  n)
noexcept

◆ remove() [1/2]

void ml::WEMNode::remove ( WEMEdge edge)

Removes the given edge.

◆ remove() [2/2]

void ml::WEMNode::remove ( WEMFace face)

Removes the given face.

◆ removeEdges()

void ml::WEMNode::removeEdges ( )
inline

Removes all edges attached to this node.

Definition at line 143 of file WEMNode.h.

◆ removeFaces()

void ml::WEMNode::removeFaces ( )
inline

Removes all faces attached to this node.

Definition at line 145 of file WEMNode.h.

◆ replace() [1/2]

void ml::WEMNode::replace ( WEMEdge orig,
WEMEdge replacement 
)

Replaces an edge orig in the internal edge's vector by another edge replace.

◆ replace() [2/2]

void ml::WEMNode::replace ( WEMFace orig,
WEMFace replacement 
)

Replaces a face orig in the internal face's vector by another face replace.

◆ reset()

void ml::WEMNode::reset ( )

Resets the object to default constructed state.

◆ scale()

void ml::WEMNode::scale ( const Vector3 scaleFactor)
inline

Scales the position by given vector.

Definition at line 79 of file WEMNode.h.

◆ setColor() [1/3]

void ml::WEMNode::setColor ( const Vector4 color)
inline

Sets the color of the node.

Definition at line 91 of file WEMNode.h.

◆ setColor() [2/3]

void ml::WEMNode::setColor ( float  a)
inline

Sets the alpha color of the node.

Definition at line 95 of file WEMNode.h.

◆ setColor() [3/3]

void ml::WEMNode::setColor ( float  r,
float  g,
float  b 
)
inline

Sets the RGB color of the node.

Definition at line 93 of file WEMNode.h.

◆ setNormal() [1/2]

void ml::WEMNode::setNormal ( const Vector3 normal)
inline

Sets the normal of the node.

Definition at line 99 of file WEMNode.h.

◆ setNormal() [2/2]

void ml::WEMNode::setNormal ( float  x,
float  y,
float  z 
)
inline

Sets the normal of the node.

Definition at line 101 of file WEMNode.h.

◆ setPosition() [1/2]

void ml::WEMNode::setPosition ( const Vector3 position)
inline

Sets the position in world coordinates.

Definition at line 70 of file WEMNode.h.

◆ setPosition() [2/2]

void ml::WEMNode::setPosition ( double  x,
double  y,
double  z 
)
inline

Sets the position in world coordinates.

Definition at line 72 of file WEMNode.h.

◆ translate()

void ml::WEMNode::translate ( const Vector3 offset)
inline

Translates the position by the given vector.

Definition at line 74 of file WEMNode.h.


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