Fade2.5D Documentation pages v1.85
Delaunay Features
IsoContours Class Reference

IsoContours uses a fast datastructure to compute intersections of horizontal planes with a given list of triangles. More...

#include <IsoContours.h>

Public Member Functions

 IsoContours (std::vector< Triangle2 * > &vTriangles)
 IsoContours (std::vector< Point2 > &vCorners, const Vector2 &dirVec)
double getMinHeight ()
double getMaxHeight ()
bool getContours (double height, std::vector< std::vector< Segment2 > > &vvContours, bool bVerbose, bool bAutoPerturbate=true)
void getProfile (const Point2 &p, std::vector< Segment2 > &vSegmentsOut)

Protected Attributes

std::vector< Triangle2 * > vTriangles

Detailed Description

IsoContours uses a fast datastructure to compute intersections of horizontal planes with a given list of triangles.

See also

Constructor & Destructor Documentation

◆ IsoContours()

IsoContours::IsoContours ( std::vector< Point2 > &  vCorners,
const Vector2 dirVec 

Experimental feature

IsoContours can be used to create profiles (slices).

vCornerscontains 3*n points to specify n triangles, i.e. it is a corners-list where 3 subsequent points define a triangle.
dirVecspecifies the slice direction to compute profiles

Member Function Documentation

◆ getContours()

bool IsoContours::getContours ( double  height,
std::vector< std::vector< Segment2 > > &  vvContours,
bool  bVerbose,
bool  bAutoPerturbate = true 

Get Contours

Computes the intersection of a horizontal plane at a certain height with all triangles and returns a vector of assembled polygons and polylines. The method works only for height values that do not occur as heights of any of the vertices. It returns false in such as case except bAutoPerturbate=true. In this case a tiny offset is automatically added to height.

Polylines that end in the middle of a terrain can not exist and if you see such lines in the output then these are not only individual line segments but extremely narrow polygons - enforced by your geometric setting. You can numerically inspect those lines to verify that.

◆ getMaxHeight()

double IsoContours::getMaxHeight ( )

The the maximum height

Returns the largest z-coordinate

◆ getMinHeight()

double IsoContours::getMinHeight ( )

Get the minimum height

Returns the smallest z coordinate

◆ getProfile()

void IsoContours::getProfile ( const Point2 p,
std::vector< Segment2 > &  vSegmentsOut 

Get Profile

This is a new method to compute profiles i.e., to produce slices orthogonal to a direction specified in the constructor IsoContours(std::vector<Point2>& vCorners,const Vector2& dirVec)

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