Revision: 8987
http://playerstage.svn.sourceforge.net/playerstage/?rev=8987&view=rev
Author: natepak
Date: 2010-11-29 23:05:26 +0000 (Mon, 29 Nov 2010)
Log Message:
-----------
Added messages
Added Paths:
-----------
code/gazebo/branches/dev/server/Messages.hh
Added: code/gazebo/branches/dev/server/Messages.hh
===================================================================
--- code/gazebo/branches/dev/server/Messages.hh (rev 0)
+++ code/gazebo/branches/dev/server/Messages.hh 2010-11-29 23:05:26 UTC (rev
8987)
@@ -0,0 +1,62 @@
+#ifndef MESSAGES_HH
+#define MESSAGES_HH
+
+#include "Time.hh"
+#include "Pose3d.hh"
+
+namespace gazebo
+{
+ enum MessageType{ INSERT_MODEL };
+
+ class Message
+ {
+ public: Message(MessageType t) : type(t), stamp(Time::GetWallTime()) {}
+ public: Message(const Message &m) : type(m.type), stamp(m.stamp) {}
+
+ public: virtual Message *Clone() const { return new Message(*this); }
+
+ public: MessageType type;
+ public: Time stamp;
+ };
+
+ class InsertModelMsg : public Message
+ {
+ public: InsertModelMsg() : Message(INSERT_MODEL) {}
+ public: InsertModelMsg(const InsertModelMsg &m) : Message(m),
+ xmlStr(m.xmlStr) {}
+ public: virtual Message *Clone() const
+ { InsertModelMsg *msg = new InsertModelMsg(*this); return msg; }
+ public: std::string xmlStr;
+ };
+
+ class InsertVisualMsg : public Message
+ {
+ public: InsertVisualMsg() : Message(INSERT_VISUAL) {}
+ public: InsertVisualMsg(const InsertVisualMsg &m) : Message(m),
+ xmlStr(m.xmlStr) {}
+ public: virtual Message *Clone() const
+ { InsertVisualMsg *msg = new InsertVisualMsg(*this); return msg; }
+
+ public: std::string parentId;
+ public: std::string id;
+ public: std::string mesh;
+ public: std::string material;
+ public: bool castShadows;
+ public: bool attachAxes;
+ public: bool visible;
+ };
+
+ class UpdatePoseMsg : public Message
+ {
+ public: UpdatePoseMsg() : Message(UPDATE_POSE), id(0) {}
+ public: UpdatePoseMsg(const UpdatePoseMsg &m) : Message(m),
+ id(m.id), pose(m.pose) {}
+ public: virtual Message *Clone() const
+ { UpdatePoseMsg *msg = new UpdatePoseMsg(*this); return msg; }
+
+ public: std::string id;
+ public: Pose3d pose;
+ };
+}
+
+#endif
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit