LibCarna Version 3.4.0
Loading...
Searching...
No Matches
BoundingSphere.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 BOUNDINGSPHERE_H_6014714286
16#define BOUNDINGSPHERE_H_6014714286
17
18#include <LibCarna/LibCarna.hpp>
20
26namespace LibCarna
27{
28
29namespace base
30{
31
32
33
34// ----------------------------------------------------------------------------------
35// BoundingSphere
36// ----------------------------------------------------------------------------------
37
43class LIBCARNA BoundingSphere : public BoundingVolume
44{
45
46 struct Details;
47 const std::unique_ptr< Details > pimpl;
48
49public:
50
55 BoundingSphere( float radius );
56
60 virtual ~BoundingSphere();
61
66 float radius() const;
67
72 void setRadius( float radius );
73
74 virtual void computeClosemostPoint( math::Vector3f& out, const math::Vector3f& reference ) const override;
75
76}; // BoundingSphere
77
78
79
80} // namespace LibCarna :: base
81
82} // namespace LibCarna
83
84#endif // BOUNDINGSPHERE_H_6014714286
Defines LibCarna::base::BoundingVolume.
Contains forward-declarations.
Represents an association.
Defines a Geometry minimal boundary sphere.
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.
BoundingSphere(float radius)
Instantiates with radius.
void setRadius(float radius)
Sets the radius of this bounding sphere.
virtual ~BoundingSphere()
Deletes.
float radius() const
Tells the radius of this bounding sphere.
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