Public Member Functions | Private Attributes | List of all members
towr::Gap Class Reference

Sample terrain with parabola-modeled gap in x-direction. More...

#include <height_map_examples.h>

Inheritance diagram for towr::Gap:
Inheritance graph
[legend]

Public Member Functions

double GetHeight (double x, double y) const override
 
double GetHeightDerivWrtX (double x, double y) const override
 
double GetHeightDerivWrtXX (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 a = (4*h)/(w*w)
 
const double b = -(8*h*xc)/(w*w)
 
const double c = -(h*(w - 2*xc)*(w + 2*xc))/(w*w)
 
const double dx = w/2.0
 
const double gap_end_x = gap_start_ + w
 
const double gap_start_ = 1.0
 
const double h = 1.5
 
const double slope_ = h/w
 
const double w = 0.5
 
const double xc = gap_start_ + dx
 

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
 

Detailed Description

Sample terrain with parabola-modeled gap in x-direction.

Definition at line 89 of file height_map_examples.h.

Member Function Documentation

◆ GetHeight()

double towr::Gap::GetHeight ( double  x,
double  y 
) const
overridevirtual
Returns
The height of the terrain [m] at a specific 2D position.
Parameters
xThe x position.
yThe y position.

Implements towr::HeightMap.

Definition at line 89 of file height_map_examples.cc.

◆ GetHeightDerivWrtX()

double towr::Gap::GetHeightDerivWrtX ( double  x,
double  y 
) const
overridevirtual

Reimplemented from towr::HeightMap.

Definition at line 101 of file height_map_examples.cc.

◆ GetHeightDerivWrtXX()

double towr::Gap::GetHeightDerivWrtXX ( double  x,
double  y 
) const
overridevirtual

Reimplemented from towr::HeightMap.

Definition at line 112 of file height_map_examples.cc.

Member Data Documentation

◆ a

const double towr::Gap::a = (4*h)/(w*w)
private

Definition at line 109 of file height_map_examples.h.

◆ b

const double towr::Gap::b = -(8*h*xc)/(w*w)
private

Definition at line 110 of file height_map_examples.h.

◆ c

const double towr::Gap::c = -(h*(w - 2*xc)*(w + 2*xc))/(w*w)
private

Definition at line 111 of file height_map_examples.h.

◆ dx

const double towr::Gap::dx = w/2.0
private

Definition at line 101 of file height_map_examples.h.

◆ gap_end_x

const double towr::Gap::gap_end_x = gap_start_ + w
private

Definition at line 103 of file height_map_examples.h.

◆ gap_start_

const double towr::Gap::gap_start_ = 1.0
private

Definition at line 96 of file height_map_examples.h.

◆ h

const double towr::Gap::h = 1.5
private

Definition at line 98 of file height_map_examples.h.

◆ slope_

const double towr::Gap::slope_ = h/w
private

Definition at line 100 of file height_map_examples.h.

◆ w

const double towr::Gap::w = 0.5
private

Definition at line 97 of file height_map_examples.h.

◆ xc

const double towr::Gap::xc = gap_start_ + dx
private

Definition at line 102 of file height_map_examples.h.


The documentation for this class was generated from the following files:


towr
Author(s): Alexander W. Winkler
autogenerated on Mon Feb 28 2022 23:54:22