UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
IntrTriangle3Triangle3.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3// Port of WildMagic TIntrTriangle3Triangle3
4
5
6#pragma once
7
8#include "VectorTypes.h"
9#include "PlaneTypes.h"
10#include "TriangleTypes.h"
11#include "VectorUtil.h"
12#include "IndexTypes.h"
13
16
17namespace UE
18{
19namespace Geometry
20{
21
22using namespace UE::Math;
23
31template <typename Real>
33{
34protected:
35 // Input
38
39 // If true, will return intersection polygons for co-planar triangles.
40 // This is somewhat expensive, default is false.
41 // Note that when false, co-planar intersections will **NOT** be reported as intersections
43
44public:
45 // Output
46
47 // result flags
50
51 // intersection points (for point, line, polygon)
52 // only first Quantity elements are relevant
53 int Quantity = 0;
55
59 {
60 Triangle0 = T0;
61 Triangle1 = T1;
62 }
63
67 inline void SetResult(const TVector<Real>& A, const TVector<Real>& B)
68 {
71 Points[0] = A;
72 Points[1] = B;
73 Quantity = 2;
74 }
75
85
95
97 {
98 return Triangle0;
99 }
101 {
102 return Triangle1;
103 }
105 {
107 }
108 Real GetTolerance() const
109 {
110 return Tolerance;
111 }
132
134 {
135 Find();
136 return this;
137 }
138
139
140 bool Find()
141 {
143 {
145 }
146
147
148 // in this code the results get initialized in subroutines, so we
149 // set the default value here...
151
152
153 int i, iM, iP;
154
155 // Get the plane of Triangle0.
157
158 if (Plane0.Normal == TVector<Real>::Zero())
159 {
160 // This function was written assuming triangle 0 has a valid normal;
161 // if it's degenerate, try swapping the triangles
163 if (Plane1.Normal != TVector<Real>::Zero())
164 {
165 // Find the intersection with the triangles swapped
167 SwappedTrisIntr.Tolerance = Tolerance;
168 SwappedTrisIntr.bReportCoplanarIntersection = bReportCoplanarIntersection;
169 bool bRes = SwappedTrisIntr.Find();
170 // copy results back
171 Result = SwappedTrisIntr.Result;
172 Type = SwappedTrisIntr.Type;
173 Quantity = SwappedTrisIntr.Quantity;
174 for (int PtIdx = 0; PtIdx < 6; PtIdx++)
175 {
177 }
178 return bRes;
179 }
180 else
181 {
182 // both triangles degenerate; we don't handle this
183 return false;
184 }
185 }
186
187 // Compute the signed distances of Triangle1 vertices to Plane0. Use
188 // an epsilon-thick plane test.
189 int pos1, neg1, zero1;
193
194 if (pos1 == 3 || neg1 == 3)
195 {
196 // Triangle1 is fully on one side of Plane0.
197 return false;
198 }
199
200 if (zero1 == 3)
201 {
202 // Triangle1 is contained by Plane0.
204 {
206 }
207 return false;
208 }
209
210 // Check for grazing contact between Triangle1 and Plane0.
211 if (pos1 == 0 || neg1 == 0)
212 {
213 if (zero1 == 2)
214 {
215 // An edge of Triangle1 is in Plane0.
216 for (i = 0; i < 3; ++i)
217 {
218 if (sign1[i] != 0)
219 {
220 iM = (i + 2) % 3;
221 iP = (i + 1) % 3;
223 }
224 }
225 }
226 else // zero1 == 1
227 {
228 // A vertex of Triangle1 is in Plane0.
229 for (i = 0; i < 3; ++i)
230 {
231 if (sign1[i] == 0)
232 {
234 }
235 }
236 }
237 }
238
239 // At this point, Triangle1 transversely intersects plane 0. Compute the
240 // line segment of intersection. Then test for intersection between this
241 // segment and triangle 0.
242 Real t;
244 if (zero1 == 0)
245 {
246 int iSign = (pos1 == 1 ? +1 : -1);
247 for (i = 0; i < 3; ++i)
248 {
249 if (sign1[i] == iSign)
250 {
251 iM = (i + 2) % 3;
252 iP = (i + 1) % 3;
253 t = dist1[i] / (dist1[i] - dist1[iM]);
254 intr0 = Triangle1.V[i] + t * (Triangle1.V[iM] - Triangle1.V[i]);
255 t = dist1[i] / (dist1[i] - dist1[iP]);
256 intr1 = Triangle1.V[i] + t * (Triangle1.V[iP] - Triangle1.V[i]);
258 }
259 }
260 }
261
262 // zero1 == 1
263 for (i = 0; i < 3; ++i)
264 {
265 if (sign1[i] == 0)
266 {
267 iM = (i + 2) % 3;
268 iP = (i + 1) % 3;
269 t = dist1[iM] / (dist1[iM] - dist1[iP]);
270 intr0 = Triangle1.V[iM] + t * (Triangle1.V[iP] - Triangle1.V[iM]);
272 }
273 }
274
275 // should never get here...
276 ensure(false);
277 return false;
278 }
279
280
281 bool Test()
282 {
283 // Get edge vectors for Triangle0.
284 TVector<Real> E0[3];
285 E0[0] = Triangle0.V[1] - Triangle0.V[0];
286 E0[1] = Triangle0.V[2] - Triangle0.V[1];
287 E0[2] = Triangle0.V[0] - Triangle0.V[2];
288
289 // Get normal vector of Triangle0.
290 TVector<Real> N0 = UnitCross(E0[0], E0[1]);
291
292 // Project Triangle1 onto normal line of Triangle0, test for separation.
293 Real N0dT0V0 = N0.Dot(Triangle0.V[0]);
294 Real min1, max1;
297 {
298 return false;
299 }
300
301 // Get edge vectors for Triangle1.
302 TVector<Real> E1[3];
303 E1[0] = Triangle1.V[1] - Triangle1.V[0];
304 E1[1] = Triangle1.V[2] - Triangle1.V[1];
305 E1[2] = Triangle1.V[0] - Triangle1.V[2];
306
307 // Get normal vector of Triangle1.
308 TVector<Real> N1 = UnitCross(E1[0], E1[1]);
309
311 Real min0, max0;
312 int i0, i1;
313
315 if (N0xN1.Dot(N0xN1) >= Tolerance)
316 {
317 // Triangles are not parallel.
318
319 // Project Triangle0 onto normal line of Triangle1, test for
320 // separation.
321 Real N1dT1V0 = N1.Dot(Triangle1.V[0]);
324 {
325 return false;
326 }
327
328 // Directions E0[i0]xE1[i1].
329 for (i1 = 0; i1 < 3; ++i1)
330 {
331 for (i0 = 0; i0 < 3; ++i0)
332 {
333 dir = UnitCross(E0[i0], E1[i1]);
336 if (max0 < min1 - Tolerance || max1 < min0 - Tolerance)
337 {
338 return false;
339 }
340 }
341 }
342
343 // The test query does not know the intersection set.
345 }
346 else // Triangles are parallel (and, in fact, coplanar).
347 {
349 {
350 return false;
351 }
352
353 // Directions N0xE0[i0].
354 for (i0 = 0; i0 < 3; ++i0)
355 {
356 dir = UnitCross(N0, E0[i0]);
359 if (max0 < min1 - Tolerance || max1 < min0 - Tolerance)
360 {
361 return false;
362 }
363 }
364
365 // Directions N1xE1[i1].
366 for (i1 = 0; i1 < 3; ++i1)
367 {
368 dir = UnitCross(N1, E1[i1]);
371 if (max0 < min1 - Tolerance || max1 < min0 - Tolerance)
372 {
373 return false;
374 }
375 }
376
377 // The test query does not know the intersection set.
379 }
380
381 return true;
382 }
383
384
385
387 {
388 // Get edge vectors for Triangle0.
389 TVector<Real> E0[3];
390 E0[0] = Triangle0.V[1] - Triangle0.V[0];
391 E0[1] = Triangle0.V[2] - Triangle0.V[1];
392 E0[2] = Triangle0.V[0] - Triangle0.V[2];
393
394 // Get normal vector of Triangle0.
395 TVector<Real> N0 = UnitCross(E0[0], E0[1]);
396
397 // Project Triangle1 onto normal line of Triangle0, test for separation.
398 Real N0dT0V0 = N0.Dot(Triangle0.V[0]);
399 Real min1, max1;
402 return false;
403 }
404
405 // Get edge vectors for Triangle1.
406 TVector<Real> E1[3];
407 E1[0] = Triangle1.V[1] - Triangle1.V[0];
408 E1[1] = Triangle1.V[2] - Triangle1.V[1];
409 E1[2] = Triangle1.V[0] - Triangle1.V[2];
410
411 // Get normal vector of Triangle1.
412 TVector<Real> N1 = UnitCross(E1[0], E1[1]);
413
415 Real min0, max0;
416 int i0, i1;
417
419 if (N0xN1.Dot(N0xN1) >= Tolerance) {
420 // Triangles are not parallel.
421
422 // Project Triangle0 onto normal line of Triangle1, test for
423 // separation.
424 Real N1dT1V0 = N1.Dot(Triangle1.V[0]);
427 return false;
428 }
429
430 // Directions E0[i0]xE1[i1].
431 for (i1 = 0; i1 < 3; ++i1) {
432 for (i0 = 0; i0 < 3; ++i0) {
433 dir = UnitCross(E0[i0], E1[i1]);
436 if (max0 < min1 - Tolerance || max1 < min0 - Tolerance) {
437 return false;
438 }
439 }
440 }
441
442 }
443 else { // Triangles are parallel (and, in fact, coplanar).
444 // Directions N0xE0[i0].
445 for (i0 = 0; i0 < 3; ++i0) {
446 dir = UnitCross(N0, E0[i0]);
449 if (max0 < min1 - Tolerance || max1 < min0 - Tolerance) {
450 return false;
451 }
452 }
453
454 // Directions N1xE1[i1].
455 for (i1 = 0; i1 < 3; ++i1) {
456 dir = UnitCross(N1, E1[i1]);
459 if (max0 < min1 - Tolerance || max1 < min0 - Tolerance) {
460 return false;
461 }
462 }
463 }
464
465 return true;
466 }
467
468
469
470
471 static void ProjectOntoAxis(const TTriangle3<Real>& triangle, const TVector<Real>& axis, Real& fmin, Real& fmax)
472 {
473 Real dot0 = axis.Dot(triangle.V[0]);
474 Real dot1 = axis.Dot(triangle.V[1]);
475 Real dot2 = axis.Dot(triangle.V[2]);
476
477 fmin = dot0;
478 fmax = fmin;
479
480 if (dot1 < fmin)
481 {
482 fmin = dot1;
483 }
484 else if (dot1 > fmax)
485 {
486 fmax = dot1;
487 }
488
489 if (dot2 < fmin)
490 {
491 fmin = dot2;
492 }
493 else if (dot2 > fmax)
494 {
495 fmax = dot2;
496 }
497 }
498
499
500
503 Real Tolerance)
504 {
505 // Compute the signed distances of triangle vertices to the plane. Use
506 // an epsilon-thick plane test.
507 positive = 0;
508 negative = 0;
509 zero = 0;
510 for (int i = 0; i < 3; ++i)
511 {
512 distance[i] = plane.DistanceTo(triangle.V[i]);
513 if (distance[i] > Tolerance)
514 {
515 sign[i] = 1;
516 positive++;
517 }
518 else if (distance[i] < -Tolerance)
519 {
520 sign[i] = -1;
521 negative++;
522 }
523 else
524 {
525 sign[i] = 0;
526 zero++;
527 }
528 }
529 }
530
531
546 const TPlane3<Real>& plane, const TTriangle3<Real>& triangle, const TVector<Real>& end0, const TVector<Real>& end1,
548 {
549 // Compute the 2D representations of the triangle vertices and the
550 // segment endpoints relative to the plane of the triangle. Then
551 // compute the intersection in the 2D space.
552
553 // Project the triangle and segment onto the coordinate plane most
554 // aligned with the plane normal.
555 int maxNormal = 0;
556 Real fmax = FMath::Abs(plane.Normal.X);
557 Real absMax = FMath::Abs(plane.Normal.Y);
558 if (absMax > fmax)
559 {
560 maxNormal = 1;
561 fmax = absMax;
562 }
563 absMax = FMath::Abs(plane.Normal.Z);
564 if (absMax > fmax) {
565 maxNormal = 2;
566 }
567
570 int i;
571
572 if (maxNormal == 0)
573 {
574 // Project onto yz-plane.
575 for (i = 0; i < 3; ++i)
576 {
577 projTri.V[i] = GetYZ(triangle.V[i]);
578 }
579 projEnd0.X = end0.Y;
580 projEnd0.Y = end0.Z;
581 projEnd1.X = end1.Y;
582 projEnd1.Y = end1.Z;
583 }
584 else if (maxNormal == 1)
585 {
586 // Project onto xz-plane.
587 for (i = 0; i < 3; ++i)
588 {
589 projTri.V[i] = GetXZ(triangle.V[i]);
590 }
591 projEnd0.X = end0.X;
592 projEnd0.Y = end0.Z;
593 projEnd1.X = end1.X;
594 projEnd1.Y = end1.Z;
595 }
596 else
597 {
598 // Project onto xy-plane.
599 for (i = 0; i < 3; ++i)
600 {
601 projTri.V[i] = GetXY(triangle.V[i]);
602 }
603 projEnd0.X = end0.X;
604 projEnd0.Y = end0.Y;
605 projEnd1.X = end1.X;
606 projEnd1.Y = end1.Y;
607 }
608
611 if (!calc.Find(Tolerance))
612 {
613 return 0;
614 }
615
616 int Quantity = 0;
617
620 {
621 Quantity = 2;
622 intr[0] = calc.Point0;
623 intr[1] = calc.Point1;
624 }
625 else
626 {
628 //"Intersection must be a point\n";
629 Quantity = 1;
630 intr[0] = calc.Point0;
631 }
632
633 TVector<Real>* OutPts[2]{ &OutA, &OutB };
634
635 // Unproject the segment of intersection.
636 if (maxNormal == 0)
637 {
638 Real invNX = ((Real)1) / plane.Normal.X;
639 for (i = 0; i < Quantity; ++i)
640 {
641 Real y = intr[i].X;
642 Real z = intr[i].Y;
643 Real x = invNX * (plane.Constant - plane.Normal.Y * y - plane.Normal.Z * z);
644 *OutPts[i] = TVector<Real>(x, y, z);
645 }
646 }
647 else if (maxNormal == 1)
648 {
649 Real invNY = ((Real)1) / plane.Normal.Y;
650 for (i = 0; i < Quantity; ++i)
651 {
652 Real x = intr[i].X;
653 Real z = intr[i].Y;
654 Real y = invNY * (plane.Constant - plane.Normal.X * x - plane.Normal.Z * z);
655 *OutPts[i] = TVector<Real>(x, y, z);
656 }
657 }
658 else
659 {
660 Real invNZ = ((Real)1) / plane.Normal.Z;
661 for (i = 0; i < Quantity; ++i)
662 {
663 Real x = intr[i].X;
664 Real y = intr[i].Y;
665 Real z = invNZ * (plane.Constant - plane.Normal.X * x - plane.Normal.Y * y);
666 *OutPts[i] = TVector<Real>(x, y, z);
667 }
668 }
669
670 return Quantity;
671 }
672
673
674protected:
675
676
677 bool ContainsPoint(const TTriangle3<Real>& triangle, const TPlane3<Real>& plane, const TVector<Real>& point)
678 {
679 // Generate a coordinate system for the plane. The incoming triangle has
680 // vertices <V0,V1,V2>. The incoming plane has unit-length normal N.
681 // The incoming point is P. V0 is chosen as the origin for the plane. The
682 // coordinate axis directions are two unit-length vectors, U0 and U1,
683 // constructed so that {U0,U1,N} is an orthonormal set. Any point Q
684 // in the plane may be written as Q = V0 + x0*U0 + x1*U1. The coordinates
685 // are computed as x0 = Dot(U0,Q-V0) and x1 = Dot(U1,Q-V0).
688
689 // Compute the planar coordinates for the points P, V1, and V2. To
690 // simplify matters, the origin is subtracted from the points, in which
691 // case the planar coordinates are for P-V0, V1-V0, and V2-V0.
692 TVector<Real> PmV0 = point - triangle.V[0];
693 TVector<Real> V1mV0 = triangle.V[1] - triangle.V[0];
694 TVector<Real> V2mV0 = triangle.V[2] - triangle.V[0];
695
696 // The planar representation of P-V0.
697 TVector2<Real> ProjP(U0.Dot(PmV0), U1.Dot(PmV0));
698
699 // The planar representation of the triangle <V0-V0,V1-V0,V2-V0>.
701
702 // Test whether P-V0 is in the triangle <0,V1-V0,V2-V0>.
703 if (ProjT.IsInsideOrOn_Oriented(ProjP) <= 0)
704 {
707 Quantity = 1;
708 Points[0] = point;
709 return true;
710 }
711
712 return false;
713 }
714
715
732
733
734
735
737 {
738 // Project triangles onto coordinate plane most aligned with plane
739 // normal.
740 int maxNormal = 0;
741 Real fmax = FMath::Abs(plane.Normal.X);
742 Real absMax = FMath::Abs(plane.Normal.Y);
743 if (absMax > fmax)
744 {
745 maxNormal = 1;
746 fmax = absMax;
747 }
748 absMax = FMath::Abs(plane.Normal.Z);
749 if (absMax > fmax)
750 {
751 maxNormal = 2;
752 }
753
755 int i;
756
757 if (maxNormal == 0)
758 {
759 // Project onto yz-plane.
760 for (i = 0; i < 3; ++i)
761 {
762 projTri0.V[i] = GetYZ(tri0.V[i]);
763 projTri1.V[i] = GetYZ(tri1.V[i]);
764 }
765 }
766 else if (maxNormal == 1)
767 {
768 // Project onto xz-plane.
769 for (i = 0; i < 3; ++i)
770 {
771 projTri0.V[i] = GetXZ(tri0.V[i]);
772 projTri1.V[i] = GetXZ(tri1.V[i]);
773 }
774 }
775 else
776 {
777 // Project onto xy-plane.
778 for (i = 0; i < 3; ++i)
779 {
780 projTri0.V[i] = GetXY(tri0.V[i]);
781 projTri1.V[i] = GetXY(tri1.V[i]);
782 }
783 }
784
785 // 2D triangle intersection routines require counterclockwise ordering.
789 if (DotPerp(edge0, edge1) < (Real)0)
790 {
791 // Triangle is clockwise, reorder it.
792 save = projTri0.V[1];
793 projTri0.V[1] = projTri0.V[2];
794 projTri0.V[2] = save;
795 }
796
797 edge0 = projTri1.V[1] - projTri1.V[0];
798 edge1 = projTri1.V[2] - projTri1.V[0];
799 if (DotPerp(edge0, edge1) < (Real)0)
800 {
801 // Triangle is clockwise, reorder it.
802 save = projTri1.V[1];
803 projTri1.V[1] = projTri1.V[2];
804 projTri1.V[2] = save;
805 }
806
808 if (!intr.Find()) // TODO: pass tolerance through? note this is sos'd currently so it doesn't have a tolerance concept
809 {
810 return false;
811 }
812
813 // Map 2D intersections back to the 3D triangle space.
814 Quantity = intr.Quantity;
815 if (maxNormal == 0)
816 {
817 Real invNX = ((Real)1) / plane.Normal.X;
818 for (i = 0; i < Quantity; i++)
819 {
820 Real y = intr.Points[i].X;
821 Real z = intr.Points[i].Y;
822 Real x = invNX * (plane.Constant - plane.Normal.Y * y - plane.Normal.Z * z);
823 Points[i] = TVector<Real>(x, y, z);
824 }
825 }
826 else if (maxNormal == 1)
827 {
828 Real invNY = ((Real)1) / plane.Normal.Y;
829 for (i = 0; i < Quantity; i++)
830 {
831 Real x = intr.Points[i].X;
832 Real z = intr.Points[i].Y;
833 Real y = invNY * (plane.Constant - plane.Normal.X * x - plane.Normal.Z * z);
834 Points[i] = TVector<Real>(x, y, z);
835 }
836 }
837 else
838 {
839 Real invNZ = ((Real)1) / plane.Normal.Z;
840 for (i = 0; i < Quantity; i++)
841 {
842 Real x = intr.Points[i].X;
843 Real y = intr.Points[i].Y;
844 Real z = invNZ * (plane.Constant - plane.Normal.X * x - plane.Normal.Y * y);
845 Points[i] = TVector<Real>(x, y, z);
846 }
847 }
848
851 return true;
852 }
853
854
855
856
857
858
859
860};
861
864
865} // end namespace UE::Geometry
866} // end namespace UE
#define checkSlow(expr)
Definition AssertionMacros.h:332
#define ensure( InExpression)
Definition AssertionMacros.h:464
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
EIntersectionResult
Definition VectorUtil.h:10
EIntersectionType
Definition VectorUtil.h:18
Definition MathUtil.h:150
Definition IntrSegment2Triangle2.h:28
Definition IntrTriangle2Triangle2.h:23
Definition IntrTriangle3Triangle3.h:33
bool Find()
Definition IntrTriangle3Triangle3.h:140
bool IntersectsSegment(const TPlane3< Real > &plane, const TTriangle3< Real > &triangle, const TVector< Real > &end0, const TVector< Real > &end1)
Definition IntrTriangle3Triangle3.h:716
TTriangle3< Real > Triangle0
Definition IntrTriangle3Triangle3.h:36
void SetResultNone()
Definition IntrTriangle3Triangle3.h:79
bool ContainsPoint(const TTriangle3< Real > &triangle, const TPlane3< Real > &plane, const TVector< Real > &point)
Definition IntrTriangle3Triangle3.h:677
void SetResult(const TVector< Real > &A, const TVector< Real > &B)
Definition IntrTriangle3Triangle3.h:67
int Quantity
Definition IntrTriangle3Triangle3.h:53
TVector< Real > Points[6]
Definition IntrTriangle3Triangle3.h:54
EIntersectionResult Result
Definition IntrTriangle3Triangle3.h:48
void SetTolerance(Real ToleranceIn)
Definition IntrTriangle3Triangle3.h:127
void SetResult(bool IsIntersecting)
Definition IntrTriangle3Triangle3.h:89
bool GetCoplanarIntersection(const TPlane3< Real > &plane, const TTriangle3< Real > &tri0, const TTriangle3< Real > &tri1)
Definition IntrTriangle3Triangle3.h:736
TIntrTriangle3Triangle3 * Compute()
Definition IntrTriangle3Triangle3.h:133
Real GetTolerance() const
Definition IntrTriangle3Triangle3.h:108
void SetTriangle0(const TTriangle3< Real > &Triangle0In)
Definition IntrTriangle3Triangle3.h:112
void SetReportCoplanarIntersection(bool bReportCoplanarIntersectionIn)
Definition IntrTriangle3Triangle3.h:122
TIntrTriangle3Triangle3()
Definition IntrTriangle3Triangle3.h:56
static void TrianglePlaneRelations(const TTriangle3< Real > &triangle, const TPlane3< Real > &plane, TVector< Real > &distance, FIndex3i &sign, int &positive, int &negative, int &zero, Real Tolerance)
Definition IntrTriangle3Triangle3.h:501
TIntrTriangle3Triangle3(const TTriangle3< Real > &T0, const TTriangle3< Real > &T1)
Definition IntrTriangle3Triangle3.h:58
void SetTriangle1(const TTriangle3< Real > &Triangle1In)
Definition IntrTriangle3Triangle3.h:117
TTriangle3< Real > Triangle1
Definition IntrTriangle3Triangle3.h:36
TTriangle3< Real > GetTriangle1() const
Definition IntrTriangle3Triangle3.h:100
static int IntersectTriangleWithCoplanarSegment(const TPlane3< Real > &plane, const TTriangle3< Real > &triangle, const TVector< Real > &end0, const TVector< Real > &end1, TVector< Real > &OutA, TVector< Real > &OutB, Real Tolerance)
Definition IntrTriangle3Triangle3.h:545
static void ProjectOntoAxis(const TTriangle3< Real > &triangle, const TVector< Real > &axis, Real &fmin, Real &fmax)
Definition IntrTriangle3Triangle3.h:471
bool GetReportCoplanarIntersection() const
Definition IntrTriangle3Triangle3.h:104
bool Test()
Definition IntrTriangle3Triangle3.h:281
Real Tolerance
Definition IntrTriangle3Triangle3.h:37
EIntersectionType Type
Definition IntrTriangle3Triangle3.h:49
TTriangle3< Real > GetTriangle0() const
Definition IntrTriangle3Triangle3.h:96
static bool Intersects(const TTriangle3< Real > &Triangle0, const TTriangle3< Real > &Triangle1, Real Tolerance=TMathUtil< Real >::ZeroTolerance)
Definition IntrTriangle3Triangle3.h:386
bool bReportCoplanarIntersection
Definition IntrTriangle3Triangle3.h:42
void MakePerpVectors(const TVector< RealType > &Normal, TVector< RealType > &OutPerp1, TVector< RealType > &OutPerp2)
Definition VectorUtil.h:211
constexpr UE::Math::TVector2< T > GetXZ(const UE::Math::TVector< T > &V)
Definition VectorTypes.h:268
TIntrTriangle3Triangle3< double > FIntrTriangle3Triangle3d
Definition IntrTriangle3Triangle3.h:863
UE::Math::TVector< T > UnitCross(const UE::Math::TVector< T > &V1, const UE::Math::TVector< T > &V2)
Definition VectorTypes.h:231
constexpr T DotPerp(const UE::Math::TVector2< T > &V1, const UE::Math::TVector2< T > &V2)
Definition VectorTypes.h:19
TIntrTriangle3Triangle3< float > FIntrTriangle3Triangle3f
Definition IntrTriangle3Triangle3.h:862
constexpr UE::Math::TVector2< T > GetYZ(const UE::Math::TVector< T > &V)
Definition VectorTypes.h:274
constexpr UE::Math::TVector2< T > GetXY(const UE::Math::TVector< T > &V)
Definition VectorTypes.h:262
Definition Sphere.cpp:10
Definition AdvancedWidgetsModule.cpp:13
Definition IndexTypes.h:158
Definition PlaneTypes.h:21
double DistanceTo(const UE::Math::TVector< RealType > &P) const
Definition PlaneTypes.h:88
RealType Constant
Definition PlaneTypes.h:23
TVector< RealType > Normal
Definition PlaneTypes.h:22
Definition SegmentTypes.h:23
Definition TriangleTypes.h:39
TVector2< RealType > V[3]
Definition TriangleTypes.h:40
Definition TriangleTypes.h:263
TVector< RealType > V[3]
Definition TriangleTypes.h:264
Definition Vector2D.h:38
Definition Vector.h:51
T Z
Definition Vector.h:68
T Y
Definition Vector.h:65
T X
Definition Vector.h:62