diff --git a/src/pe/rigidbody/Box.h b/src/pe/rigidbody/Box.h index 427c5ea2a9aa79e6c32866779b4315056171fd88..b76ab998319134bdb84faacaade1c192ea4543e0 100644 --- a/src/pe/rigidbody/Box.h +++ b/src/pe/rigidbody/Box.h @@ -83,6 +83,7 @@ public: /*!\name Get functions */ //@{ inline const Vec3& getLengths() const; + virtual inline real_t getVolume() const; //@} //********************************************************************************************** @@ -306,7 +307,16 @@ inline const Vec3& Box::getLengths() const } //************************************************************************************************* - +//************************************************************************************************* +/*!\brief Returns the volume of the box. + * + * \return The volume of the box. + */ +inline real_t Box::getVolume() const +{ + return Box::calcVolume(getLengths()); +} +//************************************************************************************************* //=================================================================================================