33 #ifndef DART_DYNAMICS_HEIGHTMAPSHAPE_HPP_
34 #define DART_DYNAMICS_HEIGHTMAPSHAPE_HPP_
45 template <
typename S_>
53 = Eigen::Matrix<S, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>;
62 const std::string&
getType()
const override;
102 const std::size_t& width,
103 const std::size_t& depth,
104 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:133
std::size_t getWidth() const
Returns the width dimension of the height field.
Definition: HeightmapShape-impl.hpp:168
Eigen::Matrix3d computeInertia(double mass) const override
Computes the inertia.
Definition: HeightmapShape-impl.hpp:189
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:200
void updateVolume() const override
Updates volume.
Definition: HeightmapShape-impl.hpp:224
static const std::string & getStaticType()
Returns shape type for this class.
Definition: HeightmapShape-impl.hpp:62
const Vector3 & getScale() const
Returns scale of this heightmap.
Definition: HeightmapShape-impl.hpp:85
HeightField & getHeightFieldModifiable() const
Returns the modified height field. See also setHeightField().
Definition: HeightmapShape-impl.hpp:140
HeightField mHeights
Height field.
Definition: HeightmapShape.hpp:173
void flipY() const
Flips the y values in the height field.
Definition: HeightmapShape-impl.hpp:147
void updateBoundingBox() const override
Updates bounding box.
Definition: HeightmapShape-impl.hpp:212
HeightmapShape()
Constructor.
Definition: HeightmapShape-impl.hpp:46
Vector3 mScale
Scale of the heightmap.
Definition: HeightmapShape.hpp:170
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:53
void notifyColorUpdated(const Eigen::Vector4d &color) override
Set the color of this arrow.
Definition: HeightmapShape-impl.hpp:182
S mMaxHeight
Maximum heights.
Definition: HeightmapShape.hpp:181
std::size_t getDepth() const
Returns the height dimension of the height field.
Definition: HeightmapShape-impl.hpp:175
S getMinHeight() const
Returns the minimum height set by setHeightField()
Definition: HeightmapShape-impl.hpp:161
void setScale(const Vector3 &scale)
Sets scale of this heightmap.
Definition: HeightmapShape-impl.hpp:71
S mMinHeight
Minimum heights.
Definition: HeightmapShape.hpp:177
S getMaxHeight() const
Returns the maximum height set by setHeightField()
Definition: HeightmapShape-impl.hpp:154
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
Eigen::Matrix< S, 3, 1 > Vector3
Definition: HeightmapShape.hpp:51
Definition: BulletCollisionDetector.cpp:65