OpenGothic
Open source reimplementation of Gothic I and II
Loading...
Searching...
No Matches
vobbundle.cpp
Go to the documentation of this file.
1#include "vobbundle.h"
2
3#include "world/world.h"
4#include "resources.h"
5
6VobBundle::VobBundle(World& owner, std::string_view filename, Vob::Flags flags) {
7 auto* bundle = Resources::loadVobBundle(filename);
8 for(auto& vob:*bundle)
9 rootVobs.emplace_back(Vob::load(nullptr,owner,*vob,(flags | Vob::Startup)));
10 }
11
12void VobBundle::setObjMatrix(const Tempest::Matrix4x4& obj) {
13 for(auto& i:rootVobs)
14 i->setLocalTransform(obj);
15 }
static const VobTree * loadVobBundle(std::string_view name)
VobBundle()=default
void setObjMatrix(const Tempest::Matrix4x4 &obj)
Definition vobbundle.cpp:12
Flags
Definition vob.h:13
@ Startup
Definition vob.h:15
static std::unique_ptr< Vob > load(Vob *parent, World &world, const zenkit::VirtualObject &vob, Flags flags)
Definition vob.cpp:127
Definition world.h:31