Skip to content

Latest commit

 

History

History
29 lines (22 loc) · 859 Bytes

opsqdist.rst

File metadata and controls

29 lines (22 loc) · 859 Bytes

Distance

The various overloads of squared_distance() calculate the squared distance between a query point and several different primitives:

  • another point,
  • a BoundingBox,
  • a Segment,
  • a Triangle.

../../examples/primal_introduction.cpp

../../examples/primal_introduction.cpp

The example shows the squared distance between the query point, shown in black in the figure, and four geometric primitives. For clarity, the diagram also shows the projection of the query point and its closest points to the XY plane.