2
Copyright (c) 2008-2009 NetAllied Systems GmbH
4
This file is part of MayaDataModel.
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
10
#ifndef __MayaDM_FRAMECACHE_H__
11
#define __MayaDM_FRAMECACHE_H__
12
#include "MayaDMTypes.h"
13
#include "MayaDMConnectables.h"
14
#include "MayaDMDependNode.h"
17
class FrameCache : public DependNode
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(){}
27
void setVaryTime(double vt)
30
fprintf(mFile,"\tsetAttr \".vt\" %f;\n", vt);
32
void setStream(double s)
35
fprintf(mFile,"\tsetAttr \".s\" %f;\n", s);
37
void getFuture(size_t f_i)const
39
fprintf(mFile,"\"%s.f[%i]\"",mName.c_str(),f_i);
44
fprintf(mFile,"\"%s.f\"",mName.c_str());
46
void getPast(size_t p_i)const
48
fprintf(mFile,"\"%s.p[%i]\"",mName.c_str(),p_i);
53
fprintf(mFile,"\"%s.p\"",mName.c_str());
55
void getVarying()const
57
fprintf(mFile,"\"%s.v\"",mName.c_str());
59
void getVaryTime()const
61
fprintf(mFile,"\"%s.vt\"",mName.c_str());
65
fprintf(mFile,"\"%s.s\"",mName.c_str());
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) {}
73
#endif//__MayaDM_FRAMECACHE_H__