vrml2 box translation to scenegraph can reserve space in the vectors

This commit is contained in:
Marek Roszko 2022-07-16 15:23:03 -04:00
parent 85fbfae1f4
commit 7256831944
1 changed files with 4 additions and 0 deletions

View File

@ -221,6 +221,10 @@ SGNODE* WRL2BOX::TranslateToSG( SGNODE* aParent )
std::vector< int > idx;
int base = 0;
vertices.reserve( 6 * 4 );
norms.reserve( 6 * 4 );
idx.reserve( 6 * 6 );
// top
vertices.emplace_back( -x, -y, z );
vertices.emplace_back( x, -y, z );