diff options
Diffstat (limited to 'src/model/model.cc')
-rw-r--r-- | src/model/model.cc | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/model/model.cc b/src/model/model.cc index 1f9fcb5..3f0b00b 100644 --- a/src/model/model.cc +++ b/src/model/model.cc @@ -16,7 +16,7 @@ namespace model // static model registry Model::Registry Model::model_registry; -Model::Model(std::string const & name) : +Model::Model(const std::string & name) : model_enginecolor(1.0f, 0.0f, 0.0f), model_name(name) @@ -64,6 +64,16 @@ Model::~Model() model_flares.clear(); } +void Model::set_radius(const float radius) +{ + model_radius = radius; +} + +void Model::set_origin(const math::Vector3f &origin) +{ + model_origin.assign(origin); +} + void Model::add_particles(Particles *particles) { model_particles.push_back(particles); @@ -89,7 +99,7 @@ void Model::add_dock(Dock *dock) model_docks.push_back(dock); } -Model *Model::find(std::string const & name) +Model *Model::find(const std::string & name) { Registry::iterator it = model_registry.find(name); if (it == model_registry.end()) @@ -98,7 +108,7 @@ Model *Model::find(std::string const & name) return (*it).second; } -Model *Model::load(std::string const & name) +Model *Model::load(const std::string & name) { Model *model = find(name); if (!model) { |