Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/model.h')
-rw-r--r--src/core/model.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/core/model.h b/src/core/model.h
index 013edcc..00c8a48 100644
--- a/src/core/model.h
+++ b/src/core/model.h
@@ -88,7 +88,16 @@ public:
{
return model_name;
}
+
+ /// maximum values of the bounding box
+ inline math::Vector3f const & maxbbox() const { return model_maxbbox; }
+ /// minimum values of the bounding box
+ inline math::Vector3f const & minbbox() const { return model_minbbox; }
+
+ /// radius
+ inline float radius() const { return model_radius; }
+
/// the Model registry
static std::map<std::string, Model*> registry;
@@ -114,7 +123,7 @@ public:
/// list of Lights
std::list<Light *> model_light;
-
+
private:
void make_face(math::Plane3f *face, std::vector<math::Plane3f *> & planes);
void add_engine(Engine *engine);
@@ -123,8 +132,12 @@ private:
std::string model_name;
+ float model_radius;
float model_scale;
bool model_valid;
+
+ math::Vector3f model_maxbbox;
+ math::Vector3f model_minbbox;
};
}