Changeset 10918 for code/branches/cpp11_v2/src/libraries/tools/IcoSphere.cc
- Timestamp:
- Dec 5, 2015, 7:10:56 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/src/libraries/tools/IcoSphere.cc
r10916 r10918 126 126 removeLineIndices(f.v3, f.v1); 127 127 128 faces2. push_back(TriangleIndices(f.v1, a, c));129 faces2. push_back(TriangleIndices(f.v2, b, a));130 faces2. push_back(TriangleIndices(f.v3, c, b));131 faces2. push_back(TriangleIndices(a, b, c));128 faces2.emplace_back(f.v1, a, c); 129 faces2.emplace_back(f.v2, b, a); 130 faces2.emplace_back(f.v3, c, b); 131 faces2.emplace_back(a, b, c); 132 132 133 133 addTriangleLines(f.v1, a, c); … … 142 142 void IcoSphere::addLineIndices(int index0, int index1) 143 143 { 144 lineIndices. push_back(LineIndices(index0, index1));144 lineIndices.emplace_back(index0, index1); 145 145 } 146 146 … … 163 163 { 164 164 Ogre::Real length = vertex.length(); 165 vertices. push_back(Ogre::Vector3(vertex.x / length, vertex.y / length, vertex.z / length));165 vertices.emplace_back(vertex.x / length, vertex.y / length, vertex.z / length); 166 166 return index++; 167 167 } … … 188 188 void IcoSphere::addFace(int index0, int index1, int index2) 189 189 { 190 faces. push_back(TriangleIndices(index0, index1, index2));190 faces.emplace_back(index0, index1, index2); 191 191 } 192 192 … … 217 217 218 218 for (const Ogre::Vector3& vertex : vertices) 219 target-> push_back(VertexPair(transform * vertex, colour));219 target->emplace_back(transform * vertex, colour); 220 220 221 221 return vertices.size();
Note: See TracChangeset
for help on using the changeset viewer.