Changeset 1326
 Timestamp:
 May 1, 2012, 4:11:32 PM (9 years ago)
 Location:
 trunk
 Files:

 5 edited
Legend:
 Unmodified
 Added
 Removed

trunk/orbital/mesh.h
r1304 r1326 253 253 Array<vec3,vec3,u8vec4> vertexlist; 254 254 for (int i = 0; i < m_vert.Count(); i++) 255 vertexlist. Append(m_vert[i].m1,256 257 255 vertexlist.Push(m_vert[i].m1, 256 m_vert[i].m2, 257 (u8vec4)(m_vert[i].m3 * 255.f)); 258 258 259 259 Array<uint16_t> indexlist; … … 310 310 void AppendQuadVert(vec3 const &coord) 311 311 { 312 m_vert. Append(coord, vec3(0.f, 1.f, 0.f), m_color);312 m_vert.Push(coord, vec3(0.f, 1.f, 0.f), m_color); 313 313 } 314 314 315 315 void AppendDuplicateQuadVert(int i) 316 316 { 317 m_vert. Append(m_vert[i].m1, vec3(0.f, 1.f, 0.f), m_vert[i].m3);317 m_vert.Push(m_vert[i].m1, vec3(0.f, 1.f, 0.f), m_vert[i].m3); 318 318 } 319 319 … … 552 552 Array<vec2> table; 553 553 for (int i = 0; i <= ndivisions; i++) 554 table. Append(vec2(std::sin(pi * 2 / ndivisions * i) + 1e5f,555 554 table.Push(vec2(std::sin(pi * 2 / ndivisions * i) + 1e5f, 555 std::cos(pi * 2 / ndivisions * i) + 1e5f)); 556 556 557 557 for (int j = 0; j <= ndivisions / 2; j++) 
trunk/orbital/particlesystem.h
r1310 r1326 21 21 22 22 for (int i = 0; i < 200; i++) 23 m_particles. Append(vec3(0), vec3(0), RandF(0.f, 2.f));23 m_particles.Push(vec3(0), vec3(0), RandF(0.f, 2.f)); 24 24 } 25 25 
trunk/src/array.h
r1295 r1326 81 81 } 82 82 83 inline void Append(T const &x)83 inline void Push(T const &x) 84 84 { 85 85 *this << x; … … 188 188 { 189 189 public: 190 inline void Append(T1 const &m1, T2 const &m2, T3 const &m3, T4 const &m4,191 190 inline void Push(T1 const &m1, T2 const &m2, T3 const &m3, T4 const &m4, 191 T5 const &m5, T6 const &m6, T7 const &m7, T8 const &m8) 192 192 { 193 193 if (this>m_count >= this>m_reserved) … … 226 226 { 227 227 public: 228 inline void Append(T1 const &m1, T2 const &m2, T3 const &m3, T4 const &m4,229 228 inline void Push(T1 const &m1, T2 const &m2, T3 const &m3, T4 const &m4, 229 T5 const &m5, T6 const &m6, T7 const &m7) 230 230 { 231 231 if (this>m_count >= this>m_reserved) … … 262 262 { 263 263 public: 264 inline void Append(T1 const &m1, T2 const &m2, T3 const &m3, T4 const &m4,265 264 inline void Push(T1 const &m1, T2 const &m2, T3 const &m3, T4 const &m4, 265 T5 const &m5, T6 const &m6) 266 266 { 267 267 if (this>m_count >= this>m_reserved) … … 295 295 { 296 296 public: 297 inline void Append(T1 const &m1, T2 const &m2, T3 const &m3, T4 const &m4,298 297 inline void Push(T1 const &m1, T2 const &m2, T3 const &m3, T4 const &m4, 298 T5 const &m5) 299 299 { 300 300 if (this>m_count >= this>m_reserved) … … 326 326 { 327 327 public: 328 inline void Append(T1 const &m1, T2 const &m2, T3 const &m3, T4 const &m4)328 inline void Push(T1 const &m1, T2 const &m2, T3 const &m3, T4 const &m4) 329 329 { 330 330 if (this>m_count >= this>m_reserved) … … 353 353 { 354 354 public: 355 inline void Append(T1 const &m1, T2 const &m2, T3 const &m3)355 inline void Push(T1 const &m1, T2 const &m2, T3 const &m3) 356 356 { 357 357 if (this>m_count >= this>m_reserved) … … 378 378 { 379 379 public: 380 inline void Append(T1 const &m1, T2 const &m2)380 inline void Push(T1 const &m1, T2 const &m2) 381 381 { 382 382 if (this>m_count >= this>m_reserved) 
trunk/test/tutorial/02_cube.cpp
r1310 r1326 36 36 37 37 /* Front vertices/colors */ 38 m_mesh. Append(vec3(1.0, 1.0, 1.0), vec3(1.0, 0.0, 1.0));39 m_mesh. Append(vec3( 1.0, 1.0, 1.0), vec3(0.0, 1.0, 0.0));40 m_mesh. Append(vec3( 1.0, 1.0, 1.0), vec3(1.0, 0.5, 0.0));41 m_mesh. Append(vec3(1.0, 1.0, 1.0), vec3(1.0, 1.0, 0.0));38 m_mesh.Push(vec3(1.0, 1.0, 1.0), vec3(1.0, 0.0, 1.0)); 39 m_mesh.Push(vec3( 1.0, 1.0, 1.0), vec3(0.0, 1.0, 0.0)); 40 m_mesh.Push(vec3( 1.0, 1.0, 1.0), vec3(1.0, 0.5, 0.0)); 41 m_mesh.Push(vec3(1.0, 1.0, 1.0), vec3(1.0, 1.0, 0.0)); 42 42 /* Back */ 43 m_mesh. Append(vec3(1.0, 1.0, 1.0), vec3(1.0, 0.0, 0.0));44 m_mesh. Append(vec3( 1.0, 1.0, 1.0), vec3(0.0, 0.5, 0.0));45 m_mesh. Append(vec3( 1.0, 1.0, 1.0), vec3(0.0, 0.5, 1.0));46 m_mesh. Append(vec3(1.0, 1.0, 1.0), vec3(0.0, 0.0, 1.0));43 m_mesh.Push(vec3(1.0, 1.0, 1.0), vec3(1.0, 0.0, 0.0)); 44 m_mesh.Push(vec3( 1.0, 1.0, 1.0), vec3(0.0, 0.5, 0.0)); 45 m_mesh.Push(vec3( 1.0, 1.0, 1.0), vec3(0.0, 0.5, 1.0)); 46 m_mesh.Push(vec3(1.0, 1.0, 1.0), vec3(0.0, 0.0, 1.0)); 47 47 48 48 m_indices << i16vec3(0, 1, 2); 
trunk/test/unit/array.cpp
r1294 r1326 28 28 { 29 29 Array<int> a; 30 a. Append(0);31 a. Append(1);32 a. Append(2);33 a. Append(3);30 a.Push(0); 31 a.Push(1); 32 a.Push(2); 33 a.Push(3); 34 34 35 35 LOLUNIT_ASSERT_EQUAL(a[0], 0); … … 42 42 { 43 43 Array<int> a; 44 a. Append(0);45 a. Append(1);46 a. Append(2);47 a. Append(3);44 a.Push(0); 45 a.Push(1); 46 a.Push(2); 47 a.Push(3); 48 48 49 49 Array<int> b = a; … … 58 58 { 59 59 Array<int, long, float, double, unsigned, char, bool, void *> a; 60 a. Append(1, 2, 3.f, 4.0, 5, 'a', true, 0);60 a.Push(1, 2, 3.f, 4.0, 5, 'a', true, 0); 61 61 62 62 LOLUNIT_ASSERT_EQUAL(a[0].m1, 1);
Note: See TracChangeset
for help on using the changeset viewer.