]> git.tdb.fi Git - netvis.git/blob - source/packet.h
Resolve IP addresses to hostnames
[netvis.git] / source / packet.h
1 /* $Id$
2
3 This file is part of NetVis
4 Copyright @ 2008 Mikko Rasa, Mikkosoft Productions
5 Distributed unter the GPL
6 */
7
8 #ifndef PACKET_H_
9 #define PACKET_H_
10
11 #include <msp/gl/color.h>
12 #include <msp/time/timedelta.h>
13
14 class Host;
15
16 class Packet
17 {
18 private:
19         const Host &src;
20         const Host *dest;
21         Msp::GL::Color color;
22         float x;
23         float size;
24         float angle;
25         float rspeed;
26
27 public:
28         Packet(const Host &, const Host *, const Msp::GL::Color &, unsigned);
29         bool get_stale() const { return x>=1; }
30         void tick(const Msp::Time::TimeDelta &);
31         void render(Msp::GL::PrimitiveBuilder &) const;
32 };
33
34 #endif