载入中...
搜索中...
未找到
EditingVolume.cpp
浏览该文件的文档.
2
3namespace eve::editing {
4
5void EditVolume::include(int x, int y, int z) {
6 if (empty()) {
7 minX = maxX = x;
8 minY = maxY = y;
9 minZ = maxZ = z;
10 return;
11 }
12 if (x < minX) minX = x;
13 if (x > maxX) maxX = x;
14 if (y < minY) minY = y;
15 if (y > maxY) maxY = y;
16 if (z < minZ) minZ = z;
17 if (z > maxZ) maxZ = z;
18}
19
20void EditVolume::include(const EditVolume& other) {
21 if (other.empty()) return;
22 include(other.minX, other.minY, other.minZ);
23 include(other.maxX, other.maxY, other.maxZ);
24}
25
27 EditRegion region;
28 if (!empty()) {
29 region.include(minX, minZ);
30 region.include(maxX, maxZ);
31 }
32 return region;
33}
34
35} // namespace eve::editing
float y
Definition AnimClip.cpp:738
float x
Definition AnimClip.cpp:738
float z
Definition AnimClip.cpp:738
EditRegion public API.
void include(int x, int y)
Include.
Integer axis-aligned volume invalidated by a 3D edit.
void include(int x, int y, int z)
Include.
EditRegion xzRegion() const
Xz region.
bool empty() const
Empty.