Changeset 10701
- Timestamp:
- 10/29/09 17:09:07 (4 years ago)
- Location:
- OpenSceneGraph/trunk
- Files:
-
- 6 modified
-
include/osgAnimation/Action (modified) (2 diffs)
-
include/osgAnimation/TimelineAnimationManager (modified) (2 diffs)
-
include/osgAnimation/UpdateCallback (modified) (1 diff)
-
src/osgAnimation/ActionVisitor.cpp (modified) (1 diff)
-
src/osgAnimation/StatsHandler.cpp (modified) (2 diffs)
-
src/osgAnimation/StatsVisitor.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/include/osgAnimation/Action
r10693 r10701 52 52 void addNestedCallback(Callback* callback) 53 53 { 54 if (_nestedCallback.valid()) 55 _nestedCallback->addNestedCallback(callback); 56 else 57 _nestedCallback = callback; 54 if (callback) { 55 if (_nestedCallback.valid()) 56 _nestedCallback->addNestedCallback(callback); 57 else 58 _nestedCallback = callback; 59 } 58 60 } 59 61 … … 65 67 if (_nestedCallback.get() == cb) 66 68 _nestedCallback = _nestedCallback->getNestedCallback(); 67 else 69 else if (_nestedCallback.valid()) 68 70 _nestedCallback->removeCallback(cb); 69 71 } -
OpenSceneGraph/trunk/include/osgAnimation/TimelineAnimationManager
r9370 r10701 1 1 /* -*-c++-*- 2 * Copyright (C) 2008 Cedric Pinson < mornifle@plopbyte.net>2 * Copyright (C) 2008 Cedric Pinson <cedric.pinson@plopbyte.net> 3 3 * 4 4 * This library is open source and may be redistributed and/or modified under … … 11 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 12 * OpenSceneGraph Public License for more details. 13 */13 */ 14 14 15 15 #ifndef OSGANIMATION_TIMELINE_ANIMATION_MANAGER_H -
OpenSceneGraph/trunk/include/osgAnimation/UpdateCallback
r10689 r10701 38 38 { 39 39 public: 40 AnimationUpdateCallback() {} 40 41 AnimationUpdateCallback(const std::string& name) { T::setName(name);} 41 42 AnimationUpdateCallback(const AnimationUpdateCallback& apc,const osg::CopyOp& copyop): 42 43 T(apc, copyop) {} 43 44 45 META_Object(osgAnimation, AnimationUpdateCallback<T>); 46 44 47 const std::string& getName() const { return T::getName(); } 48 bool link(osgAnimation::Channel* channel) { return 0; } 45 49 int link(osgAnimation::Animation* animation) 46 50 { -
OpenSceneGraph/trunk/src/osgAnimation/ActionVisitor.cpp
r10693 r10701 141 141 unsigned int frame = getLocalFrame(); 142 142 apply(static_cast<Action&>(action)); 143 // action.updateAnimation(frame, getCurrentLayer()); 144 action.updateAnimation(frame, -_currentAnimationPriority++); 143 int pri = static_cast<int>(_currentAnimationPriority); 144 _currentAnimationPriority++; 145 action.updateAnimation(frame, -pri); 145 146 } 146 147 } -
OpenSceneGraph/trunk/src/osgAnimation/StatsHandler.cpp
r10656 r10701 425 425 426 426 for (std::map<std::string, StatAction >::iterator it = _actions.begin(); it != _actions.end(); it++) { 427 //if ((*it).second.update()) 428 (*it).second._group->setNodeMask(~1); 427 (*it).second._group->setNodeMask(~osg::Node::NodeMask(1)); 429 428 } 430 429 … … 442 441 //_actions[name].touch(); 443 442 } 444 _actions[name]._group->setNodeMask(~0);443 _actions[name]._group->setNodeMask(~osg::Node::NodeMask(0x0)); 445 444 size[name] = 0; 446 445 pos.y() -= characterSize + graphSpacing; -
OpenSceneGraph/trunk/src/osgAnimation/StatsVisitor.cpp
r10693 r10701 78 78 { 79 79 _channels.push_back(action.getName()); 80 _stats->setAttribute(_frame,action.getName(), action.getAnimation()->getAnimation()->getWeight()); 80 double value; 81 std::string name = action.getName(); 82 if (_stats->getAttribute(_frame, name, value)) 83 name += "+"; 84 _stats->setAttribute(_frame, action.getName(), action.getAnimation()->getAnimation()->getWeight()); 81 85 } 82 86 }
