This document is for a version of USD that is under development. See this page for the current release.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
line.h File Reference
+ Include dependency graph for line.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  GfLine
 Basic type: 3D line. More...
 

Functions

GF_API bool GfFindClosestPoints (const GfLine &l1, const GfLine &l2, GfVec3d *p1=nullptr, GfVec3d *p2=nullptr, double *t1=nullptr, double *t2=nullptr)
 Computes the closets points between two lines.
 
GF_API std::ostream & operator<< (std::ostream &, const GfLine &)
 Output a GfLine.
 

Function Documentation

◆ GfFindClosestPoints()

GF_API bool GfFindClosestPoints ( const GfLine l1,
const GfLine l2,
GfVec3d p1 = nullptr,
GfVec3d p2 = nullptr,
double *  t1 = nullptr,
double *  t2 = nullptr 
)

Computes the closets points between two lines.

The two points are returned in p1 and p2. The parametric distance of each point on the lines is returned in t1 and t2.

This returns false if the lines were close enough to parallel that no points could be computed; in this case, the other return values are undefined.