FLImaging 6.9.12.2
FL3DObjectSpatialManager.h
1#pragma once
2#include "Definitions3D.h"
3#include "FLPoint3.h"
4
5namespace FLImaging
6{
7 namespace Foundation
8 {
9 class CFL3DObject;
10 class CInternal3DObjectSpatialManager;
11
12 class FL_EXPORT CFL3DObjectSpatialManager : public Base::CFLBase
13 {
14 public:
15 typedef struct sIntersection
16 {
17 double f64T;
18 CFLPoint3<float> flp3Intersection;
19 CFLPoint3<float> flp3Normal;
20 E3DIntersectionBasis ePrimType;
21 int32_t i32ObjectIndex;
22 int32_t i32PrimIndex;
23 CFLPoint3<float> flp3Centroid;
24 }SIntersection;
25
26 public:
27 CFL3DObjectSpatialManager();
28 virtual ~CFL3DObjectSpatialManager();
29
30 const CResult Build(const std::vector<const CFL3DObject*>& objects);
31 std::vector<SIntersection> IntersectLine(const CFLPoint3<float>& flp3Origin, const CFLPoint3<float>& flp3Direction) const;
32 std::vector<SIntersection> IntersectRay(const CFLPoint3<float>& flp3Origin, const CFLPoint3<float>& flp3Direction) const;
33 std::vector<SIntersection> IntersectSegment(const CFLPoint3<float>& flp3Start, const CFLPoint3<float>& flp3End) const;
34
35 void SetBackfaceCulling(bool bSet);
36 void SetEpsilon(double f64Epsilon);
37
38
39 DeclareGetClassType();
40
41 protected:
42 CInternal3DObjectSpatialManager* m_pInternal;
43 std::vector<const CFL3DObject*>& m_vct3DObjects;
44 double m_f64VertexPickRadius;
45 double m_f64SegPickRadius;
46 bool m_bBackfaceCulling;
47 double m_f64Epsilon;
48
49 friend class CInternal3DObjectSpatialManager;
50 };
51 }
52}
53
3D 객체의 데이터를 표현하는 클래스
Definition FL3DObject.h:39
Definition AlgorithmBase.h:16
E3DIntersectionBasis
교차(픽킹/충돌) 판정 시 CFL3DObject 의 어떤 프리미티브 기반으로 계산할지 지정합니다. 각 옵션은 특정 토폴로지 스트림(정점, 세그먼트,...
Definition Definitions3D.h:284