mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Improved EarClipTesselator.
More resillient against zero area ears. Less prone to make invalid traingles due to vertices touching edge but might fail to produce triangles at all in that case.
This commit is contained in:
@@ -209,9 +209,16 @@ public:
|
||||
virtual bool calculateTriangles( std::vector<size_t>* triangles );
|
||||
|
||||
protected:
|
||||
bool isTriangleValid( std::list<size_t>::const_iterator u,
|
||||
std::list<size_t>::const_iterator v,
|
||||
std::list<size_t>::const_iterator w ) const;
|
||||
enum TriangleStatus
|
||||
{
|
||||
INVALID_TRIANGLE,
|
||||
NEAR_ZERO_AREA_TRIANGLE,
|
||||
VALID_TRIANGLE
|
||||
};
|
||||
TriangleStatus calculateTriangleStatus( std::list<size_t>::const_iterator u,
|
||||
std::list<size_t>::const_iterator v,
|
||||
std::list<size_t>::const_iterator w ) const;
|
||||
|
||||
bool isPointInsideTriangle( const cvf::Vec3d& A, const cvf::Vec3d& B, const cvf::Vec3d& C, const cvf::Vec3d& P ) const;
|
||||
double calculateProjectedPolygonArea() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user