API Reference > FacetModeler Namespace > Classes > Segment2D Class > Segment2D Methods > Segment2D::intersectXRay Method
Segment2D::intersectXRay Method
Syntax
C++
OdUInt32 intersectXRay(const OdGePoint2d& ptTest, bool* pOnSegment = NULL, const OdGeTol& gTol = FMGeGbl::gTol) const;
Parameters 
Description 
const OdGePoint2d& ptTest 
[in] Point to test.  
bool* pOnSegment = NULL 
[out] The result of checking whether a point lies on the segment.  
const OdGeTol& gTol = FMGeGbl::gTol 
[in] Tolerance.  

The number of different intersection points.

Gets the number of different intersection points of the segment (including end points with minimal Y) with a ray, starting at ptTest and going in the X direction. 

 

pOnSegment is set to true if the test point lies on the segment.

Copyright © 2002-2020. Open Design Alliance. All rights reserved.