vrml2 box translation to scenegraph can reserve space in the vectors
This commit is contained in:
parent
85fbfae1f4
commit
7256831944
|
@ -221,6 +221,10 @@ SGNODE* WRL2BOX::TranslateToSG( SGNODE* aParent )
|
||||||
std::vector< int > idx;
|
std::vector< int > idx;
|
||||||
int base = 0;
|
int base = 0;
|
||||||
|
|
||||||
|
vertices.reserve( 6 * 4 );
|
||||||
|
norms.reserve( 6 * 4 );
|
||||||
|
idx.reserve( 6 * 6 );
|
||||||
|
|
||||||
// top
|
// top
|
||||||
vertices.emplace_back( -x, -y, z );
|
vertices.emplace_back( -x, -y, z );
|
||||||
vertices.emplace_back( x, -y, z );
|
vertices.emplace_back( x, -y, z );
|
||||||
|
|
Loading…
Reference in New Issue