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

Method insert

Engine/source/gui/worldEditor/terrainEditor.cpp:146–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144}
145
146void Selection::insert(GridInfo info)
147{
148 PROFILE_SCOPE( TerrainEditor_Selection_Insert );
149
150 //validate();
151 // get the index into the hash table
152 U32 index = getHashIndex(info.mGridPoint.gridPos);
153
154 // if there is an existing linked list, make it our next
155 info.mNext = mHashLists[index];
156 info.mPrev = -1;
157
158 // if there is an existing linked list, make us it's prev
159 U32 indexOfNewEntry = size();
160 if(info.mNext != -1)
161 (*this)[info.mNext].mPrev = indexOfNewEntry;
162
163 // the hash table holds the heads of the linked lists. make us the head of this list.
164 mHashLists[index] = indexOfNewEntry;
165
166 // copy us into the vector
167 push_back(info);
168 //validate();
169}
170
171bool Selection::remove(const GridInfo &info)
172{

Callers 10

createNodeMethod · 0.45
GuiConvexEditorCtrlMethod · 0.45
setVisibleMethod · 0.45
createConvexShapeFromMethod · 0.45
TerrainEditorMethod · 0.45
reorderMaterialMethod · 0.45
WorldEditorMethod · 0.45
ignoreObjClassMethod · 0.45
worldEditor.cppFile · 0.45

Calls 1

sizeFunction · 0.50

Tested by

no test coverage detected