MCPcopy Create free account
hub / github.com/Illation/ETEngine / LoadData

Method LoadData

Engine/source/EtRendering/GlobalRenderingSystems/CIE.cpp:14–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12
13
14void CIE::LoadData()
15{
16 AssetPtr<core::StubData> jsonCieText = core::ResourceManager::Instance()->GetAssetData<core::StubData>(core::HashString("cie.json"));
17
18 core::JSON::Parser parser = core::JSON::Parser(std::string(jsonCieText->GetText(), jsonCieText->GetLength()));
19 core::JSON::Object* root = parser.GetRoot();
20
21 m_Table = (*root)["2 deg color matching"]->arr()->NumArr();
22 auto jxyz = (*root)["xyz to rgb"];
23 core::JSON::ArrayMatrix(jxyz, m_CieToRgb);
24}
25
26dvec3 CIE::GetValue(double wavelength, double lambdaMin, double lambdaMax)
27{

Callers 1

InitializeMethod · 0.80

Calls 8

HashStringClass · 0.85
ParserClass · 0.85
ArrayMatrixFunction · 0.85
GetTextMethod · 0.80
GetLengthMethod · 0.80
NumArrMethod · 0.80
arrMethod · 0.80
GetRootMethod · 0.45

Tested by

no test coverage detected