Visual Computing Library
Loading...
Searching...
No Matches
vcl::comp::BoundingBox< PointType, ParentElemType, OPT > Class Template Reference

The BoundingBox component class represents an axis aligned bounding box. This class is usually used as a component of a Mesh. More...

#include <vclib/mesh/components/bounding_box.h>

Inheritance diagram for vcl::comp::BoundingBox< PointType, ParentElemType, OPT >:

Public Types

using BoundingBoxType = Box< PointType >
 Expose the type of the bounding box.
 

Public Member Functions

 BoundingBox ()=default
 Initilizes the bounding box to an invalid bounding box.
 
const BoundingBoxTypeboundingBox () const
 Returns a const reference to the bounding box of this object.
 
BoundingBoxTypeboundingBox ()
 Returns a reference to the bounding box of this object.
 

Protected Member Functions

template<typename Element >
void importFrom (const Element &e, bool=true)
 
void serialize (std::ostream &os) const
 
void deserialize (std::istream &is)
 

Private Types

using Base = Component< BoundingBox< PointType, ParentElemType, OPT >, CompId::BOUNDING_BOX, Box< PointType >, ParentElemType, !std::is_same_v< ParentElemType, void >, OPT >
 

Detailed Description

template<PointConcept PointType, typename ParentElemType = void, bool OPT = false>
class vcl::comp::BoundingBox< PointType, ParentElemType, OPT >

The BoundingBox component class represents an axis aligned bounding box. This class is usually used as a component of a Mesh.

The member functions of this class will be available in the instance of any Element or Mesh that will contain this component.

For example, if you have a Mesh m with the BoundingBox component, you'll be able to access to this component member functions from m:

m.boundingBox();
A class representing a line segment in n-dimensional space. The class is parameterized by a PointConc...
Definition segment.h:43
Note
This component can be both used for Elements and Meshes.
Template Parameters
PointTypeThe type of the point that will be used to represent the bounding box. This template argument must satisfy the PointConcept.
ParentElemTypeThis template argument must be void if the component needs to be stored horizontally, or the type of the parent element that will contain this component if the component needs to be stored vertically.
OPTIf true, the component will be optional. This argument is considered only if the component is stored vertically.

Member Function Documentation

◆ boundingBox() [1/2]

template<PointConcept PointType, typename ParentElemType = void, bool OPT = false>
BoundingBoxType & vcl::comp::BoundingBox< PointType, ParentElemType, OPT >::boundingBox ( )
inline

Returns a reference to the bounding box of this object.

Returns
A reference to the bounding box of this object.

◆ boundingBox() [2/2]

template<PointConcept PointType, typename ParentElemType = void, bool OPT = false>
const BoundingBoxType & vcl::comp::BoundingBox< PointType, ParentElemType, OPT >::boundingBox ( ) const
inline

Returns a const reference to the bounding box of this object.

Returns
A const reference to the bounding box of this object.

The documentation for this class was generated from the following file: