1 #include "objectinstance.h"
10 ObjectInstance::ObjectInstance(const Object &obj):
14 void ObjectInstance::render(Renderer &renderer, Tag tag) const
16 object.render(renderer, *this, tag);
19 void ObjectInstance::setup_render(Renderer &renderer, Tag) const
21 renderer.transform(matrix);
24 unsigned ObjectInstance::get_level_of_detail(const Renderer &renderer) const
26 return renderer.get_object_lod_bias();
30 ObjectInstance::Loader::Loader(ObjectInstance &o):
31 DataFile::ObjectLoader<ObjectInstance>(o)
33 add("transform", &Loader::transform);
36 void ObjectInstance::Loader::transform()
40 obj.matrix = trn.to_matrix();