BRL-CAD
Triangle Struct Reference

Public Member Functions

void CreateFromPoints (ON_3dPoint &pA, ON_3dPoint &pB, ON_3dPoint &pC)
 
ON_3dPoint BarycentricCoordinate (const ON_3dPoint &pt) const
 
void GetLineSegments (ON_Line line[3]) const
 

Data Fields

ON_3dPoint a
 
ON_3dPoint b
 
ON_3dPoint c
 
ON_2dPoint a_2d
 
ON_2dPoint b_2d
 
ON_2dPoint c_2d
 

Detailed Description

Surface-surface intersections (SSI)

approach:

  • Generate the bounding box of the two surfaces.
  • If their bounding boxes intersect:

– Split the two surfaces, both into four parts, and calculate the sub-surfaces' bounding boxes.

– Calculate the intersection of sub-surfaces' bboxes, if they do intersect, go deeper with splitting surfaces and smaller bboxes, otherwise trace back.

  • After getting the intersecting bboxes, approximate the surface inside the bbox as two triangles, and calculate the intersection points of the triangles (both in 3d space and two surfaces' UV space).
  • If an intersection point is accurate enough (within the tolerance), we append it to the list. Otherwise, we use Newton-Raphson iterations to solve an under-determined system to get an more accurate inter- section point.
  • Fit the intersection points into polyline curves, and then to NURBS curves. Points with distance less than max_dist are considered in one curve. Points that cannot be fitted to a curve are regarded as single points.
  • Linear fittings and conic fittings are done to simplify the curves' representations.
  • Note: the overlap cases are handled at the beginning separately.

See: Adarsh Krishnamurthy, Rahul Khardekar, Sara McMains, Kirk Haller, and Gershon Elber. 2008. Performing efficient NURBS modeling operations on the GPU. In Proceedings of the 2008 ACM symposium on Solid and physical modeling (SPM '08). ACM, New York, NY, USA, 257-268. DOI=10.1145/1364901.1364937 http://doi.acm.org/10.1145/1364901.1364937

Definition at line 2158 of file intersect.cpp.

Member Function Documentation

void CreateFromPoints ( ON_3dPoint &  pA,
ON_3dPoint &  pB,
ON_3dPoint &  pC 
)
inline

Definition at line 2161 of file intersect.cpp.

ON_3dPoint BarycentricCoordinate ( const ON_3dPoint &  pt) const
inline

Definition at line 2167 of file intersect.cpp.

Referenced by ON_Intersect().

void GetLineSegments ( ON_Line  line[3]) const
inline

Definition at line 2181 of file intersect.cpp.

Referenced by triangle_intersection().

Field Documentation

ON_3dPoint a

Definition at line 2159 of file intersect.cpp.

Referenced by triangle_intersection().

ON_3dPoint b

Definition at line 2159 of file intersect.cpp.

Referenced by triangle_intersection().

ON_3dPoint c

Definition at line 2159 of file intersect.cpp.

Referenced by triangle_intersection().

ON_2dPoint a_2d

Definition at line 2160 of file intersect.cpp.

Referenced by barycentric_to_uv().

ON_2dPoint b_2d

Definition at line 2160 of file intersect.cpp.

Referenced by barycentric_to_uv().

ON_2dPoint c_2d

Definition at line 2160 of file intersect.cpp.

Referenced by barycentric_to_uv().


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