MCPcopy Create free account
hub / github.com/ImageEngine/cortex / testIndex

Method testIndex

src/IECoreScene/MeshAlgoSplit.cpp:526–540  ·  view source on GitHub ↗

Don't add the index, but just test if it is a part of the reindex. If it is an id which has already been added, return the new id, otherwise return -1

Source from the content-addressed store, hash-verified

524 // Don't add the index, but just test if it is a part of the reindex. If it is an
525 // id which has already been added, return the new id, otherwise return -1
526 inline int testIndex( int id )
527 {
528 computeIndices();
529 int blockId = id / m_blockSize;
530 int subIndex = id % m_blockSize;
531 auto &block = m_fromOldIds[ blockId ];
532 if( block )
533 {
534 return (*block)[ subIndex ];
535 }
536 else
537 {
538 return -1;
539 }
540 }
541
542 // Get the new indices. Call after calling addIndex for every original index
543 IntVectorDataPtr getNewIndices()

Callers 1

meshMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected