From 96d4d1e18d5ad247176705bb967c4e110b106721 Mon Sep 17 00:00:00 2001 From: Sebastian Eibl <sebastian.eibl@fau.de> Date: Fri, 10 Nov 2017 13:12:38 +0100 Subject: [PATCH] added missing getVolume function to box --- src/pe/rigidbody/Box.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/pe/rigidbody/Box.h b/src/pe/rigidbody/Box.h index 427c5ea2a..b76ab9983 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()); +} +//************************************************************************************************* //================================================================================================= -- GitLab