Changeset 10918 for code/branches/cpp11_v2/src/libraries/tools
- Timestamp:
- Dec 5, 2015, 7:10:56 PM (9 years ago)
- Location:
- code/branches/cpp11_v2/src/libraries/tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/src/libraries/tools/DebugDrawer.cc
r10916 r10918 433 433 int DebugDrawer::addLineVertex(const Ogre::Vector3& vertex, const Ogre::ColourValue& colour) 434 434 { 435 lineVertices. push_back(VertexPair(vertex, colour));435 lineVertices.emplace_back(vertex, colour); 436 436 return linesIndex++; 437 437 } … … 445 445 int DebugDrawer::addTriangleVertex(const Ogre::Vector3& vertex, const Ogre::ColourValue& colour) 446 446 { 447 triangleVertices. push_back(VertexPair(vertex, colour));447 triangleVertices.emplace_back(vertex, colour); 448 448 return trianglesIndex++; 449 449 } -
code/branches/cpp11_v2/src/libraries/tools/DynamicLines.cc
r5781 r10918 69 69 void DynamicLines::addPoint(Real x, Real y, Real z) 70 70 { 71 mPoints. push_back(Vector3(x,y,z));71 mPoints.emplace_back(x,y,z); 72 72 mDirty = true; 73 73 } -
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.