HDK
|
#include "pxr/pxr.h"
#include "pxr/base/gf/line2d.h"
#include "pxr/base/gf/vec2d.h"
#include "pxr/base/gf/api.h"
#include <float.h>
Go to the source code of this file.
Classes | |
class | GfLineSeg2d |
Functions | |
GF_API bool | GfFindClosestPoints (const GfLine2d &line, const GfLineSeg2d &seg, GfVec2d *p1=nullptr, GfVec2d *p2=nullptr, double *t1=nullptr, double *t2=nullptr) |
GF_API bool | GfFindClosestPoints (const GfLineSeg2d &seg1, const GfLineSeg2d &seg2, GfVec2d *p1=nullptr, GfVec2d *p2=nullptr, double *t1=nullptr, double *t2=nullptr) |
GF_API bool GfFindClosestPoints | ( | const GfLine2d & | line, |
const GfLineSeg2d & | seg, | ||
GfVec2d * | p1 = nullptr , |
||
GfVec2d * | p2 = nullptr , |
||
double * | t1 = nullptr , |
||
double * | t2 = nullptr |
||
) |
Computes the closets points on line
and seg
.
The two points are returned in p1
and p2
. The parametric distances of p1
and p2
along the line and segment are 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.
GF_API bool GfFindClosestPoints | ( | const GfLineSeg2d & | seg1, |
const GfLineSeg2d & | seg2, | ||
GfVec2d * | p1 = nullptr , |
||
GfVec2d * | p2 = nullptr , |
||
double * | t1 = nullptr , |
||
double * | t2 = nullptr |
||
) |
Computes the closets points on two line segments, seg1
and seg2
.
The two points are returned in p1
and p2
. The parametric distances of p1
and p2
along the segments are 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.