MCPcopy Create free account
hub / github.com/NazaraEngine/NazaraEngine / AddVertex

Method AddVertex

src/Nazara/Utility/AlgorithmUtility.cpp:231–247  ·  view source on GitHub ↗

the vertex will be placed on top if the vertex didn't exist previewsly in the cache, then miss count is incermented

Source from the content-addressed store, hash-verified

229 // if the vertex didn't exist previewsly in
230 // the cache, then miss count is incermented
231 void AddVertex(unsigned int v)
232 {
233 int w = FindVertex(v);
234 if (w >= 0)
235 // remove the vertex from the cache (to reinsert it later on the top)
236 RemoveVertex(w);
237 else
238 // the vertex was not found in the cache - increment misses
239 m_misses++;
240
241 // shift all vertices down (to make room for the new top vertex)
242 for (int i=39; i>0; i--)
243 m_cache[i] = m_cache[i-1];
244
245 // add the new vertex on top
246 m_cache[0] = v;
247 }
248
249 void Clear()
250 {

Callers 1

AddTriangleToDrawListMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected