FLImaging 7.6.11.1
TRange4.h
1#pragma once
2
10
11#include "FLLibTags.h"
12#include "TPoint4.h"
13
15namespace FLImaging
16{
18 namespace Base
19 {
31 #pragma pack(push, 1)
32 template <typename T>
33 class FL_EXPORT TRange4
34 {
35 public:
44
53 {
54 }
55
66 {
67 memcpy(tpPoints, tr.tpPoints, sizeof(tpPoints));
68 }
69
81 TRange4(const TPoint4<T>& tpLB, const TPoint4<T>& tpUB)
82 {
83 tpPoints[0].Set(tpLB);
84 tpPoints[1].Set(tpUB);
85 }
86
110 TRange4(T tLBX, T tLBY, T tLBZ, T tLBT, T tUBX, T tUBY, T tUBZ, T tUBT)
111 {
112 tpPoints[0].x = tLBX;
113 tpPoints[0].y = tLBY;
114 tpPoints[0].z = tLBZ;
115 tpPoints[0].t = tLBT;
116 tpPoints[1].x = tUBX;
117 tpPoints[1].y = tUBY;
118 tpPoints[1].z = tUBZ;
119 tpPoints[1].t = tUBT;
120 }
121
131 void Set(const TRange4<T>& tr)
132 {
133 memcpy(tpPoints, tr.tpPoints, sizeof(tpPoints));
134 }
135
147 void Set(const TPoint4<T>& tpLB, const TPoint4<T>& tpUB)
148 {
149 tpPoints[0].Set(tpLB);
150 tpPoints[1].Set(tpUB);
151 }
152
176 void Set(T tLBX, T tLBY, T tLBZ, T tLBT, T tUBX, T tUBY, T tUBZ, T tUBT)
177 {
178 tpPoints[0].x = tLBX;
179 tpPoints[0].y = tLBY;
180 tpPoints[0].z = tLBZ;
181 tpPoints[0].t = tLBT;
182 tpPoints[1].x = tUBX;
183 tpPoints[1].y = tUBY;
184 tpPoints[1].z = tUBZ;
185 tpPoints[1].t = tUBT;
186 }
187 };
188 #pragma pack(pop)
189
190 typedef TRange4<int16_t> TRange4S;
191 typedef TRange4<uint16_t> TRange4US;
192 typedef TRange4<int32_t> TRange4L;
193 typedef TRange4<uint32_t> TRange4UL;
194 typedef TRange4<int64_t> TRange4LL;
195 typedef TRange4<uint64_t> TRange4ULL;
196 typedef TRange4<float> TRange4F;
197 typedef TRange4<double> TRange4D;
198 }
199}
Simplified class representing a 4-D point.
Definition TPoint4.h:37
TRange4(const TPoint4< T > &tpLB, const TPoint4< T > &tpUB)
Constructs a 4D range using lower and upper bound points.
Definition TRange4.h:81
void Set(const TPoint4< T > &tpLB, const TPoint4< T > &tpUB)
Sets the range using lower and upper bound points.
Definition TRange4.h:147
void Set(const TRange4< T > &tr)
Sets the range from another TRange4 object.
Definition TRange4.h:131
TRange4(const TRange4< T > &tr)
Copy constructor.
Definition TRange4.h:65
TPoint4< int16_t > tpPoints[2]
Definition TRange4.h:43
TRange4(T tLBX, T tLBY, T tLBZ, T tLBT, T tUBX, T tUBY, T tUBZ, T tUBT)
Constructs a 4D range using lower and upper bound coordinates.
Definition TRange4.h:110
TRange4()
Default constructor.
Definition TRange4.h:52
void Set(T tLBX, T tLBY, T tLBZ, T tLBT, T tUBX, T tUBY, T tUBZ, T tUBT)
Sets the range using lower and upper bound coordinates.
Definition TRange4.h:176
Definition AESCryptography.h:18