From: <sv...@ww...> - 2005-03-05 23:31:45
|
Author: mkrose Date: 2005-03-05 15:31:36 -0800 (Sat, 05 Mar 2005) New Revision: 1490 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Include/Animation.h trunk/CSP/CSPSim/Source/Animation.cpp Log: Fix a couple minor warnings under gcc. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1490 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2005-03-05 22:35:30 UTC (rev 1489) +++ trunk/CSP/CSPSim/CHANGES.current 2005-03-05 23:31:36 UTC (rev 1490) @@ -1,6 +1,9 @@ Version 0.4.0 (in progress) =========================== +2005-03-05: onsight + * Fix a couple minor warnings under gcc. + 2005-03-05: delta * Extended Animation class with a direct children of AnimationPathCallback. It should allow to export (simple) animations from max thanks to osgExp. @@ -8,15 +11,15 @@ ObjectModel. Due to the changes in the animation classes, a few xml files have been updated. F16DJ model.osg has been slightly updated too. It's a work in progress! - + * Added toggles for refuelling doors and canopy (only f16dj). Hot keys added to aircraft-core.map. - + * Fix for animation binded on 2 channels (near future will tell us if such a binding will survive or not). - + * Small cleaning in LandingGear. - + ==> ALL USERS: RebuildData.py and rebuild aircraft.hid to get these changes. 2005-02-23: delta Modified: trunk/CSP/CSPSim/Include/Animation.h =================================================================== --- trunk/CSP/CSPSim/Include/Animation.h 2005-03-05 22:35:30 UTC (rev 1489) +++ trunk/CSP/CSPSim/Include/Animation.h 2005-03-05 23:31:36 UTC (rev 1490) @@ -110,6 +110,7 @@ simdata::Key m_ModelID; std::string m_ChannelName; int m_LOD; + float m_Default; float m_Limit0; float m_Limit1; float m_Gain; @@ -168,8 +169,6 @@ virtual ~Callback_A(){} }; - float m_Default; - template <class A, class C> AnimationCallback *newCallback_(osg::Node *node) const { AnimationCallback *callback = new C(dynamic_cast<const A* const>(this)); init(callback); @@ -201,12 +200,12 @@ SIMDATA_XML("gain", Animation::m_Gain, false) END_SIMDATA_XML_INTERFACE - Animation(); + Animation(float default_value=0.0); virtual ~Animation() {} // typically, this method will call newCallback_ virtual AnimationCallback *newCallback(osg::Node *node) const = 0; - virtual AnimationCallback *newCallback(osg::NodeCallback *nodeCallback) const { + virtual AnimationCallback *newCallback(osg::NodeCallback*) const { CSP_LOG(OBJECT, WARNING, typeid(*this).name() << ": nested callback not implemented" ); return 0; } @@ -503,9 +502,7 @@ EXTEND_SIMDATA_XML_INTERFACE(DrivenSwitch, Animation) END_SIMDATA_XML_INTERFACE - DrivenSwitch() { - m_Default = 1.0f; - } + DrivenSwitch(): Animation(1.0) { } virtual ~DrivenSwitch(){} virtual AnimationCallback *newCallback(osg::Node *node) const { Modified: trunk/CSP/CSPSim/Source/Animation.cpp =================================================================== --- trunk/CSP/CSPSim/Source/Animation.cpp 2005-03-05 22:35:30 UTC (rev 1489) +++ trunk/CSP/CSPSim/Source/Animation.cpp 2005-03-05 23:31:36 UTC (rev 1490) @@ -60,9 +60,9 @@ return false; } -Animation::Animation(): +Animation::Animation(float default_value): m_LOD(0), - m_Default(0.0f), + m_Default(default_value), m_Limit0(0.0f), m_Limit1(1.0f), m_Gain(1.0f) { |