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

« back to all changes in this revision

Viewing changes to Externals/MayaDataModel/include/MayaDMFrameCache.h

  • 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) 2008-2009 NetAllied Systems GmbH
 
3
 
 
4
    This file is part of MayaDataModel.
 
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
#ifndef __MayaDM_FRAMECACHE_H__
 
11
#define __MayaDM_FRAMECACHE_H__
 
12
#include "MayaDMTypes.h"
 
13
#include "MayaDMConnectables.h"
 
14
#include "MayaDMDependNode.h"
 
15
namespace MayaDM
 
16
{
 
17
class FrameCache : public DependNode
 
18
{
 
19
public:
 
20
public:
 
21
 
 
22
        FrameCache():DependNode(){}
 
23
        FrameCache(FILE* file,const std::string& name,const std::string& parent="",bool shared=false,bool create=true)
 
24
                :DependNode(file, name, parent, "frameCache", shared, create){}
 
25
        virtual ~FrameCache(){}
 
26
 
 
27
        void setVaryTime(double vt)
 
28
        {
 
29
                if(vt == 0.0) return;
 
30
                fprintf(mFile,"\tsetAttr \".vt\" %f;\n", vt);
 
31
        }
 
32
        void setStream(double s)
 
33
        {
 
34
                if(s == 0.0) return;
 
35
                fprintf(mFile,"\tsetAttr \".s\" %f;\n", s);
 
36
        }
 
37
        void getFuture(size_t f_i)const
 
38
        {
 
39
                fprintf(mFile,"\"%s.f[%i]\"",mName.c_str(),f_i);
 
40
        }
 
41
        void getFuture()const
 
42
        {
 
43
 
 
44
                fprintf(mFile,"\"%s.f\"",mName.c_str());
 
45
        }
 
46
        void getPast(size_t p_i)const
 
47
        {
 
48
                fprintf(mFile,"\"%s.p[%i]\"",mName.c_str(),p_i);
 
49
        }
 
50
        void getPast()const
 
51
        {
 
52
 
 
53
                fprintf(mFile,"\"%s.p\"",mName.c_str());
 
54
        }
 
55
        void getVarying()const
 
56
        {
 
57
                fprintf(mFile,"\"%s.v\"",mName.c_str());
 
58
        }
 
59
        void getVaryTime()const
 
60
        {
 
61
                fprintf(mFile,"\"%s.vt\"",mName.c_str());
 
62
        }
 
63
        void getStream()const
 
64
        {
 
65
                fprintf(mFile,"\"%s.s\"",mName.c_str());
 
66
        }
 
67
protected:
 
68
        FrameCache(FILE* file,const std::string& name,const std::string& parent,const std::string& nodeType,bool shared=false,bool create=true)
 
69
                :DependNode(file, name, parent, nodeType, shared, create) {}
 
70
 
 
71
};
 
72
}//namespace MayaDM
 
73
#endif//__MayaDM_FRAMECACHE_H__