- Timestamp:
- 03/31/06 17:29:32 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/BBC/BBCSubEntity.h
r700 r721 5 5 6 6 namespace BBC { 7 7 8 8 class _BBCExport UniqueVertex 9 9 { … … 24 24 typedef std::vector<UniqueVertex> UniqueVertexList; 25 25 26 class _BBCExport SubEntity { 27 public: 26 // Fordward declaration 27 class SubEntity; 28 29 namespace boost 30 { 31 void intrusive_ptr_add_ref(SubEntity * p); 32 void intrusive_ptr_release(SubEntity * p); 33 }; 34 35 class _BBCExport SubEntity 36 { 37 private: 38 long references; 39 40 friend void boost::intrusive_ptr_add_ref(SubEntity * p); 41 42 friend void boost::intrusive_ptr_release(SubEntity * p); 43 44 protected: 28 45 29 46 typedef std::vector<unsigned short int> TextureCoordSetsDimensions; 47 30 48 typedef std::vector<Ogre::Vector3> Indices; 31 32 protected:33 49 34 50 UniqueVertexList mUniqueVertexList; … … 56 72 SubEntity(); 57 73 58 ~SubEntity();74 virtual ~SubEntity(); 59 75 60 76 void enableTangents(bool value); … … 129 145 130 146 void generateAABBox(); 147 148 const char *GetClassName(void) const; 149 131 150 }; 151 152 // class specific addref/release implementation 153 // the two function overloads must be in the boost namespace on most compilers: 154 namespace boost 155 { 156 inline void intrusive_ptr_add_ref(SubEntity * p) 157 { 158 // increment reference count of object *p 159 ++(p->references); 160 } 161 162 163 164 inline void intrusive_ptr_release(SubEntity * p) 165 { 166 // decrement reference count, and delete object when reference count reaches 0 167 if (--(p->references) == 0) 168 delete p; 169 } 170 } // namespace boost 171 172 typedef ::boost::intrusive_ptr<SubEntity> SubEntityPtr; 132 173 133 174 }
Note: See TracChangeset
for help on using the changeset viewer.