107auto boxVertex(
const BoxType& box, uint i) -> BoxType::PointType
109 using PointType = BoxType::PointType;
112 case 0:
return box.min();
113 case 1:
return PointType(box.max().x(), box.min().y(), box.min().z());
114 case 2:
return PointType(box.min().x(), box.max().y(), box.min().z());
115 case 3:
return PointType(box.max().x(), box.max().y(), box.min().z());
116 case 4:
return PointType(box.min().x(), box.min().y(), box.max().z());
117 case 5:
return PointType(box.max().x(), box.min().y(), box.max().z());
118 case 6:
return PointType(box.min().x(), box.max().y(), box.max().z());
119 case 7:
return box.max();
121 throw std::out_of_range(
"Invalid vertex index");
auto boxEdge(const BoxType &box, uint i) -> Segment< typename BoxType::PointType >
Returns the ith edge of a 3D box.
Definition box3.h:155