FLImaging 6.9.12.2
FLGeometry3DBoundingBox.h
1#pragma once
2#include "Definitions3D.h"
3
9
11namespace FLImaging
12{
14 namespace Foundation
15 {
16 template <typename Ty>
17 class FL_EXPORT CFLPoint3;
18
19 template <typename Ty>
20 class FL_EXPORT CFLGeometry3DDirection;
21
22 template <typename Ty>
23 class FL_EXPORT CMatrixFor3DTransform;
24
25 template <typename Ty>
26 class FL_EXPORT CFLGeometry3DLine;
27
28 template <typename Ty>
29 class FL_EXPORT CFLGeometry3DPlane;
30
40 template <typename Ty>
41 class FL_EXPORT CFLGeometry3DBoundingBox : public Base::CFLBase
42 {
43 public:
49
63 CFLGeometry3DBoundingBox(const CFLPoint3<Ty>& flp3Min, const CFLPoint3<Ty>& flp3Max);
64
77
90
105
120
131
140
148 void SetVoid();
149
161 void Set(const CFLPoint3<Ty>& flp3Point);
162
178 void Set(const CFLPoint3<Ty>& flp3Point, const CFLGeometry3DDirection<Ty>& dir);
179
189 Ty GetMargin() const;
190
200 void SetMargin(const Ty tMargin);
201
213 void Enlarge(const Ty tTolerance);
214
244 const CResult GetBoundingRange(Ty& tMinX, Ty& tMinY, Ty& tMinZ, Ty& tMaxX, Ty& tMaxY, Ty& tMaxZ) const;
245
267 const CResult GetCornerMin(CFLPoint3<Ty>& flp3CornerMin) const;
268
290 const CResult GetCornerMax(CFLPoint3<Ty>& flp3CornerMax) const;
291
300
309
318
327
336
345
356
366 bool IsXMinInfinite() const;
367
377 bool IsXMaxInfinite() const;
378
388 bool IsYMinInfinite() const;
389
399 bool IsYMaxInfinite() const;
400
410 bool IsZMinInfinite() const;
411
421 bool IsZMaxInfinite() const;
422
432 bool IsFullyInfinite() const;
433
443 bool IsVoid() const;
444
456 bool IsXDegenerate(const Ty tTolerance) const;
457
469 bool IsYDegenerate(const Ty tTolerance) const;
470
482 bool IsZDegenerate(const Ty tTolerance) const;
483
495 bool IsDegenerate(const Ty tTolerance) const;
496
515
532
552 void Include(const Ty tMinX, const Ty tMinY, const Ty tMinZ, const Ty tMaxX, const Ty tMaxY, const Ty tMaxZ);
553
567 void Include(const Ty tX, const Ty tY, const Ty tZ);
568
581
593 void Include(const CFLPoint3<Ty>& flp3Point);
594
610 void Include(const CFLPoint3<Ty>& flp3Point, const CFLGeometry3DDirection<Ty>& dir);
611
626
640 bool IsOutside(const CFLPoint3<Ty>& flp3Point) const;
641
655 bool IsOutside(const CFLGeometry3DLine<Ty>& line3D) const;
656
670 bool IsOutside(const CFLGeometry3DPlane<Ty>& plane3D) const;
671
683 bool IsOutside(const CFLGeometry3DBoundingBox<Ty>& boundingBox) const;
684
700 bool IsOutside(const CFLGeometry3DBoundingBox<Ty>& boundingBox, const CMatrixFor3DTransform<Ty>& trsf) const;
701
719 bool IsOutside(const CMatrixFor3DTransform<Ty>& trsfForThis, const CFLGeometry3DBoundingBox<Ty>& boundingBox, const CMatrixFor3DTransform<Ty>& trsfForOther) const;
720
740 bool IsOutside(const CFLPoint3<Ty>& flp3Point1, const CFLPoint3<Ty>& flp3Point2, const CFLGeometry3DDirection<Ty>& dir) const;
741
761 bool DoesFullyContain(const CFLGeometry3DBoundingBox<Ty>& boundingBox) const;
762
787 bool IntersectLine(const CFLPoint3<Ty>& flp3Origin, const CFLPoint3<Ty>& flp3Direction) const;
788
835 bool IntersectLine(const CFLPoint3<Ty>& flp3Origin, const CFLPoint3<Ty>& flp3Direction, double& t0, double& t1) const;
836
861 bool IntersectRay(const CFLPoint3<Ty>& flp3Origin, const CFLPoint3<Ty>& flp3Direction) const;
862
899 bool IntersectRay(const CFLPoint3<Ty>& flp3Origin, const CFLPoint3<Ty>& flp3Direction, double& t0, double& t1) const;
900
922 bool IntersectSegment(const CFLPoint3<Ty>& flp3Start, const CFLPoint3<Ty>& flp3End) const;
923
958 bool IntersectSegment(const CFLPoint3<Ty>& flp3Start, const CFLPoint3<Ty>& flp3End, double& t0, double& t1) const;
959
972
982 Ty GetSquareExtent() const;
983
1000
1010 bool HasFinitePart() const;
1011
1012 SupportToDuplicateObject(CFLGeometry3DBoundingBox<Ty>, *this);
1013 DeclareGetClassType();
1014
1015 protected:
1016 bool Intersect(E3DLineExtent eLineExtent, const CFLPoint3<Ty>& flp3Origin, const CFLPoint3<Ty>& flp3Second, double& t0, double& t1) const;
1017
1018 protected:
1019 Ty m_tMinX;
1020 Ty m_tMaxX;
1021 Ty m_tMinY;
1022 Ty m_tMaxY;
1023 Ty m_tMinZ;
1024 Ty m_tMaxZ;
1025 Ty m_tMargin;
1026 int32_t m_i32Flags;
1027 };
1028 }
1029}
FLImaging의 최상위 기저 클래스
Definition FLBase.h:36
FLImaging 모듈의 수행 결과 객체
Definition ResultsDef.h:1605
bool DoesFullyContain(const CFLGeometry3DBoundingBox< Ty > &boundingBox) const
bool IntersectLine(const CFLPoint3< Ty > &flp3Origin, const CFLPoint3< Ty > &flp3Direction, double &t0, double &t1) const
const CResult GetCornerMax(CFLPoint3< Ty > &flp3CornerMax) const
bool IsYDegenerate(const Ty tTolerance) const
bool IntersectRay(const CFLPoint3< Ty > &flp3Origin, const CFLPoint3< Ty > &flp3Direction) const
bool IntersectRay(const CFLPoint3< Ty > &flp3Origin, const CFLPoint3< Ty > &flp3Direction, double &t0, double &t1) const
const CResult Assign(const CFLGeometry3DBoundingBox< Ty > &rhs)
void Set(const CFLPoint3< Ty > &flp3Point)
virtual const CFLGeometry3DBoundingBox< Ty > & operator=(const CFLGeometry3DBoundingBox< Ty > &rhs)
bool IsOutside(const CFLGeometry3DBoundingBox< Ty > &boundingBox) const
bool IsOutside(const CFLPoint3< Ty > &flp3Point) const
const CResult Transform(const CMatrixFor3DTransform< Ty > &trsf)
bool IsDegenerate(const Ty tTolerance) const
void Include(const CFLPoint3< Ty > &flp3Point)
CFLGeometry3DBoundingBox< Ty > GetTransformedBoundingBox(const CMatrixFor3DTransform< Ty > &trsf) const
void Include(const CFLGeometry3DDirection< Ty > &dir)
bool IsOutside(const CMatrixFor3DTransform< Ty > &trsfForThis, const CFLGeometry3DBoundingBox< Ty > &boundingBox, const CMatrixFor3DTransform< Ty > &trsfForOther) const
void Set(const CFLPoint3< Ty > &flp3Point, const CFLGeometry3DDirection< Ty > &dir)
bool IsOutside(const CFLPoint3< Ty > &flp3Point1, const CFLPoint3< Ty > &flp3Point2, const CFLGeometry3DDirection< Ty > &dir) const
bool IntersectSegment(const CFLPoint3< Ty > &flp3Start, const CFLPoint3< Ty > &flp3End, double &t0, double &t1) const
CFLGeometry3DBoundingBox(const CFLPoint3< Ty > &flp3Min, const CFLPoint3< Ty > &flp3Max)
void Include(const Ty tX, const Ty tY, const Ty tZ)
void Include(const CFLGeometry3DBoundingBox< Ty > &rhs)
bool IsOutside(const CFLGeometry3DPlane< Ty > &plane3D) const
CFLGeometry3DBoundingBox(const CFLGeometry3DBoundingBox< Ty > &rhs)
void Include(const CFLPoint3< Ty > &flp3Point, const CFLGeometry3DDirection< Ty > &dir)
const CResult GetCornerMin(CFLPoint3< Ty > &flp3CornerMin) const
bool IsOutside(const CFLGeometry3DBoundingBox< Ty > &boundingBox, const CMatrixFor3DTransform< Ty > &trsf) const
const CResult Assign(const CFLGeometry3DBoundingBox< Ty > *pRhs)
bool IntersectLine(const CFLPoint3< Ty > &flp3Origin, const CFLPoint3< Ty > &flp3Direction) const
bool IsZDegenerate(const Ty tTolerance) const
void Include(const Ty tMinX, const Ty tMinY, const Ty tMinZ, const Ty tMaxX, const Ty tMaxY, const Ty tMaxZ)
bool IntersectSegment(const CFLPoint3< Ty > &flp3Start, const CFLPoint3< Ty > &flp3End) const
Ty GetDistance(const CFLGeometry3DBoundingBox< Ty > &rhs) const
bool IsOutside(const CFLGeometry3DLine< Ty > &line3D) const
CFLGeometry3DBoundingBox< Ty > GetFinitePart() const
bool IsXDegenerate(const Ty tTolerance) const
const CResult GetBoundingRange(Ty &tMinX, Ty &tMinY, Ty &tMinZ, Ty &tMaxX, Ty &tMaxY, Ty &tMaxZ) const
CFLGeometry3DBoundingBox(const CFLGeometry3DBoundingBox< Ty > *pRhs)
3D 공간 상의 방향 벡터를 표현하는 클래스
Definition FLGeometry3DDirection.h:32
원점과 단위 벡터로 표현되는 3D 공간 상의 직선을 표현하는 클래스
Definition FLGeometry3DLine.h:26
원점과 X 방향, Y 방향을 가진 3D 공간 상의 평면을 표현하는 클래스
Definition FLGeometry3DPlane.h:35
3차원 점을 표현하는 클래스
Definition FLPoint3.h:36
3D 공간 상에서의 변환을 용이하게 하기 위한 목적의 행렬 클래스
Definition MatrixFor3DTransform.h:35
Definition AlgorithmBase.h:16
E3DLineExtent
교차 판정에서 사용하는 선형 기하 요소의 매개변수 구간 유형입니다. 매개변수 (t) 가 무한 직선, 반직선, 유한 선분 중 무엇을 나타내는지 지정합니다.
Definition Definitions3D.h:214