diff options
author | Stijn Buys <ingar@osirion.org> | 2010-10-24 16:02:09 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2010-10-24 16:02:09 +0000 |
commit | a704318f507f486ac04834747eb209d0a9410702 (patch) | |
tree | b6f3f6df4b285be0b9c6e91c0486271daf0bb6ee /src/model/fragment.h | |
parent | c2a6f7c2ee6245109c897ee23b093b5277a30594 (diff) |
keepalive optimizations, r_lights engine variable, OpenGL VBO support
Diffstat (limited to 'src/model/fragment.h')
-rw-r--r-- | src/model/fragment.h | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/src/model/fragment.h b/src/model/fragment.h index 6d65f7a..9da30b0 100644 --- a/src/model/fragment.h +++ b/src/model/fragment.h @@ -81,11 +81,14 @@ class FragmentGroup public: enum Type {None = 0, Rotate = 1, Door = 2 }; - typedef std::list<Fragment *>::iterator iterator; + /// type definition for a list of model fragments + typedef std::list<Fragment *> Fragments; FragmentGroup(); ~FragmentGroup(); + + /* ---- inspectors ----------------------------------------- */ inline const Type type() const { return group_type; @@ -111,7 +114,16 @@ public: return group_transform; } + inline const size_t size() const { + return group_fragments.size(); + } + inline const Fragments & fragments() const { + return group_fragments; + } + + /* ---- mutators ------------------------------------------- */ + inline void set_type(const Type type) { group_type = type; } @@ -136,18 +148,6 @@ public: group_transform = transform; } - inline iterator begin() { - return group_fragments.begin(); - } - - inline iterator end() { - return group_fragments.end(); - } - - inline const size_t size() const { - return group_fragments.size(); - } - inline void add_fragment(Fragment *fragment) { group_fragments.push_back(fragment); } @@ -155,9 +155,6 @@ public: void clear(); private: - /// type definition for a list of model fragments - typedef std::list<Fragment *> Fragments; - Fragments group_fragments; math::Vector3f group_location; math::Axis group_axis; |