Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members  

SIG_Robot.h

00001 #ifndef SIGEL_ROBOT_SIG_ROBOT_H
00002 #define SIGEL_ROBOT_SIG_ROBOT_H
00003 
00004 namespace SIGEL_Robot { class SIG_Robot; }
00005 
00006 #include "SIGEL_Robot/SIG_LanguageParameters.h"
00007 #include "SIGEL_Robot/SIG_Body.h"
00008 #include "SIGEL_Robot/SIG_Material.h"
00009 #include "SIGEL_Robot/SIG_Link.h"
00010 #include "SIGEL_Robot/SIG_Joint.h"
00011 #include "SIGEL_Robot/SIG_Drive.h"
00012 #include "SIGEL_Robot/SIG_Sensor.h"
00013 #include <qdict.h>
00014 #include <qtextstream.h>
00015 
00020 namespace SIGEL_Robot
00021 {
00034   class SIG_Robot {
00035   private:
00036     SIG_LanguageParameters *language;
00037     SIG_Link *rootlink;
00038     QDict<SIG_Body> bodies;
00039     QDict<SIG_Material> materials;
00040     QDict<SIG_Link> links;
00041     QDict<SIG_Joint> joints;
00042     QDict<SIG_Drive> drives;
00043     QDict<SIG_Sensor> sensors;
00044 
00045   public:
00052     SIG_Robot (void);
00064     SIG_Robot (QTextStream & tx);
00068     SIG_Robot (const SIG_Robot & rob);
00072     ~SIG_Robot (void);
00073 
00074     DL_vector initialLocation;
00075     DL_matrix initialOrientation;
00076 
00080     void clear (void);
00087     void addBody (SIG_Body *b);
00091     void addMaterial (SIG_Material *m);
00097     void addLink (SIG_Link *l, bool islink = false);
00101     void addJoint (SIG_Joint *j);
00105     void addDrive (SIG_Drive *d);
00109     void addSensor (SIG_Sensor *s);
00110 
00115     void setLangParam (SIG_LanguageParameters *lp, int delprev = 1);
00119     SIG_LanguageParameters *getLangParam (void) const;
00125     SIG_Body *lookupBody (QString n) const;
00131     SIG_Material *lookupMaterial (QString n) const;
00137     SIG_Link *lookupLink (QString n) const;
00143     SIG_Joint *lookupJoint (QString n) const;
00149     SIG_Drive *lookupDrive (QString n) const;
00155     SIG_Sensor *lookupSensor (QString n) const;
00156 
00163     QDictIterator<SIG_Body> getBodyIter (void) const;
00170     QDictIterator<SIG_Material> getMaterialIter (void) const;
00177     QDictIterator<SIG_Link> getLinkIter (void) const;
00184     QDictIterator<SIG_Joint> getJointIter (void) const;
00191     QDictIterator<SIG_Drive> getDriveIter (void) const;
00198     QDictIterator<SIG_Sensor> getSensorIter (void) const;
00205     SIG_Link const *getRootLink (void) const;
00210     int getNrOfPoints (void) const;
00217     void setRootLink (SIG_Link *l);
00218 
00233     void initiate (void);
00234 
00239     void loadGeometries (void);
00240 
00246     void instantiateGeometries (void);
00247 
00253     void prepareDynaMo (void);
00254 
00261     void prepareDynaMechs (void);
00262 
00272     void writeToFileTransfer (QTextStream & tx) const;
00273 
00277     void readFromFileTransfer (QTextStream & tx);
00278 
00284     static void vectorToStream (QTextStream & tx, DL_vector vec);
00290     static DL_vector streamToVector (QTextStream & tx);
00296     static void matrixToStream (QTextStream & tx, DL_matrix mat);
00302     static DL_matrix streamToMatrix (QTextStream & tx);
00303   };
00304 }
00305 
00306 #endif // SIGEL_ROBOT_SIG_ROBOT_H

Generated at Mon Sep 3 01:32:29 2001 for PG 368 - SIGEL by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000