7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-20 00:21:31 +00:00

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

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 );