API Reference > OdDb Classes > OdDbSubDMesh Class > OdDbSubDMesh Methods > OdDbSubDMesh::computeRayIntersection Method
OdDbSubDMesh::computeRayIntersection Method
Syntax
C++
OdResult computeRayIntersection(const OdGePoint3d & rayStart, const OdGeVector3d & rayDir, OdArray<OdDbSubentId> & retSubents, OdArray<double> & retIntersectDist, OdGePoint3dArray& retIntersectPoint) const;
Parameters 
Description 
const OdGePoint3d & rayStart 
[in] Start point of the ray.  
const OdGeVector3d & rayDir 
[in] Ray direction.  
OdArray<OdDbSubentId> & retSubents 
[out] The array of indexes of faces intersected by the ray.  
OdArray<double> & retIntersectDist 
[out] The array of distances between the start point of the ray and the intersection point for intersected subentities.  
OdGePoint3dArray& retIntersectPoint 
[out] The array of intersection points for intersected subentities. 

A value of the OdResult type containing the result of the method execution.

Calculates an array of indexes of all faces of current SubDMash entity that are intersected by a specified ray. Also the method returns two additional arrays containing the intersection points for each face and distances between the start point of the ray and intersection points. 

 

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