MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / Initialize

Method Initialize

Source/Objects/lightprobeobject.cpp:29–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27#include <Utility/assert.h>
28
29bool LightProbeObject::Initialize() {
30 LOG_ASSERT(probe_id_ == -1);
31 sp.ASAddIntCheckbox("Negative", false);
32 bool negative = (GetScriptParams()->ASGetInt("Negative") == 1);
33 probe_id_ = scenegraph_->light_probe_collection.AddProbe(GetTranslation(), negative, stored_coefficients);
34
35 if (stored_coefficients) {
36 delete[] stored_coefficients;
37 stored_coefficients = NULL;
38 }
39 obj_file = "light_probe_object";
40 return true;
41}
42
43void LightProbeObject::SetScriptParams(const ScriptParamMap& spm) {
44 Object::SetScriptParams(spm);

Callers

nothing calls this directly

Calls 5

GetScriptParamsFunction · 0.85
GetTranslationFunction · 0.85
ASAddIntCheckboxMethod · 0.80
ASGetIntMethod · 0.80
AddProbeMethod · 0.80

Tested by

no test coverage detected