33 #ifndef DART_DYNAMICS_HEIGHTMAPSHAPE_HPP_
34 #define DART_DYNAMICS_HEIGHTMAPSHAPE_HPP_
45 template <
typename S_>
52 = Eigen::Matrix<S, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>;
61 const std::string&
getType()
const override;
75 void setScale(
const Eigen::Vector3d& scale);
78 const Eigen::Vector3d&
getScale()
const;
103 const std::size_t& width,
104 const std::size_t& depth,
105 const std::vector<S>& heights);
Shape for a height map.
Definition: HeightmapShape.hpp:47
const HeightField & getHeightField() const
Returns the height field.
Definition: HeightmapShape-impl.hpp:136
const Eigen::Vector3d & getScale() const
Returns scale of this heightmap.
Definition: HeightmapShape-impl.hpp:85
std::size_t getWidth() const
Returns the width dimension of the height field.
Definition: HeightmapShape-impl.hpp:171
void setScale(const Eigen::Vector3d &scale)
Sets scale of this heightmap.
Definition: HeightmapShape-impl.hpp:71
Eigen::Matrix3d computeInertia(double mass) const override
Computes the inertia.
Definition: HeightmapShape-impl.hpp:185
S_ S
Definition: HeightmapShape.hpp:49
void computeBoundingBox(Eigen::Vector3d &min, Eigen::Vector3d &max) const
Computes the bounding box of the height field.
Definition: HeightmapShape-impl.hpp:196
void updateVolume() const override
Updates volume.
Definition: HeightmapShape-impl.hpp:220
static const std::string & getStaticType()
Returns shape type for this class.
Definition: HeightmapShape-impl.hpp:62
HeightField & getHeightFieldModifiable() const
Returns the modified height field. See also setHeightField().
Definition: HeightmapShape-impl.hpp:143
Eigen::Vector3d mScale
Scale of the heightmap.
Definition: HeightmapShape.hpp:146
HeightField mHeights
Height field.
Definition: HeightmapShape.hpp:149
void flipY() const
Flips the y values in the height field.
Definition: HeightmapShape-impl.hpp:150
void updateBoundingBox() const override
Updates bounding box.
Definition: HeightmapShape-impl.hpp:208
HeightmapShape()
Constructor.
Definition: HeightmapShape-impl.hpp:46
const std::string & getType() const override
Returns a string representing the shape type.
Definition: HeightmapShape-impl.hpp:55
~HeightmapShape() override=default
Destructor.
Eigen::Matrix< S, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > HeightField
Definition: HeightmapShape.hpp:52
S mMaxHeight
Maximum heights.
Definition: HeightmapShape.hpp:157
std::size_t getDepth() const
Returns the height dimension of the height field.
Definition: HeightmapShape-impl.hpp:178
S getMinHeight() const
Returns the minimum height set by setHeightField()
Definition: HeightmapShape-impl.hpp:164
S mMinHeight
Minimum heights.
Definition: HeightmapShape.hpp:153
S getMaxHeight() const
Returns the maximum height set by setHeightField()
Definition: HeightmapShape-impl.hpp:157
void setHeightField(const std::size_t &width, const std::size_t &depth, const std::vector< S > &heights)
Sets the height field.
Definition: HeightmapShape-impl.hpp:92
Definition: BulletCollisionDetector.cpp:63