Changeset 1269
 Timestamp:
 Apr 22, 2012, 2:31:55 AM (9 years ago)
 Location:
 trunk
 Files:

 4 edited
Legend:
 Unmodified
 Added
 Removed

trunk/orbital/mesh.h
r1268 r1269 138 138 for (int i = 0; i < m_triidx.Count(); i += 3) 139 139 { 140 indexlist +=m_triidx[i + 0];141 indexlist +=m_triidx[i + 1];142 indexlist +=m_triidx[i + 2];140 indexlist << m_triidx[i + 0]; 141 indexlist << m_triidx[i + 1]; 142 indexlist << m_triidx[i + 2]; 143 143 } 144 144 for (int i = 0; i < m_quadidx.Count(); i += 4) 145 145 { 146 indexlist +=m_quadidx[i + 0];147 indexlist +=m_quadidx[i + 1];148 indexlist +=m_quadidx[i + 2];149 150 indexlist +=m_quadidx[i + 0];151 indexlist +=m_quadidx[i + 2];152 indexlist +=m_quadidx[i + 3];146 indexlist << m_quadidx[i + 0]; 147 indexlist << m_quadidx[i + 1]; 148 indexlist << m_quadidx[i + 2]; 149 150 indexlist << m_quadidx[i + 0]; 151 indexlist << m_quadidx[i + 2]; 152 indexlist << m_quadidx[i + 3]; 153 153 } 154 154 … … 198 198 void AppendQuad(int i1, int i2, int i3, int i4, int base) 199 199 { 200 m_quadidx +=base + i1;201 m_quadidx +=base + i2;202 m_quadidx +=base + i3;203 m_quadidx +=base + i4;200 m_quadidx << base + i1; 201 m_quadidx << base + i2; 202 m_quadidx << base + i3; 203 m_quadidx << base + i4; 204 204 } 205 205 206 206 void AppendQuadDuplicateVerts(int i1, int i2, int i3, int i4, int base) 207 207 { 208 m_quadidx +=m_vert.Count(); AppendDuplicateQuadVert(base + i1);209 m_quadidx +=m_vert.Count(); AppendDuplicateQuadVert(base + i2);210 m_quadidx +=m_vert.Count(); AppendDuplicateQuadVert(base + i3);211 m_quadidx +=m_vert.Count(); AppendDuplicateQuadVert(base + i4);208 m_quadidx << m_vert.Count(); AppendDuplicateQuadVert(base + i1); 209 m_quadidx << m_vert.Count(); AppendDuplicateQuadVert(base + i2); 210 m_quadidx << m_vert.Count(); AppendDuplicateQuadVert(base + i3); 211 m_quadidx << m_vert.Count(); AppendDuplicateQuadVert(base + i4); 212 212 } 213 213 214 214 void AppendTriangle(int i1, int i2, int i3, int base) 215 215 { 216 m_triidx +=base + i1;217 m_triidx +=base + i2;218 m_triidx +=base + i3;216 m_triidx << base + i1; 217 m_triidx << base + i2; 218 m_triidx << base + i3; 219 219 } 220 220 221 221 void AppendTriangleDuplicateVerts(int i1, int i2, int i3, int base) 222 222 { 223 m_triidx +=m_vert.Count(); AppendDuplicateQuadVert(base + i1);224 m_triidx +=m_vert.Count(); AppendDuplicateQuadVert(base + i2);225 m_triidx +=m_vert.Count(); AppendDuplicateQuadVert(base + i3);223 m_triidx << m_vert.Count(); AppendDuplicateQuadVert(base + i1); 224 m_triidx << m_vert.Count(); AppendDuplicateQuadVert(base + i2); 225 m_triidx << m_vert.Count(); AppendDuplicateQuadVert(base + i3); 226 226 } 227 227 … … 366 366 367 367 for (int i = 0; i < vlen; i++) 368 m_vert +=m_vert[m_vert_cursor++];368 m_vert << m_vert[m_vert_cursor++]; 369 369 370 370 for (int i = 0; i < qlen; i++) 371 m_quadidx +=m_quadidx[m_quadidx_cursor++] + vlen;371 m_quadidx << m_quadidx[m_quadidx_cursor++] + vlen; 372 372 373 373 for (int i = 0; i < tlen; i++) 374 m_triidx +=m_triidx[m_triidx_cursor++] + vlen;374 m_triidx << m_triidx[m_triidx_cursor++] + vlen; 375 375 } 376 376 
trunk/src/array.h
r1261 r1269 41 41 } 42 42 43 inline Array<T1, T2, T3> const& operator +=(Element const &x)43 inline Array<T1, T2, T3> const& operator<<(Element const &x) 44 44 { 45 45 if (m_count >= m_reserved) … … 128 128 } 129 129 130 inline Array<T1, T2> const& operator +=(Element const &x)130 inline Array<T1, T2> const& operator<<(Element const &x) 131 131 { 132 132 if (m_count >= m_reserved) … … 211 211 } 212 212 213 inline Array<T1> const& operator +=(T1 const &x)213 inline Array<T1> const& operator<<(T1 const &x) 214 214 { 215 215 if (m_count >= m_reserved) … … 228 228 inline void Append(T1 const &x) 229 229 { 230 *this +=x;230 *this << x; 231 231 } 232 232 
trunk/test/tutorial/01_triangle.cpp
r1243 r1269 37 37 Triangle() 38 38 { 39 m_vertices +=vec2( 0.0, 0.8);40 m_vertices +=vec2(0.8, 0.8);41 m_vertices +=vec2( 0.8, 0.8);39 m_vertices << vec2( 0.0, 0.8); 40 m_vertices << vec2(0.8, 0.8); 41 m_vertices << vec2( 0.8, 0.8); 42 42 m_ready = false; 43 43 } 
trunk/test/tutorial/02_cube.cpp
r1255 r1269 46 46 m_mesh.Append(vec3(1.0, 1.0, 1.0), vec3(0.0, 0.0, 1.0)); 47 47 48 m_indices +=i16vec3(0, 1, 2);49 m_indices +=i16vec3(2, 3, 0);50 m_indices +=i16vec3(1, 5, 6);51 m_indices +=i16vec3(6, 2, 1);52 m_indices +=i16vec3(7, 6, 5);53 m_indices +=i16vec3(5, 4, 7);54 m_indices +=i16vec3(4, 0, 3);55 m_indices +=i16vec3(3, 7, 4);56 m_indices +=i16vec3(4, 5, 1);57 m_indices +=i16vec3(1, 0, 4);58 m_indices +=i16vec3(3, 2, 6);59 m_indices +=i16vec3(6, 7, 3);48 m_indices << i16vec3(0, 1, 2); 49 m_indices << i16vec3(2, 3, 0); 50 m_indices << i16vec3(1, 5, 6); 51 m_indices << i16vec3(6, 2, 1); 52 m_indices << i16vec3(7, 6, 5); 53 m_indices << i16vec3(5, 4, 7); 54 m_indices << i16vec3(4, 0, 3); 55 m_indices << i16vec3(3, 7, 4); 56 m_indices << i16vec3(4, 5, 1); 57 m_indices << i16vec3(1, 0, 4); 58 m_indices << i16vec3(3, 2, 6); 59 m_indices << i16vec3(6, 7, 3); 60 60 61 61 m_ready = false;
Note: See TracChangeset
for help on using the changeset viewer.