MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / GetPosArray

Function GetPosArray

engine/Poseidon/World/WorldInit.cpp:811–822  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

809}
810
811static void GetPosArray(AutoArray<Vector3>& tgt, const ParamEntry& cfg)
812{
813 tgt.Resize(0);
814 for (int i = 0; i < cfg.GetSize() - 1; i += 2)
815 {
816 float x = cfg[i];
817 float z = cfg[i + 1];
818 float y = GLandscape->SurfaceYAboveWater(x, z);
819 Vector3& pos = tgt[tgt.Add()];
820 pos = Vector3(x, y, z);
821 }
822}
823
824void World::InitLandscape(Landscape* landscape)
825{

Callers 1

InitLandscapeMethod · 0.85

Calls 5

SurfaceYAboveWaterMethod · 0.80
Vector3Class · 0.50
ResizeMethod · 0.45
GetSizeMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected