~ubuntu-branches/ubuntu/wily/opencollada/wily-proposed

« back to all changes in this revision

Viewing changes to dae23ds/src/DAE23dsMaterialsLengthCalculator.cpp

  • Committer: Package Import Robot
  • Author(s): Matteo F. Vescovi
  • Date: 2015-05-14 17:23:27 UTC
  • Revision ID: package-import@ubuntu.com-20150514172327-f862u8envms01fra
Tags: upstream-0.1.0~20140703.ddf8f47+dfsg1
ImportĀ upstreamĀ versionĀ 0.1.0~20140703.ddf8f47+dfsg1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
    Copyright (c) 2009 NetAllied Systems GmbH
 
3
 
 
4
    This file is part of dae23ds.
 
5
        
 
6
    Licensed under the MIT Open Source License, 
 
7
    for details please see LICENSE file or the website
 
8
    http://www.opensource.org/licenses/mit-license.php
 
9
*/
 
10
 
 
11
#include "dae23dsStableHeaders.h"
 
12
#include "DAE23dsMaterialsLengthCalculator.h"
 
13
 
 
14
 
 
15
namespace DAE23ds
 
16
{
 
17
 
 
18
    //------------------------------
 
19
        MaterialsLengthCalculator::MaterialsLengthCalculator( Writer* writer3ds )
 
20
                : MaterialsBase(writer3ds)
 
21
        {
 
22
 
 
23
        }
 
24
 
 
25
    //------------------------------
 
26
        MaterialsLengthCalculator::~MaterialsLengthCalculator()
 
27
        {
 
28
        }
 
29
 
 
30
        //------------------------------
 
31
        void MaterialsLengthCalculator::calculate()
 
32
        {
 
33
                Writer::UniqueIdFWMaterialMap::const_iterator it = mUniqueIdFWMaterialMap.begin();
 
34
                for ( ; it != mUniqueIdFWMaterialMap.end(); ++it )
 
35
                {
 
36
                        const COLLADAFW::Material* material = &it->second;
 
37
                        addToObjectAndMaterialBlockLength(calculateMaterialBlockLength( material ));
 
38
                }
 
39
        }
 
40
} // namespace DAE23ds