| 21 | } |
| 22 | |
| 23 | void Primitive::Add( Primitive& primitive ) { |
| 24 | auto current_index = m_vertices.size(); |
| 25 | |
| 26 | for( const auto& vertex : primitive.GetVertices() ) { |
| 27 | m_vertices.push_back( vertex ); |
| 28 | } |
| 29 | |
| 30 | for( const auto& index : primitive.GetIndices() ) { |
| 31 | m_indices.push_back( static_cast<unsigned int>( current_index + index ) ); |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | void Primitive::AddVertex( const PrimitiveVertex& vertex ) { |
| 36 | m_synced = false; |