23#ifndef VCL_MESH_COMPONENTS_BOUNDING_BOX_H
24#define VCL_MESH_COMPONENTS_BOUNDING_BOX_H
26#include "base/component.h"
27#include "base/predicates.h"
29#include <vclib/space/core.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);
136template<Po
intConcept Po
intType,
typename ParentElemType,
bool OPT>
137template<
typename Element>
138void BoundingBox<PointType, ParentElemType, OPT>::importFrom(
143 using ScalarType = PointType::ScalarType;
144 boundingBox() = e.boundingBox().template cast<ScalarType>();
161bool isBoundingBoxAvailableOn(
const auto& element)
181template<
typename S,
typename ElementType =
void,
bool OPT = false>
196template<
typename ElementType =
void,
bool OPT = false>
211template<
typename ElementType =
void,
bool OPT = false>
A class representing a box in N-dimensional space.
Definition box.h:46
void deserialize(std::istream &is)
Deserializes the box from the given input stream.
Definition box.h:476
void serialize(std::ostream &os) const
Serializes the box to the given output stream.
Definition box.h:466
The Element class.
Definition element.h:75
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.
A concept that checks whether a type T (that should be a Mesh) has the BoundingBox component (inherit...
Definition bounding_box.h:132
auto boundingBox(const PointType &p)
Compute the bounding box of a single point.
Definition bounding_box.h:59