65 this->
points[0]->addObserver(
this);
66 this->
points[1]->addObserver(
this);
67 this->
points[2]->addObserver(
this);
94 this->
points[0]->removeObserver(
this);
96 this->
points[1]->removeObserver(
this);
98 this->
points[2]->removeObserver(
this);
133 for (
int i = 0;
i < 3;
i++)
147 for (
int i = 0;
i < 3;
i++)
163 return ((this->
points[index]));
212 return (this->
x1min);
222 return (this->
x1max);
242 return (this->
x2min);
252 return (this->
x2max);
264 return (this->
x3min);
270 return (this->
x3max);
310 ss <<
"GbTriangle3D[area=";
313 ss <<
", x1s=" << this->
x1s;
314 ss <<
", x2s=" << this->
x2s;
315 ss <<
", x3s=" << this->
x3s;
316 ss <<
", x1min=" << this->
x1min;
317 ss <<
", x1max=" << this->
x1max;
318 ss <<
", x2min=" << this->
x2min;
319 ss <<
", x2max=" << this->
x2max;
320 ss <<
", x3min=" << this->
x3min;
321 ss <<
", x3max=" << this->
x3max;
322 ss <<
", points1=" << this->
points[0]->toString();
323 ss <<
", points2=" << this->
points[1]->toString();
324 ss <<
", points3=" << this->
points[2]->toString();
326 return ((
ss.str()).c_str());
330 const double &
rx1,
const double &
rx2,
const double &
rx3)
349 if (
fabs(a) < 1.E-10)
370 if (v < -1.E-10 || (
u + v) > 1.0 + 1.E-10)
414 double denom = Normal.
Dot(direction);
473 cout <<
"??? ch glaub GbTriangle3D::calculateDistanceToPoint3D(...) kann man so nicht nehmen,jedenfalls nicht fuer "
493 if (((
P1 -
P0).Cross(
P2 -
P0)).Dot(Normal) > 0)
495 if (((
P2 -
P0).Cross(
P3 -
P0)).Dot(Normal) > 0)
497 if (((
P3 -
P0).Cross(
P1 -
P0)).Dot(Normal) > 0)
531 for (
int i = 0;
i < 6;
i++) {
545 const double &x2,
const double &
y2,
const double &
z2)
550 double tt = 0,
xi = 0,
eta = 0;
568 zaehler =
static_cast<double>(((-1.0 *
zc +
zb) *
ya + (
yc - 1.0 *
yb) *
za +
zc *
yb - 1.0 *
zb *
yc) * x1 +
593 ((-2.0 *
yc +
ya +
yb) * x2 + (-1.0 *
xa - 1.0 *
xb + 2.0 *
xc) *
y2 - 1.0 *
xc *
yb +
633 return static_cast<double>((
sqrt(
pow((x1 * (0.5 -
tt / 2) + x2 * (0.5 +
tt / 2)) - x1, 2) +
650 if (x1 == this->
getPoint(0)->getX1Coordinate() && x2 == this->
getPoint(0)->getX2Coordinate())
652 if (x1 == this->
getPoint(1)->getX1Coordinate() && x2 == this->
getPoint(1)->getX2Coordinate())
654 if (x1 == this->
getPoint(2)->getX1Coordinate() && x2 == this->
getPoint(2)->getX2Coordinate())
663 p2.
setX1(x1 + 0.333);
664 p2.
setX2(x2 + 3.333);
743 cube->getPoint1()->getX2Coordinate(),
cube->getPoint1()->getX3Coordinate(),
744 cube->getPoint2()->getX1Coordinate(),
cube->getPoint2()->getX2Coordinate(),
745 cube->getPoint2()->getX3Coordinate()));
766 const double &
p2x1,
const double &
p2x2,
const double &
p2x3)
890 this->x1min = this->
points[1]->x1;
894 this->x2min = this->
points[1]->x2;
898 this->x3min = this->
points[1]->x3;
903 this->x1min = this->
points[2]->x1;
907 this->x2min = this->
points[2]->x2;
911 this->x3min = this->
points[2]->x3;
937void GbTriangle3D::init()
983 double fC =
kDiff.SquaredLength();
990 if (
fS < (
double)0.0) {
991 if (
fT < (
double)0.0)
993 if (
fB0 < (
double)0.0) {
1004 if (
fB1 >= (
double)0.0) {
1018 if (
fB1 >= (
double)0.0) {
1029 }
else if (
fT < (
double)0.0)
1032 if (
fB0 >= (
double)0.0) {
1054 if (
fS < (
double)0.0)
1073 if (
fTmp1 <= (
double)0.0) {
1076 }
else if (
fB1 >= (
double)0.0) {
1084 }
else if (
fT < (
double)0.0)
1103 if (
fTmp1 <= (
double)0.0) {
1106 }
else if (
fB0 >= (
double)0.0) {
1117 if (
fNumer <= (
double)0.0) {
This Class provides basic 3D box objects.
This Class provides basic 3D line objects.
This Class provides basic 3D point objects.
void setX2(const double &x2)
double getX3Coordinate() const
void setX3(const double &x3)
double getX1Coordinate() const
void setX1(const double &x1)
double getX2Coordinate() const
This Class provides basic 3D polygon objects.
This Class provides basic 3D triangle objects.
std::vector< GbPoint3D * > points
This Class provides basic 3D vector objects.
std::shared_ptr< T > SPtr
GbVector3D Cross(const GbVector3D &rkV) const
double getX1Maximum() override
int contains(GbPoint3D *point)
double calculateDistanceToPoint3D(GbPoint3D *point)
std::vector< GbTriangle3D * > getSurfaceTriangleSet() override
double SquaredLength() const
double getX3Minimum() override
GbPoint3D * getPoint(const int &index)
double getDistanceFromPoint(GbVector3D punct)
void setPoint(GbPoint3D *point, int index)
double getX1Centroid() override
GbLine3D * createClippedLine3D(GbPoint3D &point1, GbPoint3D &point2) override
double getX2Maximum() override
double getX2Centroid() override
GbTriangle3D * clone() override
double getX1Minimum() override
std::string toString() override
GbPolygon3D * createClippedPolygon3D(GbCuboid3D *cube)
double calculateNormalizedDistanceToPoint3D(const double &x1, const double &y1, const double &z1, const double &x2, const double &y2, const double &z2)
bool enclosesPoint2D(double x1, double x2)
double getX3Maximum() override
int containsEqual(GbPoint3D *point)
virtual void calculateValues()
GbPoint3D * calculateIntersectionPoints3D(GbLine3D *line)
double getIntersectionRaytraceFactor(const double &x1, const double &x2, const double &x3, const double &rx1, const double &rx2, const double &rx3) override
std::vector< GbPoint3D > getPoints()
double getX3Centroid() override
double Dot(const GbVector3D &rkV) const
double getX2Minimum() override
GbPoint3D * calculateIntersectionPoint3D(GbPoint3D &p11, GbPoint3D &p12, GbPoint3D &p21, GbPoint3D &p22)
GbPolygon3D * clipPolygon3D(std::vector< GbPoint3D > points, double x11, double x12, double x13, double x21, double x22, double x23)
bool greater(const T1 &value, const T2 &reference)
bool zero(const T &value)
bool less(const T1 &value, const T2 &reference)