API Reference > OdGe Classes > OdGeSphere Class > OdGeSphere Methods > OdGeSphere::intersectWith Method
OdGeSphere::intersectWith Method
Syntax
C++
bool intersectWith(const OdGeLinearEnt3d& lineEnt, int& numInt, OdGePoint3d& p1, OdGePoint3d& p2, const OdGeTol& tol = OdGeContext::gTol) const;
Parameters 
Description 
const OdGeLinearEnt3d& lineEnt 
[in] Any 3D line entity that is tested for intersection with this sphere.  
int& numInt 
[out] Receives the number of intersections.  
OdGePoint3d& p1 
[out] Receives the first intersection point.  
OdGePoint3d& p2 
[out] Receives the second intersection point.  
const OdGeTol& tol = OdGeContext::gTol 
[in] Geometric tolerance. 

true if and only if this sphere intersects with a line entity.

Checks if this sphere intersects with a line entity, and returns the number of intersections and the points of intersection. 

 

  • p1 is valid if and only if numInt >= 1.
  • p2 is valid if and only if numInt = 2.

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