From b0c6a9aed78c9e305cd6e896c058dbf6619f4f27 Mon Sep 17 00:00:00 2001 From: Jasmeet Singh Date: Mon, 17 Jul 2023 19:56:03 +0530 Subject: [PATCH] Corrected function comments Signed-off-by: Jasmeet Singh --- include/sdf/Box.hh | 6 ++++-- include/sdf/Capsule.hh | 6 ++++-- include/sdf/Collision.hh | 4 ++-- include/sdf/Cylinder.hh | 6 ++++-- include/sdf/Ellipsoid.hh | 6 ++++-- include/sdf/Geometry.hh | 6 +----- include/sdf/Sphere.hh | 6 ++++-- 7 files changed, 23 insertions(+), 17 deletions(-) diff --git a/include/sdf/Box.hh b/include/sdf/Box.hh index 4bf5bfa15..228dd5eac 100644 --- a/include/sdf/Box.hh +++ b/include/sdf/Box.hh @@ -68,8 +68,10 @@ namespace sdf /// \return A reference to a gz::math::Boxd object. public: gz::math::Boxd &Shape(); - /// \brief Calculate an return the Mass Matrix values for the Box - public: std::optional< gz::math::MassMatrix3d > MassMatrix(const double density); + /// \brief Calculate and return the Mass Matrix values for the Box + /// \param[in] density Density of the box in kg/m^3 + /// \return A std::optional with gz::math::MassMatrix3d object or std::nullopt + public: std::optional< gz::math::MassMatrix3d > MassMatrix(const double _density); /// \brief Create and return an SDF element filled with data from this /// box. diff --git a/include/sdf/Capsule.hh b/include/sdf/Capsule.hh index d26662fa0..3348c017d 100644 --- a/include/sdf/Capsule.hh +++ b/include/sdf/Capsule.hh @@ -75,8 +75,10 @@ namespace sdf /// \return A reference to a gz::math::Capsuled object. public: gz::math::Capsuled &Shape(); - /// \brief Calculate an return the Mass Matrix values for the Capsule - public: std::optional< gz::math::MassMatrix3d > MassMatrix(const double density); + /// \brief Calculate and return the Mass Matrix values for the Capsule + /// \param[in] density Density of the capsule in kg/m^3 + /// \return A std::optional with gz::math::MassMatrix3d object or std::nullopt + public: std::optional< gz::math::MassMatrix3d > MassMatrix(const double _density); /// \brief Create and return an SDF element filled with data from this /// capsule. diff --git a/include/sdf/Collision.hh b/include/sdf/Collision.hh index 349743e39..eaf6da338 100644 --- a/include/sdf/Collision.hh +++ b/include/sdf/Collision.hh @@ -83,8 +83,8 @@ namespace sdf /// \brief Set the density of the collision. /// The density of the collision must be unique within the scope of a Link. - /// \param[in] _name Density of the collision. - public: void SetDensity(const double density); + /// \param[in] _density Density of the collision. + public: void SetDensity(const double _density); /// \brief Get a pointer to the collisions's geometry. /// \return The collision's geometry. diff --git a/include/sdf/Cylinder.hh b/include/sdf/Cylinder.hh index 1395ce5db..37fcbe35f 100644 --- a/include/sdf/Cylinder.hh +++ b/include/sdf/Cylinder.hh @@ -75,8 +75,10 @@ namespace sdf /// \return A reference to a gz::math::Cylinderd object. public: gz::math::Cylinderd &Shape(); - /// \brief Calculate an return the Mass Matrix values for the Cylinder - public: std::optional< gz::math::MassMatrix3d > MassMatrix(const double density); + /// \brief Calculate and return the Mass Matrix values for the Cylinder + /// \param[in] density Density of the cylinder in kg/m^3 + /// \return A std::optional with gz::math::MassMatrix3d object or std::nullopt + public: std::optional< gz::math::MassMatrix3d > MassMatrix(const double _density); /// \brief Create and return an SDF element filled with data from this /// cylinder. diff --git a/include/sdf/Ellipsoid.hh b/include/sdf/Ellipsoid.hh index 44f85c696..1c945d2bf 100644 --- a/include/sdf/Ellipsoid.hh +++ b/include/sdf/Ellipsoid.hh @@ -67,8 +67,10 @@ namespace sdf /// \return A reference to a gz::math::Ellipsoidd object. public: gz::math::Ellipsoidd &Shape(); - /// \brief Calculate an return the Mass Matrix values for the Cylinder - public: std::optional< gz::math::MassMatrix3d > MassMatrix(const double density); + /// \brief Calculate and return the Mass Matrix values for the Ellipsoid + /// \param[in] density Density of the ellipsoid in kg/m^3 + /// \return A std::optional with gz::math::MassMatrix3d object or std::nullopt + public: std::optional< gz::math::MassMatrix3d > MassMatrix(const double _density); /// \brief Create and return an SDF element filled with data from this /// ellipsoid. diff --git a/include/sdf/Geometry.hh b/include/sdf/Geometry.hh index fa45e752e..a097250cf 100644 --- a/include/sdf/Geometry.hh +++ b/include/sdf/Geometry.hh @@ -212,12 +212,8 @@ namespace sdf public: void SetHeightmapShape(const Heightmap &_heightmap); /// \brief Calculate and return the Mass Matrix values for the Geometry - /// \param[in] _xxyyzz A vector 3d representing the diagonal elements - /// of the mass matrix - /// \param[in] _xyxzyx A vector 3d representing the off-diagonal elements - /// of the mass matrix /// \param[in] _density The density of the geometry element. - /// \return Boolean that indicates whether the calculation was successfull + /// \return A std::optional with gz::math::MassMatrix3d object or std::nullopt public: std::optional< gz::math::MassMatrix3d > MassMatrix(const double _density); /// \brief Get a pointer to the SDF element that was used during diff --git a/include/sdf/Sphere.hh b/include/sdf/Sphere.hh index 28e9d1ef4..375517c36 100644 --- a/include/sdf/Sphere.hh +++ b/include/sdf/Sphere.hh @@ -68,8 +68,10 @@ namespace sdf /// not been called. public: sdf::ElementPtr Element() const; - /// \brief Calculate an return the Mass Matrix values for the Cylinder - public: std::optional< gz::math::MassMatrix3d > MassMatrix(const double density); + /// \brief Calculate and return the Mass Matrix values for the Sphere + /// \param[in] density Density of the sphere in kg/m^3 + /// \return A std::optional with gz::math::MassMatrix3d object or std::nullopt + public: std::optional< gz::math::MassMatrix3d > MassMatrix(const double _density); /// \brief Create and return an SDF element filled with data from this /// sphere.