23#ifndef VCL_MESH_COMPONENTS_BOUNDING_BOX_H
24#define VCL_MESH_COMPONENTS_BOUNDING_BOX_H
26#include "bases/component.h"
28#include <vclib/concepts/mesh/components/bounding_box.h>
29#include <vclib/space/core/box.h>
61 PointConcept PointType,
62 typename ParentElemType = void,
66 BoundingBox<PointType, ParentElemType, OPT>,
70 !std::is_same_v<ParentElemType, void>,
73 using Base = Component<
78 !std::is_same_v<ParentElemType, void>,
110 template<
typename Element>
111 void importFrom(
const Element& e,
bool =
true)
114 using ScalarType = PointType::ScalarType;
119 void serialize(std::ostream& os)
const {
boundingBox().serialize(os); }
121 void deserialize(std::istream& is) {
boundingBox().deserialize(is); }
138bool isBoundingBoxAvailableOn(
const ElementOrMeshConcept
auto& element)
140 return isComponentAvailableOn<CompId::BOUNDING_BOX>(element);
158template<
typename S,
typename ElementType =
void,
bool OPT = false>
173template<
typename ElementType =
void,
bool OPT = false>
188template<
typename ElementType =
void,
bool OPT = false>
The Element class.
Definition element.h:57
A class representing a line segment in n-dimensional space. The class is parameterized by a PointConc...
Definition segment.h:43
The BoundingBox component class represents an axis aligned bounding box. This class is usually used a...
Definition bounding_box.h:72
const BoundingBoxType & boundingBox() const
Returns a const reference to the bounding box of this object.
Definition bounding_box.h:100
BoundingBoxType & boundingBox()
Returns a reference to the bounding box of this object.
Definition bounding_box.h:106
BoundingBox()=default
Initilizes the bounding box to an invalid bounding box.
HasBoundingBox concept is satisfied only if a Element or Mesh class provides the member functions spe...
Definition bounding_box.h:39