MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / addObject

Method addObject

Engine/source/scene/sceneContainer.cpp:159–174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

157//-----------------------------------------------------------------------------
158
159bool 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

Callers

nothing calls this directly

Calls 3

getTypeMaskMethod · 0.80
linkAfterMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected