Sample terrain with an increasing and then decreasing slope in x-direction. More...
#include <height_map_examples.h>
Public Member Functions | |
double | GetHeight (double x, double y) const override |
double | GetHeightDerivWrtX (double x, double y) const override |
Public Member Functions inherited from towr::HeightMap | |
double | GetDerivativeOfHeightWrt (Dim2D dim, double x, double y) const |
How the height value changes at a 2D position in direction dim. More... | |
Vector3d | GetDerivativeOfNormalizedBasisWrt (Direction direction, Dim2D dim, double x, double y) const |
How the terrain normal/tangent vectors change when moving in x or y. More... | |
double | GetFrictionCoeff () const |
Vector3d | GetNormalizedBasis (Direction direction, double x, double y) const |
Returns either the vector normal or tangent to the terrain patch. More... | |
HeightMap ()=default | |
virtual | ~HeightMap ()=default |
Private Attributes | |
const double | down_length_ = 1.0 |
const double | height_center = 0.7 |
const double | slope_ = height_center/up_length_ |
const double | slope_start_ = 1.0 |
const double | up_length_ = 1.0 |
const double | x_down_start_ = slope_start_+up_length_ |
const double | x_flat_start_ = x_down_start_ + down_length_ |
Additional Inherited Members | |
Public Types inherited from towr::HeightMap | |
enum | Direction { Normal, Tangent1, Tangent2 } |
using | Ptr = std::shared_ptr< HeightMap > |
enum | TerrainID { FlatID, BlockID, StairsID, GapID, SlopeID, ChimneyID, ChimneyLRID, TERRAIN_COUNT } |
Terrains IDs corresponding for factory method. More... | |
using | Vector3d = Eigen::Vector3d |
Static Public Member Functions inherited from towr::HeightMap | |
static HeightMap::Ptr | MakeTerrain (TerrainID type) |
Protected Attributes inherited from towr::HeightMap | |
double | friction_coeff_ = 0.5 |
Sample terrain with an increasing and then decreasing slope in x-direction.
Definition at line 117 of file height_map_examples.h.
|
overridevirtual |
x | The x position. |
y | The y position. |
Implements towr::HeightMap.
Definition at line 125 of file height_map_examples.cc.
|
overridevirtual |
Reimplemented from towr::HeightMap.
Definition at line 144 of file height_map_examples.cc.
|
private |
Definition at line 125 of file height_map_examples.h.
|
private |
Definition at line 126 of file height_map_examples.h.
|
private |
Definition at line 130 of file height_map_examples.h.
|
private |
Definition at line 123 of file height_map_examples.h.
|
private |
Definition at line 124 of file height_map_examples.h.
|
private |
Definition at line 128 of file height_map_examples.h.
|
private |
Definition at line 129 of file height_map_examples.h.