MeshCore::MeshPoint Class Reference

The MeshPoint class represents a point in the mesh data structure. More...

#include <Elements.h>

Public Types

enum  TFlagType {
  INVALID =1 , VISIT =2 , SEGMENT =4 , MARKED =8 ,
  SELECTED =16 , REV =32 , TMP0 =64 , TMP1 =128
}
 
- Public Types inherited from Base::Vector3< float >
typedef float num_type
 
typedef float_traits< num_typetraits_type
 

Public Member Functions

Construction
 MeshPoint ()
 
 MeshPoint (float x, float y, float z)
 
 MeshPoint (const Base::Vector3f &rclPt)
 
 MeshPoint (const MeshPoint &rclPt)
 
 ~MeshPoint ()
 
Flag state
Note
All flag methods are const as they do NOT change the actual behaviour of the object
void SetFlag (TFlagType tF) const
 
void ResetFlag (TFlagType tF) const
 
bool IsFlag (TFlagType tF) const
 
void ResetInvalid () const
 
void SetInvalid () const
 
bool IsValid () const
 
void SetProperty (unsigned long uP) const
 
MeshPointoperator= (const MeshPoint &rclPt)
 
bool operator== (const MeshPoint &rclPt) const
 
bool operator== (const Base::Vector3f &rclV) const
 
bool operator< (const MeshPoint &rclPt) const
 
- Public Member Functions inherited from Base::Vector3< float >
float & operator[] (unsigned short usIndex)
 Returns a reference to a coordinate. usIndex must be in the range [0,2]. More...
 
const float & operator[] (unsigned short usIndex) const
 Returns a const reference to a coordinate. usIndex must be in the range [0,2]. More...
 
Vector3 operator+ (const Vector3< float > &rcVct) const
 Vector addition. More...
 
Vector3 operator& (const Vector3< float > &rcVct) const
 
Vector3 operator- (const Vector3< float > &rcVct) const
 Vector subtraction. More...
 
Vector3 operator- () const
 Negative vector. More...
 
Vector3operator+= (const Vector3< float > &rcVct)
 Vector summation. More...
 
Vector3operator-= (const Vector3< float > &rcVct)
 Vector subtraction. More...
 
Vector3 operator* (float fScale) const
 Vector scaling. More...
 
float operator* (const Vector3< float > &rcVct) const
 Scalar product. More...
 
Vector3 operator/ (float fDiv) const
 
Vector3operator*= (float fScale)
 
Vector3operator/= (float fDiv)
 
Vector3operator= (const Vector3< float > &v)=default
 Assignment. More...
 
Vector3operator= (Vector3< float > &&v)=default
 
float Dot (const Vector3< float > &rcVct) const
 Scalar product. More...
 
Vector3 operator% (const Vector3< float > &rcVct) const
 Cross product. More...
 
Vector3 Cross (const Vector3< float > &rcVct) const
 Cross product. More...
 
bool operator!= (const Vector3< float > &rcVct) const
 Comparing for inequality. More...
 
bool operator== (const Vector3< float > &rcVct) const
 Comparing for equality. More...
 
bool IsOnLineSegment (const Vector3< float > &startVct, const Vector3< float > &endVct) const
 Check if Vector is on a line segment. More...
 
void ScaleX (float f)
 
void ScaleY (float f)
 
void ScaleZ (float f)
 
void Scale (float fX, float fY, float fZ)
 
void MoveX (float f)
 
void MoveY (float f)
 
void MoveZ (float f)
 
void Move (float fX, float fY, float fZ)
 
void RotateX (float f)
 
void RotateY (float f)
 
void RotateZ (float f)
 
void Set (float fX, float fY, float fZ)
 
float Length () const
 Length of the vector. More...
 
float Sqr () const
 Squared length of the vector. More...
 
Vector3Normalize ()
 Set length to 1. More...
 
bool IsNull () const
 Checks whether this is the null vector. More...
 
float GetAngle (const Vector3 &rcVect) const
 Get angle between both vectors. The returned value lies in the interval [0,pi]. More...
 
void TransformToCoordinateSystem (const Vector3 &rclBase, const Vector3 &rclDirX, const Vector3 &rclDirY)
 Transforms this point to the coordinate system defined by origin rclBase, vector vector rclDirX and vector vector rclDirY. More...
 
bool IsEqual (const Vector3 &rclPnt, float tol) const
 IsEqual. More...
 
Vector3ProjectToPlane (const Vector3 &rclBase, const Vector3 &rclNorm)
 Projects this point onto the plane given by the base rclBase and the normal rclNorm. More...
 
void ProjectToPlane (const Vector3 &rclBase, const Vector3 &rclNorm, Vector3 &rclProj) const
 Projects this point onto the plane given by the base rclBase and the normal rclNorm and stores the result in rclProj. More...
 
Vector3ProjectToLine (const Vector3 &rclPoint, const Vector3 &rclLine)
 Projects this point onto the line given by the base rclPoint and the direction rclLine. More...
 
Vector3 Perpendicular (const Vector3 &rclBase, const Vector3 &rclDir) const
 Get the perpendicular of this point to the line defined by rclBase and rclDir. More...
 
float DistanceToPlane (const Vector3 &rclBase, const Vector3 &rclNorm) const
 Computes the distance to the given plane. More...
 
float DistanceToLine (const Vector3 &rclBase, const Vector3 &rclDirect) const
 Computes the distance from this point to the line given by rclBase and rclDirect. More...
 
Vector3 DistanceToLineSegment (const Vector3 &rclP1, const Vector3 &rclP2) const
 Computes the vector from this point to the point on the line segment with the shortest distance. More...
 
 Vector3 (float fx=0.0, float fy=0.0, float fz=0.0)
 Construction. More...
 
 Vector3 (const Vector3< float > &v)=default
 
 Vector3 (Vector3< float > &&v)=default
 
 ~Vector3 ()=default
 

Additional Inherited Members

- Static Public Member Functions inherited from Base::Vector3< float >
static num_type epsilon ()
 
- Public Attributes inherited from Base::Vector3< float >
float x
 x-coordinate More...
 
float y
 y-coordinate More...
 
float z
 z-coordinate More...
 

Detailed Description

The MeshPoint class represents a point in the mesh data structure.

The class inherits from Vector3f and provides some additional information such as flag state and property value. The flags can be modified by the Set() and Reset() and queried by IsFlag(). A point can temporary be in an invalid state (e.g during deletion of several points), but must not be set in general, i.e. always usable within a mesh-internal algorithm.

Note: The status flag SEGMENT mark a point to be part of certain subset, a segment. This flag must not be set by any algorithm unless it adds or removes points to a segment.

Note: The status flag SELECTED mark a point to be selected which is e.g. used in the GUI. This flag must not be set by any algorithm unless it adds or removes points to the selection.

Member Enumeration Documentation

◆ TFlagType

Enumerator
INVALID 
VISIT 
SEGMENT 
MARKED 
SELECTED 
REV 
TMP0 
TMP1 

Constructor & Destructor Documentation

◆ MeshPoint() [1/4]

MeshCore::MeshPoint::MeshPoint ( )

◆ MeshPoint() [2/4]

MeshCore::MeshPoint::MeshPoint ( float  x,
float  y,
float  z 
)

◆ MeshPoint() [3/4]

MeshCore::MeshPoint::MeshPoint ( const Base::Vector3f rclPt)

◆ MeshPoint() [4/4]

MeshCore::MeshPoint::MeshPoint ( const MeshPoint rclPt)

◆ ~MeshPoint()

MeshCore::MeshPoint::~MeshPoint ( )

Member Function Documentation

◆ IsFlag()

bool MeshCore::MeshPoint::IsFlag ( TFlagType  tF) const

◆ IsValid()

bool MeshCore::MeshPoint::IsValid ( ) const

◆ operator<()

bool MeshCore::MeshPoint::operator< ( const MeshPoint rclPt) const

◆ operator=()

MeshPoint & MeshCore::MeshPoint::operator= ( const MeshPoint rclPt)

◆ operator==() [1/2]

bool MeshCore::MeshPoint::operator== ( const Base::Vector3f rclV) const

References Base::DistanceP2().

◆ operator==() [2/2]

bool MeshCore::MeshPoint::operator== ( const MeshPoint rclPt) const

References Base::DistanceP2().

◆ ResetFlag()

void MeshCore::MeshPoint::ResetFlag ( TFlagType  tF) const

◆ ResetInvalid()

void MeshCore::MeshPoint::ResetInvalid ( ) const

◆ SetFlag()

void MeshCore::MeshPoint::SetFlag ( TFlagType  tF) const

◆ SetInvalid()

void MeshCore::MeshPoint::SetInvalid ( ) const

◆ SetProperty()

void MeshCore::MeshPoint::SetProperty ( unsigned long  uP) const

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