⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rubyscenegraph.h

📁 3D仿真组实物机器人环境下的机器人模型的设计工具。可以查看和修改现有模型的详细参数
💻 H
字号:
/***********************************************************************************                            In the name of Almighty                            **                                                                               **    RubySceneGraph.h : Robocup Soccer Simulator Developement Team: Zigorat     **                                                                               **  Date: 07/08/2007                                                             **  Author: Mahdi Hamdarsi                                                       **  Research Coordinator: Amin Mohammadi                                         **  Comments: Ruby scene Loader and initializer                                  **                                                                               ***********************************************************************************//*! \file RubySceneGraph.h<pre><b>File:</b>          RubySceneGraph.h<b>Project:</b>       Robocup Soccer Simulator Developement Team: Zigorat<b>Authors:</b>       Mahdi Hamdarsi, Amin Mohammadi<b>Created:</b>       12/02/2001<b>Last Revision:</b> $ID$<b>Contents:</b>      Ruby scene Loader and initializer<hr size=2><h2><b>Changes</b></h2><b>Date</b>             <b>Author</b>          <b>Comment</b>07/08/2007       Mahdi Hamdarsi       Initial version created</pre>*/#ifndef _RUBY_SCENE_GRAPH_#define _RUBY_SCENE_GRAPH_#include <string>#include <deque>using namespace std;#include "SharedData.h"#include "GraphicEngine.h"#include "SceneComponents.h"#include "Geometry.h"/*********************************************************************************************//***********************************  Class TRubySceneGraph  *********************************//*********************************************************************************************//*! Class TRubySceneGraph is the main class to parse, create and show the robot body components */class TRubySceneGraph{  protected:            bool                 m_Loaded;                  /*!< Wheather the information is loaded */            deque<TSceneNode*>   m_Nodes;                  /*!< The components of the robot body   */            deque<TSceneJoint*>  m_Joints;                 /*!< The joints of the body             */            deque<TGenericData*> m_Data;                   /*!< The definitions in the file        */            bool                 m_Changed;                 /*!< Shows wheather data has changed    */            string               m_FileName;                /*!< Scene file name                    */                        // Data handling routines            void         clearDatas              (                                               );            PGenericData getParam                ( string param_name                             ) const;            TGenericData readEvaluationData      ( string &str, unsigned & index                 );            TGenericData evaluate                ( string &str, unsigned & index                 );            bool         parseDefinition         ( string str                                    );            bool         loadSceneBasicInfo      ( string &str, unsigned & index                 );            bool         ParseMain               ( const char * strFileName = ""                 );            /// Message handling routines and command handlers            void         removeJointsFromList    ( TJointList & joints                           );                        bool         cmdRemoveNode           ( unsigned index                                );            bool         cmdAddNode              ( TMessage msg                                  );            bool         cmdEditNode             ( TMessage msg, unsigned index                  );            bool         cmdRemoveJoint          ( unsigned number                               );            bool         cmdAddJoint             ( TMessage msg                                  );            bool         cmdEditJoint            ( TMessage msg                                  );  public:                        TRubySceneGraph          ( const char * strFileName = ""                 );                      ~ TRubySceneGraph          (                                               );            void        clearScene               (                                               );            bool        LoadScene                ( const char * strFileName                      );            void        SaveScene                ( const char * strFileName                      );            bool        initializeRendering      (                                               );            bool        respondToCommand         ( TMessage msg                                  );            int         getNodeIndex             ( string name                                   ) const;            bool        nodeExists               ( string name                                   ) const;            int         getNodesCount            (                                               ) const;            TSceneNode* getNode                  ( unsigned i                                    ) const;    const   TSceneNode* getNodeWithID            ( unsigned i, unsigned *index = NULL            ) const;            bool        jointExists              ( int number                                    ) const;            int         getJointCount            (                                               ) const;    const   TSceneJoint*getJoint                 ( unsigned i                                    ) const;            bool        changed                  (                                               ) const;            string      getSceneName             (                                               ) const;};void InitializeScene();void FinalizeScene();#endif // _RUBY_SCENE_GRAPH_

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -