OpenGothic
Open source reimplementation of Gothic I and II
Loading...
Searching...
No Matches
fireplace.cpp
Go to the documentation of this file.
1#include "fireplace.h"
2
3#include <zenkit/vobs/MovableObject.hh>
4
5FirePlace::FirePlace(Vob* parent, World& world, const zenkit::VFire& vob, Flags flags)
6 : Interactive(parent,world,vob,flags){
7 fireVobtreeName = vob.vob_tree;
8 fireSlot = vob.slot;
9 }
10
15
18
19 auto at = this->nodeTranform(fireSlot);
20 fireVobtree.setObjMatrix(at);
21 }
22
24 if(stateId()>0) {
25 auto at = this->nodeTranform(fireSlot);
26 fireVobtree = VobBundle(world,fireVobtreeName,Vob::Startup);
27 fireVobtree.setObjMatrix(at);
28 } else {
29 fireVobtree = VobBundle();
30 }
31 }
void moveEvent() override
Definition fireplace.cpp:16
void load(Serialize &fin) override
Definition fireplace.cpp:11
void onStateChanged() override
Definition fireplace.cpp:23
FirePlace(Vob *parent, World &world, const zenkit::VFire &vob, Flags flags)
Definition fireplace.cpp:5
Tempest::Matrix4x4 nodeTranform(std::string_view nodeName) const
int32_t stateId() const
Definition interactive.h:52
void load(Serialize &fin) override
void moveEvent() override
void setObjMatrix(const Tempest::Matrix4x4 &obj)
Definition vobbundle.cpp:12
Definition vob.h:11
Flags
Definition vob.h:13
@ Startup
Definition vob.h:15
World & world
Definition vob.h:45
Definition world.h:31