FLImaging 6.5.8.1
TRange4.h
1#pragma once
2
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:
36 TPoint4<T> tpPoints[2];
37
38
39 TRange4()
40 {
41 }
42
43 TRange4(const TRange4<T>& tq)
44 {
45 memcpy(tpPoints, tq.tpPoints, sizeof(tpPoints));
46 }
47
48 TRange4(const TPoint4<T>& tpLB, const TPoint4<T>& tpUB)
49 {
50 tpPoints[0].Set(tpLB);
51 tpPoints[1].Set(tpUB);
52 }
53
54 TRange4(T tLBX, T tLBY, T tLBZ, T tLBT, T tUBX, T tUBY, T tUBZ, T tUBT)
55 {
56 tpPoints[0].x = tLBX;
57 tpPoints[0].y = tLBY;
58 tpPoints[0].z = tLBZ;
59 tpPoints[0].t = tLBT;
60 tpPoints[1].x = tUBX;
61 tpPoints[1].y = tUBY;
62 tpPoints[1].z = tUBZ;
63 tpPoints[1].t = tUBT;
64 }
65
66 void Set(const TRange4<T>& tq)
67 {
68 memcpy(tpPoints, tq.tpPoints, sizeof(tpPoints));
69 }
70
71 void Set(const TPoint4<T>& tpLB, const TPoint4<T>& tpUB)
72 {
73 tpPoints[0].Set(tpLB);
74 tpPoints[1].Set(tpUB);
75 }
76
77 void Set(T tLBX, T tLBY, T tLBZ, T tLBT, T tUBX, T tUBY, T tUBZ, T tUBT)
78 {
79 tpPoints[0].x = tLBX;
80 tpPoints[0].y = tLBY;
81 tpPoints[0].z = tLBZ;
82 tpPoints[0].t = tLBT;
83 tpPoints[1].x = tUBX;
84 tpPoints[1].y = tUBY;
85 tpPoints[1].z = tUBZ;
86 tpPoints[1].t = tUBT;
87 }
88 };
89 #pragma pack(pop)
90
99 }
100}
Simplified class representing a 4-D point.
Definition TPoint4.h:37
Simplified class representing a 4D range.
Definition TRange4.h:34