LibCarna Version 3.4.0
Loading...
Searching...
No Matches
BoundingBox.hpp
Go to the documentation of this file.
1/*
2 * Copyright (C) 2010 - 2016 Leonid Kostrykin
3 *
4 * Chair of Medical Engineering (mediTEC)
5 * RWTH Aachen University
6 * Pauwelsstr. 20
7 * 52074 Aachen
8 * Germany
9 *
10 *
11 * Copyright (C) 2021 - 2025 Leonid Kostrykin
12 *
13 */
14
15#ifndef BOUNDINGBOX_H_6014714286
16#define BOUNDINGBOX_H_6014714286
17
18#include <LibCarna/LibCarna.hpp>
20
26namespace LibCarna
27{
28
29namespace base
30{
31
32
33
34// ----------------------------------------------------------------------------------
35// BoundingBox
36// ----------------------------------------------------------------------------------
37
43class LIBCARNA BoundingBox : public BoundingVolume
44{
45
46 struct Details;
47 const std::unique_ptr< Details > pimpl;
48
49public:
50
56
59 BoundingBox( float width, float height, float depth );
60
64 virtual ~BoundingBox();
65
70 const math::Vector3f& size() const;
71
76 void setSize( const math::Vector3f& size );
77
80 void setSize( float width, float height, float depth );
81
82 virtual void computeClosemostPoint( math::Vector3f& out, const math::Vector3f& reference ) const override;
83
84}; // BoundingBox
85
86
87
88} // namespace LibCarna :: base
89
90} // namespace LibCarna
91
92#endif // BOUNDINGBOX_H_6014714286
Defines LibCarna::base::BoundingVolume.
Contains forward-declarations.
Represents an association.
Defines a Geometry minimal boundary box.
void setSize(const math::Vector3f &size)
Changes the size of this bounding box.
void setSize(float width, float height, float depth)
BoundingBox(float width, float height, float depth)
const math::Vector3f & size() const
Tells the size of this bounding box.
virtual ~BoundingBox()
Deletes.
virtual void computeClosemostPoint(math::Vector3f &out, const math::Vector3f &reference) const override
Computes the point out in model space that is close-most to reference, that is also in model space.
BoundingBox(const math::Vector3f &size)
Instantiates bounding box of size.
Represents a Geometry minimal boundary volume of simple geometric shape. The volume is centered withi...
Eigen::Matrix< float, 3, 1 > Vector3f
Defines vector.
Definition math.hpp:200