From ea18c25aef4aa0104852f314dd76e4ce446673f3 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Wed, 12 Aug 2009 20:22:20 +0000 Subject: triangle/quad code cleanup,corrects submodel origin, enable quad rendering again --- src/model/model.cc | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'src/model/model.cc') 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) { -- cgit v1.2.3