diff options
author | Stijn Buys <ingar@osirion.org> | 2008-03-24 14:54:25 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-03-24 14:54:25 +0000 |
commit | b4f77d62eae0b0a6781f853b0f8f85b29a088007 (patch) | |
tree | 43aa0c279c1f231a4b2a280b375af00cd554fa6b /src/core/model.h | |
parent | b32c086a9b9deed4c34ade6e2447861a9c4bfc46 (diff) |
support for detail brushes
Diffstat (limited to 'src/core/model.h')
-rw-r--r-- | src/core/model.h | 28 |
1 files changed, 19 insertions, 9 deletions
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<math::Plane3f *> & planes); + void make_face(math::Plane3f *face, std::vector<math::Plane3f *> & 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; }; } |