4 * ***** BEGIN GPL LICENSE BLOCK *****
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software Foundation,
18 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
21 * All rights reserved.
23 * The Original Code is: all of this file.
25 * Contributor(s): none yet.
27 * ***** END GPL LICENSE BLOCK *****
29 #ifndef __KX_SCALARINTERPOLATOR_H
30 #define __KX_SCALARINTERPOLATOR_H
34 #include "KX_IScalarInterpolator.h"
36 typedef unsigned short BL_IpoChannel;
38 class BL_ScalarInterpolator : public KX_IScalarInterpolator {
40 BL_ScalarInterpolator() {} // required for use in STL list
41 BL_ScalarInterpolator(struct FCurve* fcu) :
45 virtual ~BL_ScalarInterpolator() {}
47 virtual float GetValue(float currentTime) const;
48 struct FCurve *GetFCurve() { return m_fcu;};
54 #ifdef WITH_CXX_GUARDEDALLOC
56 void *operator new( unsigned int num_bytes) { return MEM_mallocN(num_bytes, "GE:BL_ScalarInterpolator"); }
57 void operator delete( void *mem ) { MEM_freeN(mem); }
62 class BL_InterpolatorList : public std::vector<KX_IScalarInterpolator *> {
64 BL_InterpolatorList(struct AnimData *adt);
65 ~BL_InterpolatorList();
67 KX_IScalarInterpolator *GetScalarInterpolator(const char *rna_path, int array_index);
70 #ifdef WITH_CXX_GUARDEDALLOC
72 void *operator new( unsigned int num_bytes) { return MEM_mallocN(num_bytes, "GE:BL_InterpolatorList"); }
73 void operator delete( void *mem ) { MEM_freeN(mem); }
77 #endif //__KX_SCALARINTERPOLATOR_H