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

Method GetGridInfo

engine/Poseidon/World/WorldInit.cpp:940–955  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

938}
939
940const GridInfo* World::GetGridInfo(float zoom) const
941{
942 for (int i = 0; i < _gridInfo.Size(); i++)
943 {
944 if (zoom <= _gridInfo[i].zoomMax)
945 {
946 return &_gridInfo[i];
947 }
948 }
949 // Zoom exceeds all configured grid levels — return the coarsest one
950 if (_gridInfo.Size() > 0)
951 {
952 return &_gridInfo[_gridInfo.Size() - 1];
953 }
954 return nullptr;
955}
956
957template <class Type>
958Type LoadValue(const ParamEntry& cfg, const char* name, const Type& defVal)

Callers 2

PositionToAA11Function · 0.80
DrawGridMethod · 0.80

Calls 1

SizeMethod · 0.45

Tested by

no test coverage detected