ClassesClassesClassesClasses | | | | Operators

intersectionintersectionIntersectionintersectionIntersectionIntersection (Operator)

Name

intersectionintersectionIntersectionintersectionIntersectionIntersection — Calculate the intersection of two regions.

Signature

intersection(Region1, Region2 : RegionIntersection : : )

Herror intersection(const Hobject Region1, const Hobject Region2, Hobject* RegionIntersection)

Herror T_intersection(const Hobject Region1, const Hobject Region2, Hobject* RegionIntersection)

Herror intersection(Hobject Region1, Hobject Region2, Hobject* RegionIntersection)

HRegion HRegion::Intersection(const HRegion& Region2) const

HRegionArray HRegionArray::Intersection(const HRegionArray& Region2) const

void Intersection(const HObject& Region1, const HObject& Region2, HObject* RegionIntersection)

HRegion HRegion::Intersection(const HRegion& Region2) const

void HOperatorSetX.Intersection(
[in] IHUntypedObjectX* Region1, [in] IHUntypedObjectX* Region2, [out] IHUntypedObjectX*RegionIntersection)

IHRegionX* HRegionX.Intersection([in] IHRegionX* Region2)

static void HOperatorSet.Intersection(HObject region1, HObject region2, out HObject regionIntersection)

HRegion HRegion.Intersection(HRegion region2)

Description

intersectionintersectionIntersectionintersectionIntersectionIntersection calculates the intersection of the regions in Region1Region1Region1Region1Region1region1 with the regions in Region2Region2Region2Region2Region2region2. Each region in Region1Region1Region1Region1Region1region1 is intersected with all regions in Region2Region2Region2Region2Region2region2. That is, internally all regions of Region2Region2Region2Region2Region2region2 are united to a single region before the individual regions of Region1Region1Region1Region1Region1region1 are intersected with the united region. The order of regions in RegionIntersectionRegionIntersectionRegionIntersectionRegionIntersectionRegionIntersectionregionIntersection is identical to the order of regions in Region1Region1Region1Region1Region1region1.

Attention

Empty input regions are permitted. Because empty result regions are possible, the system flag 'store_empty_region'"store_empty_region""store_empty_region""store_empty_region""store_empty_region""store_empty_region" should be set appropriately.

Parallelization

Parameters

Region1Region1Region1Region1Region1region1 (input_object)  region(-array) objectHRegionHRegionHRegionHRegionXHobject

Regions to be intersected with all regions in Region2.

Region2Region2Region2Region2Region2region2 (input_object)  region(-array) objectHRegionHRegionHRegionHRegionXHobject

Regions with which Region1 is intersected.

RegionIntersectionRegionIntersectionRegionIntersectionRegionIntersectionRegionIntersectionregionIntersection (output_object)  region(-array) objectHRegionHRegionHRegionHRegionXHobject *

Result of the intersection.

Number of elements: RegionIntersection <= Region1

Complexity

Let N be the number of regions in Region1Region1Region1Region1Region1region1, be their average area, and be the total area of all regions in Region2Region2Region2Region2Region2region2. Then the runtime complexity is .

Result

intersectionintersectionIntersectionintersectionIntersectionIntersection always returns 2 (H_MSG_TRUE). The behavior in case of empty input (no regions given) can be set via set_system('no_object_result',<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>) and the behavior in case of an empty input region via set_system('empty_region_result',<Result>)set_system("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>)set_system("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>). If necessary, an exception is raised.

Possible Predecessors

thresholdthresholdThresholdthresholdThresholdThreshold, connectionconnectionConnectionconnectionConnectionConnection, regiongrowingregiongrowingRegiongrowingregiongrowingRegiongrowingRegiongrowing, pouringpouringPouringpouringPouringPouring

Possible Successors

select_shapeselect_shapeSelectShapeselect_shapeSelectShapeSelectShape, disp_regiondisp_regionDispRegiondisp_regionDispRegionDispRegion

See also

union1union1Union1union1Union1Union1, union2union2Union2union2Union2Union2, complementcomplementComplementcomplementComplementComplement

Module

Foundation


ClassesClassesClassesClasses | | | | Operators