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;
TerrainID
Terrains IDs corresponding for factory method.
Holds the height and slope information of the terrain.
Vector3d GetDerivativeOfNormalizedBasisWrt(Direction direction, Dim2D dim, double x, double y) const
How the terrain normal/tangent vectors change when moving in x or y.
Vector3d GetTangent1(double x, double y, const DimDerivs &={}) const
static const std::map< HeightMap::TerrainID, std::string > terrain_names
double GetSecondDerivativeOfHeightWrt(Dim2D dim1, Dim2D dim2, double x, double y) const
double GetFrictionCoeff() const
Vector3d GetNormal(double x, double y, const DimDerivs &={}) const
static HeightMap::Ptr MakeTerrain(TerrainID type)
virtual ~HeightMap()=default
virtual double GetHeightDerivWrtXY(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.
virtual double GetHeightDerivWrtY(double x, double y) const
virtual double GetHeight(double x, double y) const =0
std::vector< Dim2D > DimDerivs
dimensional derivatives
virtual double GetHeightDerivWrtXX(double x, double y) const
virtual double GetHeightDerivWrtX(double x, double y) const
double GetDerivativeOfHeightWrt(Dim2D dim, double x, double y) const
How the height value changes at a 2D position in direction dim.
Vector3d GetDerivativeOfNormalizedVectorWrtNonNormalizedIndex(const Vector3d &non_normalized, int index) const
virtual double GetHeightDerivWrtYY(double x, double y) const
virtual double GetHeightDerivWrtYX(double x, double y) const
Vector3d GetBasis(Direction direction, double x, double y, const DimDerivs &dim_deriv={}) const
returns either the terrain normal/tangent or its derivative.
std::shared_ptr< HeightMap > Ptr
Vector3d GetTangent2(double x, double y, const DimDerivs &={}) const