![]() |
RobWorkProject
23.9.11-
|
class representing an Bounding sphere More...
#include <BSphere.hpp>
Inherits BV< rw::geometry::BSphere< double > >.
Public Types | |
typedef T | value_type |
![]() | |
typedef rw::geometry::BSphere< double > | DerivedType |
typedef rw::geometry::BSphere< double > | BVType |
typedef Traits< rw::geometry::BSphere< double > >::value_type | value_type |
typedef rw::core::Ptr< BV< rw::geometry::BSphere< double > > > | Ptr |
Public Member Functions | |
BSphere (T radius=1.0) | |
constructor using sphere center of (0, 0, 0) More... | |
BSphere (const rw::math::Vector3D< T > &pos, T radius=1.0) | |
constructor setting both sphere center and radius More... | |
BSphere (const rw::geometry::BSphere< T > &bs) | |
Copy constroctor. More... | |
const rw::math::Vector3D< T > & | getPosition () const |
get the position of the sphere center More... | |
void | setPosition (const rw::math::Vector3D< T > &p3d) |
set the sphere center coordinate More... | |
const T & | getRadius () const |
get the sphere radius More... | |
const T | getRadiusSqr () const |
get the sphere radius^2 More... | |
T | calcArea () const |
get the surface area More... | |
T | calcVolume () const |
get the volume More... | |
![]() | |
const rw::math::Vector3D< value_type > & | getPosition () const |
value_type | calcArea () const |
value_type | calcVolume () const |
Static Public Member Functions | |
static BSphere< T > | fitEigen (const rw::geometry::TriMesh &tris) |
fit a sphere in $O(n)$ to a triangle mesh using Principal Component Analysis (PCA) where the eigen values of the vertices are used to compute the center of the sphere using the vector with the maximum spread (largest eigenvalue). More... | |
static BSphere< T > | fitEigen (const rw::core::Ptr< rw::geometry::TriMesh > &tris) |
static BSphere< T > | fitEigen (const rw::core::Ptr< rw::geometry::GeometryData > &tris) |
Friends | |
std::ostream & | operator<< (std::ostream &os, const BSphere< T > &sphere) |
Ouputs BSphere to stream. More... | |
class representing an Bounding sphere
|
inline |
constructor using sphere center of (0, 0, 0)
radius | [in] set the radius of the sphere |
|
inline |
constructor setting both sphere center and radius
pos | [in] the position of the center of the sphere |
radius | [in] set the radius of the sphere |
|
inline |
Copy constroctor.
bs | [in] object to copy |
|
inline |
get the surface area
|
inline |
get the volume
|
static |
fit a sphere in $O(n)$ to a triangle mesh using Principal Component Analysis (PCA) where the eigen values of the vertices are used to compute the center of the sphere using the vector with the maximum spread (largest eigenvalue).
tris | [in] input mesh |
|
inline |
get the position of the sphere center
|
inline |
get the sphere radius
|
inline |
get the sphere radius^2
|
inline |
set the sphere center coordinate
p3d | [in] the new center coordinates |
|
friend |