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

Method Initialize

Source/Objects/itemobject.cpp:243–257  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

241}
242
243bool ItemObject::Initialize() {
244 update_list_entry = scenegraph_->LinkUpdateObject(this);
245 MakeBulletObject();
246 flare_ = scenegraph_->flares.MakeFlare(GetTranslation(), 1.0f, true);
247 Moved(Object::kAll);
248 bullet_object_->UpdateTransform();
249
250 const Model& item_model = Models::Instance()->GetModel(model_id_);
251 vec3 min = item_model.min_coords;
252 vec3 max = item_model.max_coords;
253 box_.center = (max + min) * 0.5f;
254 box_.dims = max - min;
255
256 return true;
257}
258
259vec3 ItemObject::GetTransformedVertex(int vert_id) {
260 Model* model = &Models::Instance()->GetModel(model_id_);

Callers

nothing calls this directly

Calls 5

GetTranslationFunction · 0.85
LinkUpdateObjectMethod · 0.80
MakeFlareMethod · 0.80
UpdateTransformMethod · 0.45
GetModelMethod · 0.45

Tested by

no test coverage detected