| 157 | //----------------------------------------------------------------------------- |
| 158 | |
| 159 | bool SceneContainer::addObject(SceneObject* obj) |
| 160 | { |
| 161 | AssertFatal(obj->mContainer == NULL, "Adding already added object."); |
| 162 | obj->mContainer = this; |
| 163 | obj->linkAfter(&mStart); |
| 164 | |
| 165 | insertIntoBins(obj); |
| 166 | |
| 167 | // Also insert water and physical zone types into the special vector. |
| 168 | if ( obj->getTypeMask() & ( WaterObjectType | PhysicalZoneObjectType ) ) |
| 169 | mWaterAndZones.push_back(obj); |
| 170 | if( obj->getTypeMask() & TerrainObjectType ) |
| 171 | mTerrains.push_back( obj ); |
| 172 | |
| 173 | return true; |
| 174 | } |
| 175 | |
| 176 | //----------------------------------------------------------------------------- |
| 177 |
nothing calls this directly
no test coverage detected