[Gcblue-commits] gcb_wx/include/graphics ObjectUpdater.h,1.4,1.5 tc3DModel.h,1.1,1.2
Status: Alpha
Brought to you by:
ddcforge
From: <ddc...@us...> - 2004-01-14 01:13:25
|
Update of /cvsroot/gcblue/gcb_wx/include/graphics In directory sc8-pr-cvs1:/tmp/cvs-serv10758/include/graphics Modified Files: ObjectUpdater.h tc3DModel.h Log Message: more animation work Index: ObjectUpdater.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/ObjectUpdater.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ObjectUpdater.h 12 Jan 2004 03:01:36 -0000 1.4 --- ObjectUpdater.h 14 Jan 2004 01:13:21 -0000 1.5 *************** *** 30,33 **** --- 30,34 ---- static tc3DViewer *viewer; tc3DModel *model; ///< tc3DModel has method to access sim tcGameObject + float distanceFromCamera; ///< model distance from camera, calculated by update void UpdateAnimations(); Index: tc3DModel.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tc3DModel.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tc3DModel.h 12 Jan 2004 03:01:36 -0000 1.1 --- tc3DModel.h 14 Jan 2004 01:13:21 -0000 1.2 *************** *** 30,33 **** --- 30,43 ---- class tcGameObject; + /** + * animation description stored in CSV database entry + */ + struct animationDBInfo + { + std::string objectName; ///< name of object within model to animate + std::string animationType; ///< "propeller" + int param; ///< sensor number for radar animations + }; + class tcAnimationInfo { *************** *** 36,40 **** float omega; ///< radians per second void *switchVariable; ///< rotate if *switchVariable is non-zero ! osg::ref_ptr<osg::MatrixTransform> transform; ///< transform to rotate }; --- 46,50 ---- float omega; ///< radians per second void *switchVariable; ///< rotate if *switchVariable is non-zero ! osg::MatrixTransform* transform; ///< transform to rotate }; *************** *** 49,53 **** public: std::vector<tcAnimationInfo> animationInfo; ///< animation transforms to update at model level - void AddChild(tc3DModel *child); tc3DModel* Clone(); --- 59,62 ---- *************** *** 57,60 **** --- 66,70 ---- unsigned int GetNumParents(); void Load(std::string model_name); + void ProcessAnimations(std::vector<animationDBInfo>& animDBInfo); void SetupUpdate(tcGameObject *obj); |