30 #ifndef TOWR_HEIGHT_MAP_H_ 31 #define TOWR_HEIGHT_MAP_H_ 38 #include <Eigen/Dense> 73 using Ptr = std::shared_ptr<HeightMap>;
100 virtual double GetHeight(
double x,
double y)
const = 0;
129 double x,
double y)
const;
157 double x,
double y)
const;
160 const Vector3d& non_normalized,
int index)
const;
Vector3d GetBasis(Direction direction, double x, double y, const DimDerivs &dim_deriv={}) const
returns either the terrain normal/tangent or its derivative.
virtual double GetHeightDerivWrtY(double x, double y) const
virtual double GetHeightDerivWrtYY(double x, double y) const
TerrainID
Terrains IDs corresponding for factory method.
Holds the height and slope information of the terrain.
Vector3d GetDerivativeOfNormalizedVectorWrtNonNormalizedIndex(const Vector3d &non_normalized, int index) const
Vector3d GetTangent1(double x, double y, const DimDerivs &={}) const
static const std::map< HeightMap::TerrainID, std::string > terrain_names
virtual double GetHeightDerivWrtYX(double x, double y) const
Vector3d GetNormalizedBasis(Direction direction, double x, double y) const
Returns either the vector normal or tangent to the terrain patch.
double GetFrictionCoeff() const
static HeightMap::Ptr MakeTerrain(TerrainID type)
double GetSecondDerivativeOfHeightWrt(Dim2D dim1, Dim2D dim2, double x, double y) const
virtual ~HeightMap()=default
Vector3d GetDerivativeOfNormalizedBasisWrt(Direction direction, Dim2D dim, double x, double y) const
How the terrain normal/tangent vectors change when moving in x or y.
virtual double GetHeightDerivWrtX(double x, double y) const
virtual double GetHeightDerivWrtXX(double x, double y) const
virtual double GetHeight(double x, double y) const =0
virtual double GetHeightDerivWrtXY(double x, double y) const
std::vector< Dim2D > DimDerivs
dimensional derivatives
double GetDerivativeOfHeightWrt(Dim2D dim, double x, double y) const
How the height value changes at a 2D position in direction dim.
Vector3d GetTangent2(double x, double y, const DimDerivs &={}) const
std::shared_ptr< HeightMap > Ptr
Vector3d GetNormal(double x, double y, const DimDerivs &={}) const