|
static double | estimateVolume (const std::vector< rw::core::Ptr< rw::geometry::Geometry >> &geoms) |
| Estimates the volume of a list of geometries. More...
|
|
static double | estimateVolume (const rw::geometry::TriMesh &trimesh) |
| Estimates the volume of a trimesh. More...
|
|
static std::pair< rw::math::Vector3D< double >, rw::math::InertiaMatrix<> > | estimateInertiaCOG (double mass, const std::vector< rw::core::Ptr< rw::geometry::Geometry >> &geoms, const rw::core::Ptr< rw::kinematics::Frame > ref, const rw::kinematics::State &state, const rw::math::Transform3D<> &reftrans=rw::math::Transform3D<>::identity()) |
| Estimates the inertia and center of gravity (COG) of a list of geometries. More...
|
|
static rw::math::InertiaMatrix | estimateInertia (double mass, const std::vector< rw::core::Ptr< rw::geometry::Geometry >> &geoms, const rw::core::Ptr< rw::kinematics::Frame > ref, const rw::kinematics::State &state, const rw::math::Transform3D<> &reftrans=rw::math::Transform3D<>::identity()) |
| Estimates the inertia of a list of geometries. More...
|
|
static rw::math::InertiaMatrix | estimateInertia (double mass, const std::vector< rw::core::Ptr< rw::geometry::Geometry >> &geoms, const rw::math::Transform3D<> &reftrans=rw::math::Transform3D<>::identity()) |
| Estimates the inertia of a list of geometries. More...
|
|
template<class T > |
static std::pair< rw::math::Rotation3D< T >, rw::math::Vector3D< T > > | calculatePrincipalInertia (const rw::math::InertiaMatrix< T > &inertia) |
| Find the principal axes and the principal inertia. More...
|
|
static rw::math::Vector3D< double > | estimateCOG (const std::vector< rw::core::Ptr< rw::geometry::Geometry >> &geoms) |
| Estimates the center of gravity (COG) of a list of geometries. More...
|
|
static rw::math::Vector3D< double > | estimateCOG (const std::vector< rw::core::Ptr< rw::geometry::Geometry >> &geoms, const rw::core::Ptr< rw::kinematics::Frame > ref, const rw::kinematics::State &state) |
| Estimates the center of gravity (COG) of a list of geometries. More...
|
|
static rw::math::Vector3D< double > | estimateCOG (const TriMesh &trimesh, const rw::math::Transform3D<> &t3d=rw::math::Transform3D<>::identity()) |
| Estimates the center of gravity (COG) of a triangle mesh. More...
|
|
static double | calcMaxDist (const std::vector< rw::core::Ptr< rw::geometry::Geometry >> &geoms, const rw::math::Vector3D< double > center, rw::core::Ptr< rw::kinematics::Frame > ref, const rw::kinematics::State &state) |
| calculates the max distance to any triangle in the geoms, from some point center More...
|
|
static std::vector< rw::kinematics::Frame * > | getAnchoredFrames (rw::kinematics::Frame &f, const rw::kinematics::State &state) |
| util function that locates all frames that is staticly connected to f and that has geometry information.
|
|
static std::vector< rw::kinematics::Frame * > | getAnchoredChildFrames (rw::core::Ptr< rw::kinematics::Frame > parent, const rw::kinematics::State &state) |
| util function that locates all frames in the sub tree of parent that is staticly connected and that has geometry information.
|
|
template<std::size_t N> |
static double | simplexVolume (const std::vector< rw::math::VectorND< N >> &vertices) |
| calculates volume of k-simplex More...
|
|
static std::pair< rw::math::Vector3D< double >, rw::math::Vector3D< double > > | getExtremumDistances (rw::core::Ptr< TriMesh > trimesh, const rw::math::Transform3D<> &t3d=rw::math::Transform3D<>::identity()) |
| Returns the extremum distances for the vertices of the TriMesh given the specified transformation. More...
|
|
static rw::math::Vector3D< double > | getDimensions (rw::core::Ptr< rw::geometry::Geometry > geometry) |
| Returns the dimensions of geometry. More...
|
|
static rw::math::Vector3D< double > | getDimensions (rw::core::Ptr< TriMesh > trimesh) |
| Returns the dimensions of trimesh. More...
|
|
template<std::size_t N> |
static double | actualSimplexVolume (const std::vector< rw::math::VectorND< N >> &vertices) |
| Calculates the volume of a N-simplex. Volume of a N-simplex is calculated as: \( V_{Simplex} = \frac{|W|}{N!} \), where: More...
|
|
Utility functions for calculating properties of geometry.
The methods for calculation of volume, inertia, and the center of gravity, is as described in [1].
[1]: Fast and Accurate Computation of Polyhedral Mass Properties, Brian Mirtich. Journal of Graphics Tools, Vol.1, pages 31-58, 1996
calculates volume of k-simplex
- Warning
- What is meant by volume is not really volume, see "actualSimplexVolume" - if you want the volume. Read the documentation (preferably code), to make sure you get what you want.
Volume of k-dimensional simplex (triangle is 2-simplex) is calculated as: \( V(S) = \frac{1}{k!} \sqrt{W W^T}\), where:
\( W \) is a matrix consisting of rows
\(w_i = [v_{i,1}-v_{0,1}\:v_{i,2}-v_{0, 2}\:\cdots\:v_{i,k+1}-v_{0,k+1}] \)
of i-th vertex coordinates. (taken from: http://www.math.niu.edu/~rusin/known-math/97/volumes.polyh) (dead link)