2
// libavg - Media Playback Engine.
3
// Copyright (C) 2003-2008 Ulrich von Zadow
5
// This library is free software; you can redistribute it and/or
6
// modify it under the terms of the GNU Lesser General Public
7
// License as published by the Free Software Foundation; either
8
// version 2 of the License, or (at your option) any later version.
10
// This library is distributed in the hope that it will be useful,
11
// but WITHOUT ANY WARRANTY; without even the implied warranty of
12
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
// Lesser General Public License for more details.
15
// You should have received a copy of the GNU Lesser General Public
16
// License along with this library; if not, write to the Free Software
17
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
// Current versions can be found at www.libavg.de
22
#ifndef _LinearAnim_H_
23
#define _LinearAnim_H_
27
#include "SimpleAnim.h"
31
class AVG_API LinearAnim: public SimpleAnim {
33
virtual ~LinearAnim();
35
static AnimPtr create(const boost::python::object& node, const std::string& sAttrName,
37
const boost::python::object& pStartValue,
38
const boost::python::object& pEndValue,
40
const boost::python::object& startCallback=boost::python::object(),
41
const boost::python::object& stopCallback=boost::python::object());
44
LinearAnim(const boost::python::object& node, const std::string& sAttrName,
46
const boost::python::object& pStartValue,
47
const boost::python::object& pEndValue,
49
const boost::python::object& startCallback,
50
const boost::python::object& stopCallback);
51
virtual double interpolate(double t);
54
double getStartPart(double start, double end, double cur);
57
AnimPtr fadeIn(const boost::python::object& node, long long duration, double max=1.0,
58
const boost::python::object& stopCallback=boost::python::object());
60
AnimPtr fadeOut(const boost::python::object& node, long long duration,
61
const boost::python::object& stopCallback=boost::python::object());