OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2009, Google Inc. | 2 * Copyright 2009, Google Inc. |
3 * All rights reserved. | 3 * All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 } | 317 } |
318 | 318 |
319 void Visit(Skin* skin) { | 319 void Visit(Skin* skin) { |
320 Visit(static_cast<NamedObject*>(skin)); | 320 Visit(static_cast<NamedObject*>(skin)); |
321 | 321 |
322 if (!binary_) { | 322 if (!binary_) { |
323 writer_->WritePropertyName("influences"); | 323 writer_->WritePropertyName("influences"); |
324 writer_->BeginCompacting(); | 324 writer_->BeginCompacting(); |
325 writer_->OpenArray(); | 325 writer_->OpenArray(); |
326 const Skin::InfluencesArray& influences_array = skin->influences(); | 326 const Skin::InfluencesArray& influences_array = skin->influences(); |
327 for (int i = 0; i != influences_array.size(); ++i) { | 327 for (Skin::InfluencesArray::size_type i = 0; i != influences_array.size();
++i) { |
328 const Skin::Influences& influences = influences_array[i]; | 328 const Skin::Influences& influences = influences_array[i]; |
329 writer_->OpenArray(); | 329 writer_->OpenArray(); |
330 for (int j = 0; j != influences.size(); ++j) { | 330 for (Skin::Influences::size_type j = 0; j != influences.size(); ++j) { |
331 const Skin::Influence& influence = influences[j]; | 331 const Skin::Influence& influence = influences[j]; |
332 Serialize(writer_, influence.matrix_index); | 332 Serialize(writer_, influence.matrix_index); |
333 Serialize(writer_, influence.weight); | 333 Serialize(writer_, influence.weight); |
334 } | 334 } |
335 writer_->CloseArray(); | 335 writer_->CloseArray(); |
336 } | 336 } |
337 writer_->CloseArray(); | 337 writer_->CloseArray(); |
338 writer_->EndCompacting(); | 338 writer_->EndCompacting(); |
339 } | 339 } |
340 | 340 |
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
938 | 938 |
939 void Serializer::SerializeSection(ObjectBase* object, Section section) { | 939 void Serializer::SerializeSection(ObjectBase* object, Section section) { |
940 DCHECK(section >= 0 && section < NUM_SECTIONS); | 940 DCHECK(section >= 0 && section < NUM_SECTIONS); |
941 sections_[section].visitor_->Accept(object); | 941 sections_[section].visitor_->Accept(object); |
942 } | 942 } |
943 | 943 |
944 void Serializer::SerializeParam(Param* param) { | 944 void Serializer::SerializeParam(Param* param) { |
945 param_visitor_->Accept(param); | 945 param_visitor_->Accept(param); |
946 } | 946 } |
947 } // namespace o3d | 947 } // namespace o3d |
OLD | NEW |