Merge branch 'master' of github.com:FreeCAD/FreeCAD

This commit is contained in:
Yorik van Havre
2018-07-25 12:56:20 -03:00
13 changed files with 199 additions and 65 deletions

View File

@@ -90,6 +90,12 @@ MeshPointArray& MeshPointArray::operator = (const MeshPointArray &rclPAry)
return *this;
}
void MeshPointArray::Transform(const Base::Matrix4D& mat)
{
for (_TIterator pP = begin(); pP != end(); ++pP)
mat.multVec(*pP,*pP);
}
void MeshFacetArray::Erase (_TIterator pIter)
{
unsigned long i, *pulN;

View File

@@ -33,6 +33,7 @@
#include <Base/BoundBox.h>
#include <Base/Vector3D.h>
#include <Base/Matrix.h>
// Cannot use namespace Base in constructors of MeshPoint
#ifdef _MSC_VER
@@ -99,6 +100,7 @@ public:
/** @name Construction */
//@{
MeshPoint (void) : _ucFlag(0), _ulProp(0) { }
inline MeshPoint (float x, float y, float z);
inline MeshPoint (const Base::Vector3f &rclPt);
inline MeshPoint (const MeshPoint &rclPt);
~MeshPoint (void) { }
@@ -523,6 +525,7 @@ public:
// Assignment
MeshPointArray& operator = (const MeshPointArray &rclPAry);
void Transform(const Base::Matrix4D&);
/**
* Searches for the first point index Two points are equal if the distance is less
* than EPSILON. If no such points is found ULONG_MAX is returned.
@@ -643,6 +646,17 @@ private:
MeshFacetArray& rFacets;
};
inline MeshPoint::MeshPoint (float x, float y, float z)
#ifdef _MSC_VER
: Vector3f(x, y, z),
#else
: Base::Vector3f(x, y, z),
#endif
_ucFlag(0),
_ulProp(0)
{
}
inline MeshPoint::MeshPoint (const Base::Vector3f &rclPt)
#ifdef _MSC_VER
: Vector3f(rclPt),