]> git.tdb.fi Git - netvis.git/blobdiff - source/packet.h
Initial revision
[netvis.git] / source / packet.h
diff --git a/source/packet.h b/source/packet.h
new file mode 100644 (file)
index 0000000..cfeb2df
--- /dev/null
@@ -0,0 +1,27 @@
+#ifndef PACKET_H_
+#define PACKET_H_
+
+#include <msp/gl/color.h>
+#include <msp/time/timedelta.h>
+
+class Host;
+
+class Packet
+{
+private:
+       const Host &src;
+       const Host *dest;
+       Msp::GL::Color color;
+       float x;
+       float size;
+       float angle;
+       float rspeed;
+
+public:
+       Packet(const Host &, const Host *, const Msp::GL::Color &, unsigned);
+       bool get_stale() const { return x>=1; }
+       void tick(const Msp::Time::TimeDelta &);
+       void render() const;
+};
+
+#endif