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

Method GetDesc

Source/Objects/lightprobeobject.cpp:79–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77}
78
79void LightProbeObject::GetDesc(EntityDescription& desc) const {
80 LOG_ASSERT(probe_id_ != -1);
81 LOG_ASSERT(scenegraph_);
82 Object::GetDesc(desc);
83
84 const size_t data_size = kLightProbeNumCoeffs * sizeof(float);
85 std::vector<char> data(data_size);
86
87 memcpy(&data[0], &scenegraph_->light_probe_collection.GetProbeFromID(probe_id_)->ambient_cube_color, data_size);
88 desc.AddData(EDF_GI_COEFFICIENTS, data);
89}
90
91bool LightProbeObject::SetFromDesc(const EntityDescription& desc) {
92 LOG_ASSERT(probe_id_ == -1);

Callers

nothing calls this directly

Calls 2

GetProbeFromIDMethod · 0.80
AddDataMethod · 0.80

Tested by

no test coverage detected