87 if (aVertices.empty())
89 point topLeft{ aTransformation * aVertices[0] };
91 for (
auto const& v : aVertices)
93 auto const tv = aTransformation * v;
94 topLeft.
x = std::min<coordinate>(topLeft.x, tv.x);
95 topLeft.y = std::min<coordinate>(topLeft.y, tv.y);
96 topLeft.z = std::min<coordinate>(topLeft.z, tv.z);
97 bottomRight.
x = std::max<coordinate>(bottomRight.
x, tv.x);
98 bottomRight.
y = std::max<coordinate>(bottomRight.
y, tv.y);
99 bottomRight.
z = std::max<coordinate>(bottomRight.
z, tv.z);
101 return rect{ topLeft, bottomRight };
107 if (aVertices.empty())
109 point topLeft{ aTransformation * aVertices[0].xyz };
111 for (
auto const& v : aVertices)
113 auto const tv = aTransformation * v.xyz;
114 topLeft.
x = std::min<coordinate>(topLeft.x, tv.x);
115 topLeft.y = std::min<coordinate>(topLeft.y, tv.y);
116 bottomRight.
x = std::max<coordinate>(bottomRight.
x, tv.x);
117 bottomRight.
y = std::max<coordinate>(bottomRight.
y, tv.y);
119 return rect{ topLeft, bottomRight };
124 if (aVertices.empty())
126 point topLeft{ aTransformation * aVertices[
static_cast<vertices::size_type
>(aFaces[0][
static_cast<uint32_t
>(0)]) + aOffset] };
127 point bottomRight = topLeft;
128 for (
auto const& f : aFaces)
130 for (faces::size_type fv = 0; fv < 3; ++fv)
132 auto const& v = aTransformation * aVertices[
static_cast<vertices::size_type
>(f[
static_cast<uint32_t
>(fv)]) + aOffset];
133 topLeft.
x = std::min<coordinate>(topLeft.x, v.x);
134 topLeft.y = std::min<coordinate>(topLeft.y, v.y);
135 bottomRight.
x = std::max<coordinate>(bottomRight.
x, v.x);
136 bottomRight.
y = std::max<coordinate>(bottomRight.
y, v.y);
139 return rect{ topLeft, bottomRight };
145 if (aVertices.empty())
147 point topLeft{ aTransformation * aVertices[
static_cast<typename Container::size_type
>(aFaces[0][
static_cast<uint32_t
>(0)]) + aOffset].xyz };
148 point bottomRight = topLeft;
149 for (
auto const& f : aFaces)
151 for (faces::size_type fv = 0; fv < 3; ++fv)
153 auto const& v = aTransformation * aVertices[
static_cast<typename Container::size_type
>(f[
static_cast<uint32_t
>(fv)]) + aOffset].xyz;
154 topLeft.
x = std::min<coordinate>(topLeft.x, v.x);
155 topLeft.y = std::min<coordinate>(topLeft.y, v.y);
156 bottomRight.
x = std::max<coordinate>(bottomRight.
x, v.x);
157 bottomRight.
y = std::max<coordinate>(bottomRight.
y, v.y);
160 return rect{ topLeft, bottomRight };