Repository navigation
v4.1.0
v4.1.0
GroundProvider is gone. Use TerrainInterface instead.
Breaking
- Deleted:
GroundProvider,UniformGroundProvider,TerrainProviderAdapter,docs/ground_providers.md, and theFlightSimulator(launch, atmos, GroundProvider)overload. FlightSimulatornow has two constructors:(launch, atmos, GroundSurface)for flat ground and(launch, atmos, TerrainInterface, model)for custom.
Porting
// Before
MyProvider p;
FlightSimulator sim(ball, atmos, p);
// After
FlightSimulator sim(ball, atmos, std::make_shared<MyTerrain>());Mechanical translation:
public GroundProvider→public TerrainInterfacegetGroundAt(x, y)→getSurfaceProperties(x, y); also implementgetHeightandgetNormal- Remove the
clone()override;TerrainInterfaceis passed byshared_ptr
See docs/terrain.md and examples/multi_ground_simulation.cpp for a working example.