Fade2D Documentation pages v2.16.7
Delaunay Features
GEOM_FADE2D::Zone2 Class Reference

Represents a defined area within a triangulation. More...

#include <Zone2.h>

Public Member Functions

Zone2convertToBoundedZone ()
 Convert a zone to a bounded zone. More...
 
Zone2createOffsetZone (Fade_2D *pFade, double offset, double mergeAngleDeg=10, double angleStep=20.0) const
 Creates an offset zone. More...
 
void exportZone (FadeExport &fadeExport, bool bWithCustomIndices) const
 Export triangles from a zone. More...
 
double getArea2D () const
 Get 2D Area. More...
 
void getBorderEdges (std::vector< Edge2 > &vBorderEdgesOut) const
 Get border edges. More...
 
void getBoundarySegments (std::vector< Segment2 > &vSegments) const
 Get the boundaries as segments. More...
 
Bbox2 getBoundingBox () const
 Compute the bounding box.
 
void getComponentPolygons (std::vector< CompPolygon > &vCompPolygons) const
 Get connected components. More...
 
ConstraintGraph2getConstraintGraph () const
 Get the associated constraint. More...
 
void getConstraintGraphs (std::vector< ConstraintGraph2 * > &vConstraintGraphs_) const
 Get the associated constraint graphs.
 
double getMedianEdgeLength2D ()
 Get the median 2D edge length. More...
 
ConstraintSegment2getNearbyBoundaryConstraint (Point2 &p, double tolerance)
 Locates the nearest boundary ConstraintSegment2 of the Zone2. More...
 
size_t getNumberOfTriangles () const
 Get the number of triangles. More...
 
void getOffsetBoundary (double offset, std::vector< Segment2 > &vOffsetBoundary, double mergeAngleDeg=10.0, double angleStepDeg=20.0) const
 Get the offset boundary of a shape. More...
 
void getTriangles (std::vector< Triangle2 * > &vTriangles) const
 Get the triangles of the zone. More...
 
void getVertices (std::vector< Point2 * > &vVertices_) const
 Get the vertices of the zone.
 
ZoneLocation getZoneLocation () const
 Get the zone location. More...
 
bool hasOn (const Point2 &p)
 Checks if a point lies on the zone. More...
 
bool hasOnBoundary (const Point2 &p)
 Checks if a point lies on the boundary of the zone. More...
 
Triangle2locate (const Point2 &p)
 Locates the triangle containing the given point within the zone. More...
 
Zone2morphClose (Fade_2D *pFade, double offset, double mergeAngleDeg=10.0, double angleStep=20.0) const
 Morphological closing to bridge small gaps in the Zone2. More...
 
Zone2morphOpen (Fade_2D *pFade, double offset, double mergeAngleDeg=10.0, double angleStep=20.0) const
 Morphological opening to remove small details. More...
 
size_t numberOfConstraintGraphs () const
 Get the number of ConstraintGraph2 objects. More...
 
bool save (const char *filename)
 Save the zone. More...
 
bool save (std::ostream &stream)
 Save the zone. More...
 
bool shiftToZone (const Point2 &q, double tolerance, Point2 &result)
 Finds a point close to the query that lies inside the zone. More...
 
void show (const char *filename, bool bShowFull, bool bWithConstraints) const
 Postscript- and PDF-visualization. More...
 
void show (Visualizer2 *pVisualizer, bool bShowFull, bool bWithConstraints) const
 Postscript- and PDF-visualization. More...
 
void showVtk (const char *filename, VtkColor zoneColor, VtkColor nonZoneColor=VTK_TRANSPARENT, VtkColor constraintColor=VTK_TRANSPARENT) const
 VTK visualization. More...
 
void showVtk (VtkWriter *pVtk, VtkColor zoneColor, VtkColor nonZoneColor=VTK_TRANSPARENT, VtkColor constraintColor=VTK_TRANSPARENT) const
 VTK visualization. More...
 
void statistics (const char *s) const
 Prints statistics. More...
 
void subscribe (MsgType msgType, MsgBase *pMsg)
 Registers a message receiver. More...
 
void unifyGrid (double tolerance)
 Unify Grid. More...
 
void unsubscribe (MsgType msgType, MsgBase *pMsg)
 Unregisters a message receiver. More...
 
void writeObj (const char *filename) const
 Write the Zone2 to an .obj file. More...
 

Protected Member Functions

Zone2operator= (const Zone2 &)
 

Friends

CLASS_DECLSPEC friend Zone2peelOffIf (Zone2 *pZone, bool bAvoidSplit, PeelPredicateTS *pPredicate)
 Peel off undesired border triangles. More...
 
CLASS_DECLSPEC friend Zone2peelOffIf (Zone2 *pZone, UserPredicateT *pPredicate, bool bVerbose)
 Peel off undesired border triangles (deprecated) More...
 
CLASS_DECLSPEC friend Zone2zoneDifference (Zone2 *pZone0, Zone2 *pZone1)
 Computes the difference between two Zone2 objects. More...
 
CLASS_DECLSPEC friend Zone2zoneIntersection (Zone2 *pZone0, Zone2 *pZone1)
 Computes the intersection of two Zone2 objects. More...
 
CLASS_DECLSPEC friend Zone2zoneSymmetricDifference (Zone2 *pZone0, Zone2 *pZone1)
 Computes the symmetric difference between two Zone2 objects. More...
 
CLASS_DECLSPEC friend Zone2zoneUnion (Zone2 *pZone0, Zone2 *pZone1)
 Computes the union of two Zone2 objects. More...
 

Detailed Description

A Zone2 object represents a defined area within a triangulation.

A Zone2 is a defined area within a triangulation
See also
http://www.geom.at/example4-zones-defined-areas-in-triangulations/ for examples of how to create and use Zone2 objects.
http://www.geom.at/boolean-operations/ for a demonstration of boolean operations on zones.

Member Function Documentation

◆ convertToBoundedZone()

Zone2* GEOM_FADE2D::Zone2::convertToBoundedZone ( )

This method creates a bounded zone from a possibly unbounded one.

Algorithms like refine() and refineAdvanced() require a Zone2 object as input that is bounded by constraint edges. This is always the case for zones with zoneLocation ZL_INSIDE, but other types of zones may be unbounded.

Returns
A pointer to a new Zone2 object with zoneLocation ZL_RESULT_BOUNDED or a pointer to the present Zone2 if this->getZoneLocation() returns ZL_INSIDE.

◆ createOffsetZone()

Zone2* GEOM_FADE2D::Zone2::createOffsetZone ( Fade_2D pFade,
double  offset,
double  mergeAngleDeg = 10,
double  angleStep = 20.0 
) const

Creates a positive or negative offset zone based on the current Zone2 and stores the result in a new Fade_2D object.

A Zone2 and a positive offset of it
Parameters
[in]pFadeAn empty Fade_2D object where the result zone will be created.
[in]offsetThe positive or negative offset distance.
[in]mergeAngleDegis used as an angle threshold (in degrees) to merge small circular arcs in the offset shape into a single point. Default: 10.0, valid range: (>0,...,135)
[in]angleStepSpecifies the angle interval (in degrees) at which circular arcs in the offset shape are sampled using line segments. Default: 20.0, valid range: (>0,...,135)
Returns
A pointer to a new Zone2 object, created within pFade or NULL if the result is empty, which may be the case if a large negative offset value is used. Be sure to check this case before proceeding.

◆ exportZone()

void GEOM_FADE2D::Zone2::exportZone ( FadeExport fadeExport,
bool  bWithCustomIndices 
) const

Exports the Zone2 to a FadeExport struct.

Parameters
fadeExportis a simple struct that will be filled with data
bWithCustomIndicesdetermines whether the custom indices of the points are also stored
See also
https://www.geom.at/triangulation-export/ This article explains the FadeExport struct in detail.

◆ getArea2D()

double GEOM_FADE2D::Zone2::getArea2D ( ) const

This method computes and returns the 2D area of the Zone2.

Returns
The 2D area of the Zone2.

◆ getBorderEdges()

void GEOM_FADE2D::Zone2::getBorderEdges ( std::vector< Edge2 > &  vBorderEdgesOut) const

Returns the boundaries of the Zone2.

Parameters
[out]vBorderEdgesOutA vector of Edge2 objects that will hold the counterclockwise oriented border edges of the Zone2 in arbitrary order.

◆ getBoundarySegments()

void GEOM_FADE2D::Zone2::getBoundarySegments ( std::vector< Segment2 > &  vSegments) const

Returns the boundaries of the Zone2 as Segment2 objects.

Parameters
[out]vSegmentsA vector of Segment2 objects that will hold the counterclockwise oriented border segments of the Zone2 in arbitrary order.

◆ getComponentPolygons()

void GEOM_FADE2D::Zone2::getComponentPolygons ( std::vector< CompPolygon > &  vCompPolygons) const

This method finds connected components of the Zone2. For each connected component, it returns a CompPolygon struct consisting of Triangle2 pointers of that component, the outer boundary polygon, and any hole polygons within the component, represented as Edge2 vectors.

Parameters
[out]vCompPolygonsA vector that will hold the CompPolygon structs for each connected component.
Note
Edge2 objects consist of a Triangle2 and an index, and are always oriented counterclockwise around the associated Triangle2. As a result, the outer boundary polygon of a component is always oriented counterclockwise, while the hole polygons are oriented clockwise.

◆ getConstraintGraph()

ConstraintGraph2* GEOM_FADE2D::Zone2::getConstraintGraph ( ) const

Retrieves the associated ConstraintGraph2, if any.

Returns
A pointer to the ConstraintGraph2 object defining the Zone2, or NULL if no ConstraintGraph2 is associated.

◆ getMedianEdgeLength2D()

double GEOM_FADE2D::Zone2::getMedianEdgeLength2D ( )

Computes the median edge length of all edges in the current zone in 2D.

Returns
The median 2D edge length of all edges in the zone.

◆ getNearbyBoundaryConstraint()

ConstraintSegment2* GEOM_FADE2D::Zone2::getNearbyBoundaryConstraint ( Point2 p,
double  tolerance 
)

This method locates the nearest ConstraintSegment2 on the boundary of the current Zone2 within the specified distance, but only if the point p has an orthogonal projection onto this ConstraintSegment2.

The red query point has an orthogonal projection onto the boundary, while the blue one does not.
Parameters
pThe point from which the search is initiated.
toleranceThe maximum allowed 2D distance between the point p and the ConstraintSegment2.
Returns
A pointer to the closest alive ConstraintSegment2 within the tolerance distance, where p has an orthogonal projection, or NULL if no such ConstraintSegment2 is found.
Note
The first call to any of the following methods initializes a search structure. For zones not of type ZL_INSIDE, ZL_BOUNDED, or ZL_GLOBAL, constraint edges are inserted around the zone.

◆ getNumberOfTriangles()

size_t GEOM_FADE2D::Zone2::getNumberOfTriangles ( ) const

This method computes and returns the number of triangles in the Zone2.

Returns
The number of triangles.

◆ getOffsetBoundary()

void GEOM_FADE2D::Zone2::getOffsetBoundary ( double  offset,
std::vector< Segment2 > &  vOffsetBoundary,
double  mergeAngleDeg = 10.0,
double  angleStepDeg = 20.0 
) const

This function computes an offset boundary of a Zone2. The result is returned as a vector of counterclockwise-oriented Segment2 objects.

The positive offset boundary of a Zone2
Parameters
[in]offsetThe positive or negative offset distance.
[out]vOffsetBoundaryA vector that will contain the output segments, in arbitrary order, oriented counterclockwise around the resulting shape.
[in]mergeAngleDegThe angle threshold (in degrees) used to merge circular arcs in the offset boundary. Arcs with an angle less than this value are collapsed to a single point. Default: 10.0, valid range: greater than 0 and up to 135.
[in]angleStepDegSpecifies the angle interval (in degrees) at which circular arcs are sampled using line segments. Default: 20.0, valid range: greater than 0 and up to 135.
See also
https://www.geom.at/offset-polygon-example/ This article contains examples on polygon offsets.

◆ getTriangles()

void GEOM_FADE2D::Zone2::getTriangles ( std::vector< Triangle2 * > &  vTriangles) const

This method retrieves the triangles of the zone.

Parameters
[out]vTrianglesA vector of Triangle2 pointers that will be populated with the triangles of the present Zone2.

◆ getZoneLocation()

ZoneLocation GEOM_FADE2D::Zone2::getZoneLocation ( ) const

This method is used to retrieve the ZoneLocation value of the present Zone2.

Returns
The ZoneLocation value.

◆ hasOn()

bool GEOM_FADE2D::Zone2::hasOn ( const Point2 p)

This method checks if the query point p lies on the Zone2 or its boundary.

Parameters
pThe point to check.
Returns
true if the point is on the Zone2 or its boundary, false otherwise.

The first call to this method initializes a search structure. If boundary edges of the Zone2 are not constraint edges yet, constraint edges are created.

◆ hasOnBoundary()

bool GEOM_FADE2D::Zone2::hasOnBoundary ( const Point2 p)

This method checks if the query point p lies exactly on the boundary of the present Zone2.

Parameters
pThe point to check.
Returns
true if the point is on the zone's boundary, false otherwise.

The first call to this method initializes a search structure. If boundary edges of the Zone2 are not constraint edges yet, constraint edges are created.

◆ locate()

Triangle2* GEOM_FADE2D::Zone2::locate ( const Point2 p)

Locates the triangle containing the query point within the Zone2.

Parameters
pThe point to locate.
Returns
A pointer to the Triangle2 if the point is inside the Zone2, otherwise NULL.

The first call to this method initializes a search structure. If boundary edges of the Zone2 are not constraint edges yet, constraint edges are created.

◆ morphClose()

Zone2* GEOM_FADE2D::Zone2::morphClose ( Fade_2D pFade,
double  offset,
double  mergeAngleDeg = 10.0,
double  angleStep = 20.0 
) const

Morphological closing bridges small gaps between shapes by applying dilation (positive offset) followed by erosion (negative offset) using a disk-shaped structuring element whose radius can be chosen. The result is stored in a new Zone2 object, created within the provided Fade_2D object.

Left: The input zone, Right: The result of morphological closing - small gaps bridged.
Parameters
pFadeAn empty Fade_2D object that will hold the result of the operation (the closed zone).
offsetThe offset distance. It defines the radius of the disk-shaped structuring element. This value must be positive.
mergeAngleDegAn angle threshold (in degrees). Circular arcs in the result which have an angle smaller than this value are collapsed into a single point. Recommended value: 91 degrees, to avoid most arcs.
angleStepThe angle interval (in degrees) at which circular arcs in the offset boundary, if any, are sampled using line segments. Default value: 20.0. Valid range: greater than 0 and up to 135.
Returns
A pointer to a new Zone2 object, created in pFade, representing the result of the morphological closing.
See also
https://www.geom.at/offset-polygon-example/#morphological_operations

◆ morphOpen()

Zone2* GEOM_FADE2D::Zone2::morphOpen ( Fade_2D pFade,
double  offset,
double  mergeAngleDeg = 10.0,
double  angleStep = 20.0 
) const

Morphological opening removes small details from a shape by applying erosion (negative offset) followed by dilation (positive offset) using a disk-shaped structuring element whose radius can be chosen. The result is stored in a new Zone2 object, which is created in the provided Fade_2D object.

Left: The input zone, Right: The result of morphological opening - small details removed.
Parameters
pFadeAn empty Fade_2D object in which the result will be created as a Zone2.
offsetThe offset distance, which defines the radius of the disk-shaped structuring element. This value must be positive.
mergeAngleDegAn angle threshold (in degrees). Circular arcs in the result which have an angle smaller than this value are collapsed into a single point. Recommended value: 91 degrees, to avoid most arcs.
angleStepThe angle interval (in degrees) at which circular arcs in the offset boundary, if any, are sampled using line segments. Default value: 20.0. Valid range: greater than 0 and up to 135.
Returns
A pointer to a new Zone2 object, created in pFade, representing the result of the morphological opening operation.
See also
https://www.geom.at/offset-polygon-example/#morphological_operations
Warning
The result of morphological opening may be empty! In such cases, this method returns NULL. Be sure to check for this condition before proceeding.

◆ numberOfConstraintGraphs()

size_t GEOM_FADE2D::Zone2::numberOfConstraintGraphs ( ) const

Retrieves the number of ConstraintGraph2 objects.

Returns
The number of ConstraintGraph2 objects associated with the current Zone2.

◆ save() [1/2]

bool GEOM_FADE2D::Zone2::save ( const char *  filename)

This command saves the present Zone2 to a binary file. Any constraint edges and custom indices in the domain are retained.

Parameters
[in]filenameis the output filename
Returns
whether the operation was successful
Note
A Delaunay triangulation is convex without holes but this may not hold for the Zone2 to be saved. Thus extra triangles may be saved to fill concavities. These extra-triangles will belong to the Fade_2D instance but not to the Zone2 object when reloaded.
See also
save(std::ostream& stream) is a similar command taking an ostream.
Fade_2D::saveZones(const char* file, std::vector<Zone2*>& vZones) is a similar command to store multiple Zone2 objects at once.
Fade_2D::saveTriangulation() stores the whole triangulation plus any specified Zone2 objects.
Fade_2D::load() can be used to reload the data from a file.

◆ save() [2/2]

bool GEOM_FADE2D::Zone2::save ( std::ostream &  stream)

This command saves the present Zone2 to an ostream. Any constraint edges and custom indices in the domain are retained.

Parameters
streamis the output stream
Returns
whether the operation was successful
Note
A Delaunay triangulation is convex without holes but this may not hold for the Zone2 to be saved. Thus extra triangles may be saved to fill concavities. These extra-triangles will belong to the Fade_2D instance but not to the Zone2 object when reloaded.
See also
save(const char* filename) is a similar command taking an filename.
Fade_2D::saveZones(const char* file, std::vector<Zone2*>& vZones) is a similar command to store multiple Zone2 objects at once.
Fade_2D::saveTriangulation() stores the whole triangulation plus any specified Zone2 objects.
Fade_2D::load() can be used to reload the data from a file.

◆ shiftToZone()

bool GEOM_FADE2D::Zone2::shiftToZone ( const Point2 q,
double  tolerance,
Point2 result 
)

This method finds a point close to the query point q that lies inside the Zone2 or on its boundary.

Parameters
[in]qA point outside the Zone2.
[in]toleranceThe maximum allowed 2D distance to find a point on the Zone2.
[out]resultA reference to store the point found within the Zone2, close to q.
Returns
true if a point within the zone is successfully found and returned as result; false otherwise.

The first call to this method initializes a search structure. If boundary edges of the Zone2 are not constraint edges yet, constraint edges are created.

◆ show() [1/2]

void GEOM_FADE2D::Zone2::show ( const char *  filename,
bool  bShowFull,
bool  bWithConstraints 
) const

This method visualizes and saves the Zone2 as a PDF or Postscript file.

Parameters
filenameThe name of the output file. Use .ps or .pdf as the file extension.
bShowFullSpecifies whether only the Zone2 or the full triangulation should be drawn.
bWithConstraintsSpecifies whether constraint edges should be drawn.

◆ show() [2/2]

void GEOM_FADE2D::Zone2::show ( Visualizer2 pVisualizer,
bool  bShowFull,
bool  bWithConstraints 
) const

This method visualizes and saves the Zone2 as a PDF or Postscript file.

Parameters
pVisualizerA pointer to an existing Visualizer2 object.
bShowFullSpecifies whether only the Zone2 or the full triangulation should be drawn.
bWithConstraintsSpecifies whether constraint edges should be drawn.
Note
You must call pVisualizer->writeFile() before program end

◆ showVtk() [1/2]

void GEOM_FADE2D::Zone2::showVtk ( const char *  filename,
VtkColor  zoneColor,
VtkColor  nonZoneColor = VTK_TRANSPARENT,
VtkColor  constraintColor = VTK_TRANSPARENT 
) const

This method visualizes and saves the Zone2 as a VTK file, which can be viewed in tools like Paraview.

Parameters
filenameThe name of the output file.
zoneColorThe color for the zone's triangles.
nonZoneColorThe color for the non-zone triangles. Use VTK_TRANSPARENT to prevent them from being drawn.
constraintColorThe color of the constraint edges. Use VTK_TRANSPARENT to prevent them from being drawn.

◆ showVtk() [2/2]

void GEOM_FADE2D::Zone2::showVtk ( VtkWriter pVtk,
VtkColor  zoneColor,
VtkColor  nonZoneColor = VTK_TRANSPARENT,
VtkColor  constraintColor = VTK_TRANSPARENT 
) const

This method visualizes and saves the Zone2 as a VTK file, which can be viewed in tools like Paraview.

Parameters
pVtkA VtkWriter object that may already contain other geometric objects
zoneColorThe color for the zone's triangles.
nonZoneColorThe color for the non-zone triangles. Use VTK_TRANSPARENT to prevent them from being drawn.
constraintColorThe color of the constraint edges. Use VTK_TRANSPARENT to prevent them from being drawn.
Note
Call pVtk->writeFile() to finally write the .vtk file.

◆ statistics()

void GEOM_FADE2D::Zone2::statistics ( const char *  s) const

Prints statistics.

◆ subscribe()

void GEOM_FADE2D::Zone2::subscribe ( MsgType  msgType,
MsgBase pMsg 
)

This method registers a subscriber to receive messages of a specified type.

Parameters
msgTypeThe type of message the subscriber will receive, e.g., MSG_PROGRESS or MSG_WARNING.
pMsgA pointer to a custom class derived from MsgBase that will handle the messages.

◆ unifyGrid()

void GEOM_FADE2D::Zone2::unifyGrid ( double  tolerance)
Left: A valid Delaunay triangulation. Right: Diagonals unified

A Delaunay triangulation is not unique when two or more triangles share a common circumcircle. For example, the four corners of a rectangle can be triangulated in two ways. This method unifies such cases by ensuring diagonals always go from the lower left to the upper right corner (or horizontally) for consistency and visual appearance.

Parameters
toleranceDefines the maximum allowed error in diagonal lengths due to noise or rounding errors. A value of 0 restricts changes to exact cases. The error is computed as: error = abs(diagonalA - diagonalB) / max(diagonalA, diagonalB)

◆ unsubscribe()

void GEOM_FADE2D::Zone2::unsubscribe ( MsgType  msgType,
MsgBase pMsg 
)

This method removes a subscriber from receiving messages of a specified type.

Parameters
msgTypeThe type of message that the subscriber will no longer receive.
pMsgA pointer to a custom class derived from MsgBase representing the subscriber to be removed.

◆ writeObj()

void GEOM_FADE2D::Zone2::writeObj ( const char *  filename) const

This method writes the current Zone2 data to an .obj file, which can be used for visualization and further processing in tools like Meshlab.

Parameters
filenameThe output filename.

Friends And Related Function Documentation

◆ peelOffIf [1/2]

CLASS_DECLSPEC friend Zone2* peelOffIf ( Zone2 pZone,
bool  bAvoidSplit,
PeelPredicateTS pPredicate 
)
friend

Triangulations often contain narrow, nearly vertical triangles at their borders. This function returns a Zone2 that includes all triangles from pZone, except the undesired ones. If no triangles remain, the method returns NULL. A user-defined predicate distinguishes between desired and undesired triangles.

Left: A Zone2 containing nearly vertical border triangles. Right: Vertical border triangles removed.
Parameters
pZoneThe input zone.
bAvoidSplitIf true, the algorithm removes a triangle only if it does not split the zone into independent components.
pPredicateA user-defined predicate to decide whether a triangle should be removed.
Returns
A new Zone2 containing a subset of the triangles from pZone, or NULL if no triangles remain.
See also
C++ Example: Removing unwanted border triangles

◆ peelOffIf [2/2]

CLASS_DECLSPEC friend Zone2* peelOffIf ( Zone2 pZone,
UserPredicateT pPredicate,
bool  bVerbose 
)
friend
Deprecated:
This function is DEPRECATED but kept for backwards compatibility. Use the new and better function peelOffIf(Zone2* pZone, bool bAvoidSplit,PeelPredicateTS* pPredicate)

◆ zoneDifference

CLASS_DECLSPEC friend Zone2* zoneDifference ( Zone2 pZone0,
Zone2 pZone1 
)
friend
Left: pZone0, Middle: pZone1, Right: difference

This function returns a pointer to a new Zone2 object representing the difference between pZone0 and pZone1 (i.e., pZone0 minus pZone1). The input zones must belong to the same Fade_2D object.

Parameters
pZone0Pointer to the first Zone2 object.
pZone1Pointer to the second Zone2 object.
Returns
A pointer to a new Zone2 object representing the difference. If the result is empty, the function returns NULL. Be sure to check this case before proceeding.

◆ zoneIntersection

CLASS_DECLSPEC friend Zone2* zoneIntersection ( Zone2 pZone0,
Zone2 pZone1 
)
friend
Left: pZone0, Middle: pZone1, Right: intersection

This function returns a pointer to a new Zone2 object representing the intersection of the two input zones. The intersection is the area covered by both input zones. The input zones must belong to the same Fade_2D object.

Parameters
pZone0Pointer to the first Zone2 object.
pZone1Pointer to the second Zone2 object.
Returns
A pointer to a new Zone2 object representing the intersection. If the result is empty, the function returns NULL. Be sure to check for this case before proceeding.

◆ zoneSymmetricDifference

CLASS_DECLSPEC friend Zone2* zoneSymmetricDifference ( Zone2 pZone0,
Zone2 pZone1 
)
friend
Left: pZone0, Middle: pZone1, Right: symmetric difference

This function returns a pointer to a new Zone2 object representing the symmetric difference between the two input zones. The symmetric difference is the area covered by either of the input zones, but not by both. The input zones must belong to the same Fade_2D object.

Parameters
pZone0Pointer to the first Zone2 object.
pZone1Pointer to the second Zone2 object.
Returns
A pointer to the resulting Zone2 object representing the symmetric difference. If the result is empty, the function returns NULL. Be sure to check for this case before proceeding.

◆ zoneUnion

CLASS_DECLSPEC friend Zone2* zoneUnion ( Zone2 pZone0,
Zone2 pZone1 
)
friend
Left: pZone0, Middle: pZone1, Right: union

This function returns a pointer to a new Zone2 object representing the union of the two input zones. The union is the area covered by either of the input zones. Both input zones must belong to the same Fade_2D object.

Parameters
pZone0Pointer to the first Zone2 object.
pZone1Pointer to the second Zone2 object.
Returns
A pointer to the resulting Zone2 object representing the union of the two zones.

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