1 #include "objectinstance.h"
10 ObjectInstance::ObjectInstance(const Object &obj):
14 void ObjectInstance::render(const Tag &tag) const
17 render(renderer, tag);
20 void ObjectInstance::render(Renderer &renderer, const Tag &tag) const
22 object.render(renderer, *this, tag);
25 void ObjectInstance::setup_render(Renderer &renderer, const Tag &) const
27 renderer.transform(matrix);
30 unsigned ObjectInstance::get_level_of_detail(const Renderer &renderer) const
32 return renderer.get_object_lod_bias();
36 ObjectInstance::Loader::Loader(ObjectInstance &o):
37 DataFile::ObjectLoader<ObjectInstance>(o)
39 add("transform", &Loader::transform);
42 void ObjectInstance::Loader::transform()
46 obj.matrix = trn.to_matrix();