Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2009-08-12 20:22:20 +0000
committerStijn Buys <ingar@osirion.org>2009-08-12 20:22:20 +0000
commitea18c25aef4aa0104852f314dd76e4ce446673f3 (patch)
tree928d7ecef63acda7b32d5243ef5cf14760e555c9 /src/model/model.cc
parent83b66522dfcad1b2428ce4fd81d83e39a051a4c5 (diff)
triangle/quad code cleanup,corrects submodel origin, enable quad rendering again
Diffstat (limited to 'src/model/model.cc')
-rw-r--r--src/model/model.cc16
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) {