UNIVERS
15.3
UNIVERS base processing software API
|
#include <u3d_triangle.hpp>
Public Member Functions | |
U3dTriangle (const int &iind1, const int &iind2, const int &iind3) | |
bool | intersectWithSegment (const U3dPoint &PTr0, const U3dPoint &PTr1, const U3dPoint &PTr2, const U3dPoint &pA, const U3dPoint &pB, const double &A, const double &B, const double &C, double &outX, double &outY, double &outZ) const |
U3dTriangle (const int &iind1, const int &iind2, const int &iind3) | |
bool | intersectWithSegment (const U3dPoint &PTr0, const U3dPoint &PTr1, const U3dPoint &PTr2, const U3dPoint &pA, const U3dPoint &pB, const double &A, const double &B, const double &C, double &outX, double &outY, double &outZ) const |
Public Attributes | |
int | ind1 |
int | ind2 |
int | ind3 |
double | a |
double | b |
double | c |
double | d |
Triangle derived from 3 indexies to points and 3 plane coefficients
bool U3dTriangle::intersectWithSegment | ( | const U3dPoint & | PTr0, |
const U3dPoint & | PTr1, | ||
const U3dPoint & | PTr2, | ||
const U3dPoint & | pA, | ||
const U3dPoint & | pB, | ||
const double & | A, | ||
const double & | B, | ||
const double & | C, | ||
double & | outX, | ||
double & | outY, | ||
double & | outZ | ||
) | const |
Checks intersection with segment. A, B and C - coordinates of vector pA->pB. outX, outY and outZ - coordinates of point of intersection, if it have place to be. values outX, outY and outZ will are undefined if no intersection occured. Attention! Not pass segment with zero length to avoid division by zero!
bool U3dTriangle::intersectWithSegment | ( | const U3dPoint & | PTr0, |
const U3dPoint & | PTr1, | ||
const U3dPoint & | PTr2, | ||
const U3dPoint & | pA, | ||
const U3dPoint & | pB, | ||
const double & | A, | ||
const double & | B, | ||
const double & | C, | ||
double & | outX, | ||
double & | outY, | ||
double & | outZ | ||
) | const |
Checks intersection with segment. A, B and C - coordinates of vector pA->pB. outX, outY and outZ - coordinates of point of intersection, if it have place to be. values outX, outY and outZ will are undefined if no intersection occured. Attention! Not pass segment with zero length to avoid division by zero!