From b4f77d62eae0b0a6781f853b0f8f85b29a088007 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Mon, 24 Mar 2008 14:54:25 +0000 Subject: support for detail brushes --- src/core/model.h | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) (limited to 'src/core/model.h') diff --git a/src/core/model.h b/src/core/model.h index 4fc4d97..958acc0 100644 --- a/src/core/model.h +++ b/src/core/model.h @@ -87,7 +87,6 @@ public: return engine_location; } -private: math::Vector3f engine_location; }; @@ -104,7 +103,6 @@ public: inline bool strobe() const { return light_strobe; } -private: math::Vector3f light_location; math::Color light_color; bool light_strobe; @@ -134,17 +132,26 @@ public: /// first vertex in the global VertexArray inline size_t first_vertex() const { return model_first_vertex; } - /// number of vertexes in this model - inline size_t vertex_count() const { return model_vertex_count; } + /// number of structural vertices in this model + inline size_t vertex_structural() const { return model_vertex_count; } + + /// number of detail vertices + inline size_t vertex_detail() const { return model_vertex_countdetail; } /// first vertex in the global VertexArray inline size_t first_evertex() const { return model_first_evertex; } - /// number of vertexes in this model - inline size_t evertex_count() const { return model_evertex_count; } + /// number of structural evertices in this model + inline size_t evertex_structural() const { return model_evertex_count; } - /// number of triangles in this mdel - inline size_t tris() const { return (model_vertex_count + model_evertex_count)/3; } + /// number of detail evertices in this model + inline size_t evertex_detail() const { return model_evertex_countdetail; } + + /// total number of triangles in this model + size_t tris() const; + + /// number of detail triangles in this model + size_t details() const; /// radius inline float radius() const { return model_radius; } @@ -175,7 +182,7 @@ public: private: - void make_face(math::Plane3f *face, std::vector & planes); + void make_face(math::Plane3f *face, std::vector & planes, bool detail); void add_engine(Engine *engine); void add_light(Light *light); @@ -194,8 +201,11 @@ private: size_t model_first_vertex; size_t model_vertex_count; + size_t model_vertex_countdetail; + size_t model_first_evertex; size_t model_evertex_count; + size_t model_evertex_countdetail; }; } -- cgit v1.2.3