MCPcopy Create free account
hub / github.com/davideberly/GeometricTools / GetHeight

Method GetHeight

GTE/Graphics/Terrain.cpp:88–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86}
87
88float Terrain::GetHeight(float x, float y) const
89{
90 // Subtract off the translation due to wrap-around.
91 auto page = GetPage(x, y);
92 Vector3<float> trn = page->localTransform.GetTranslation();
93 return page->GetHeight(x - trn[0], y - trn[1]);
94}
95
96Vector3<float> Terrain::GetNormal(float x, float y) const
97{

Callers 1

GetNormalMethod · 0.45

Calls 2

floorFunction · 0.50
GetTranslationMethod · 0.45

Tested by

no test coverage detected