FreeCAD C++
|
#include <Mod/Mesh/App/Core/Elements.h>
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.
Public Member Functions | |
Construction | |
MeshPoint (void) | |
MeshPoint (float x, float y, float z) | |
MeshPoint (const Base::Vector3f &rclPt) | |
MeshPoint (const MeshPoint &rclPt) | |
~MeshPoint (void) | |
Flag state | |
| |
void | SetFlag (TFlagType tF) const |
void | ResetFlag (TFlagType tF) const |
bool | IsFlag (TFlagType tF) const |
void | ResetInvalid (void) const |
void | SetInvalid (void) const |
bool | IsValid (void) const |
void | SetProperty (unsigned long uP) const |
![]() | |
Vector3 (float fx=0.0f, float fy=0.0f, float fz=0.0f) | |
Construction. | |
Vector3 (const Vector3< float > &rcVct) | |
Construction. | |
float & | operator [] (unsigned short usIndex) |
Returns a reference to a coordinate. usIndex must be in the range [0,2]. | |
const float & | operator [] (unsigned short usIndex) const |
Returns a const reference to a coordinate. usIndex must be in the range [0,2]. | |
Vector3 | operator+ (const Vector3< float > &rcVct) const |
Vector addition. | |
Vector3 | operator & (const Vector3< float > &rcVct) const |
Vector3 | operator - (const Vector3< float > &rcVct) const |
Vector subtraction. | |
Vector3 | operator - (void) const |
Negative vector. | |
Vector3 & | operator+= (const Vector3< float > &rcVct) |
Vector summation. | |
Vector3 & | operator -= (const Vector3< float > &rcVct) |
Vector subtraction. | |
Vector3 | operator * (float fScale) const |
Vector scaling. | |
float | operator * (const Vector3< float > &rcVct) const |
Scalar product. | |
Vector3 | operator/ (float fDiv) const |
Vector3 & | operator *= (float fScale) |
Vector3 & | operator/= (float fDiv) |
Vector3 & | operator= (const Vector3< float > &rcVct) |
Assignment. | |
float | Dot (const Vector3< float > &rcVct) const |
Scalar product. | |
Vector3 | operator % (const Vector3< float > &rcVct) const |
Cross product. | |
Vector3 | Cross (const Vector3< float > &rcVct) const |
Cross product. | |
bool | operator != (const Vector3< float > &rcVct) const |
Comparing for inequality. | |
bool | operator== (const Vector3< float > &rcVct) const |
Comparing for equality. | |
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) |
float | Length (void) const |
Length of the vector. | |
float | Sqr (void) const |
Squared length of the vector. | |
Vector3 & | Normalize (void) |
Set length to 1. | |
float | GetAngle (const Vector3 &rcVect) const |
Get angle between both vectors. The returned value lies in the interval [0,pi]. | |
void | TransformToCoordinateSystem (const Vector3 &rclBase, const Vector3 &rclDirX, const Vector3 &rclDirY) |
bool | IsEqual (const Vector3 &rclPnt, float tol) const |
IsEqual. More... | |
Vector3 & | ProjectToPlane (const Vector3 &rclBase, const Vector3 &rclNorm) |
Projects this point onto the plane given by the base rclBase and the normal rclNorm. | |
void | ProjectToPlane (const Vector3 &rclBase, const Vector3 &rclNorm, Vector3 &rclProj) const |
Vector3 & | ProjectToLine (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 |
float | DistanceToPlane (const Vector3 &rclBase, const Vector3 &rclNorm) const |
float | DistanceToLine (const Vector3 &rclBase, const Vector3 &rclDirect) const |
Computes the distance from this point to the line given by rclBase and rclDirect. | |
Vector3 | DistanceToLineSegment (const Vector3 &rclP1, const Vector3 &rclP2) const |
Public Attributes | |
unsigned char | _ucFlag |
unsigned long | _ulProp |
![]() | |
float | x |
float | y |
float | z |
unsigned char MeshCore::MeshPoint::_ucFlag |
Flag member
unsigned long MeshCore::MeshPoint::_ulProp |
Free usable property