FLImaging 7.6.11.1
TRange3.h
1#pragma once
2
10
11#include "FLLibTags.h"
12#include "TPoint3.h"
13
15namespace FLImaging
16{
18 namespace Base
19 {
31 #pragma pack(push, 1)
32 template <typename T>
33 class FL_EXPORT TRange3
34 {
35 public:
44
53 {
54 }
55
66 {
67 memcpy(tpPoints, tr.tpPoints, sizeof(tpPoints));
68 }
69
81 TRange3(const TPoint3<T>& tpLB, const TPoint3<T>& tpUB)
82 {
83 tpPoints[0].Set(tpLB);
84 tpPoints[1].Set(tpUB);
85 }
86
106 TRange3(T tLBX, T tLBY, T tLBZ, T tUBX, T tUBY, T tUBZ)
107 {
108 tpPoints[0].x = tLBX;
109 tpPoints[0].y = tLBY;
110 tpPoints[0].z = tLBZ;
111 tpPoints[1].x = tUBX;
112 tpPoints[1].y = tUBY;
113 tpPoints[1].z = tUBZ;
114 }
115
125 void Set(const TRange3<T>& tr)
126 {
127 memcpy(tpPoints, tr.tpPoints, sizeof(tpPoints));
128 }
129
141 void Set(const TPoint3<T>& tpLB, const TPoint3<T>& tpUB)
142 {
143 tpPoints[0].Set(tpLB);
144 tpPoints[1].Set(tpUB);
145 }
146
166 void Set(T tLBX, T tLBY, T tLBZ, T tUBX, T tUBY, T tUBZ)
167 {
168 tpPoints[0].x = tLBX;
169 tpPoints[0].y = tLBY;
170 tpPoints[0].z = tLBZ;
171 tpPoints[1].x = tUBX;
172 tpPoints[1].y = tUBY;
173 tpPoints[1].z = tUBZ;
174 }
175 };
176 #pragma pack(pop)
177
178 typedef TRange3<int16_t> TRange3S;
179 typedef TRange3<uint16_t> TRange3US;
180 typedef TRange3<int32_t> TRange3L;
181 typedef TRange3<uint32_t> TRange3UL;
182 typedef TRange3<int64_t> TRange3LL;
183 typedef TRange3<uint64_t> TRange3ULL;
184 typedef TRange3<float> TRange3F;
185 typedef TRange3<double> TRange3D;
186 }
187}
Simplified class representing a 3-D point.
Definition TPoint3.h:37
void Set(T tLBX, T tLBY, T tLBZ, T tUBX, T tUBY, T tUBZ)
Sets the range using lower and upper bound coordinates.
Definition TRange3.h:166
void Set(const TPoint3< T > &tpLB, const TPoint3< T > &tpUB)
Sets the range using lower and upper bound points.
Definition TRange3.h:141
TRange3(const TPoint3< T > &tpLB, const TPoint3< T > &tpUB)
Constructs a 3D range using lower and upper bound points.
Definition TRange3.h:81
void Set(const TRange3< T > &tr)
Sets the range from another TRange3 object.
Definition TRange3.h:125
TRange3(T tLBX, T tLBY, T tLBZ, T tUBX, T tUBY, T tUBZ)
Constructs a 3D range using lower and upper bound coordinates.
Definition TRange3.h:106
TPoint3< int16_t > tpPoints[2]
Definition TRange3.h:43
TRange3()
Default constructor.
Definition TRange3.h:52
TRange3(const TRange3< T > &tr)
Copy constructor.
Definition TRange3.h:65
Definition AESCryptography.h:18