root/OpenSceneGraph/trunk/src/osgAnimation/ActionAnimation.cpp
@
13041
| Revision 13041, 1.1 kB (checked in by robert, 14 months ago) | |
|---|---|
|
|
| Line | |
|---|---|
| 1 | /* -*-c++-*- |
| 2 | * Copyright (C) 2009 Cedric Pinson <cedric.pinson@plopbyte.net> |
| 3 | * |
| 4 | * This library is open source and may be redistributed and/or modified under |
| 5 | * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or |
| 6 | * (at your option) any later version. The full license is in LICENSE file |
| 7 | * included with this distribution, and on the openscenegraph.org website. |
| 8 | * |
| 9 | * This library is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * OpenSceneGraph Public License for more details. |
| 13 | */ |
| 14 | |
| 15 | #include <osgAnimation/ActionAnimation> |
| 16 | |
| 17 | using namespace osgAnimation; |
| 18 | |
| 19 | ActionAnimation::ActionAnimation() {} |
| 20 | |
| 21 | ActionAnimation::ActionAnimation(const ActionAnimation& a, const osg::CopyOp& c) : Action(a,c) { _animation = a._animation;} |
| 22 | |
| 23 | ActionAnimation::ActionAnimation(Animation* animation) : _animation(animation) |
| 24 | { |
| 25 | Action::setDuration(animation->getDuration()); |
| 26 | setName(animation->getName()); |
| 27 | } |
| 28 | |
| 29 | void ActionAnimation::updateAnimation(unsigned int frame, int priority) |
| 30 | { |
| 31 | _animation->update(frame * 1.0/_fps, priority); |
| 32 | } |
Note: See TracBrowser
for help on using the browser.
