dwss/modes/Tunnel.h
2011-10-12 13:37:26 -04:00

43 lines
982 B
C++

#ifndef TUNNEL_H
#define TUNNEL_H
#include <list>
#include "LogoBox.h"
#include "Mode.h"
#include "GnomeScreensaver.h"
class Tunnel : public Mode
{
public:
Tunnel();
~Tunnel();
bool expose (GnomeScreensaver & gs);
bool configure (GnomeScreensaver & gs);
bool update (GnomeScreensaver & gs);
typedef struct {
double offset;
float zrot;
float trot;
uint64_t break_ticks;
float spin_axis[3];
float break_axis[3];
float spin_rate;
} LBStruct;
protected:
void addRing(double offset);
void getRandomBreakAxis(float (*axis)[3]);
float getRandomBreakSpinSpeed();
LogoBox m_logobox;
uint64_t m_last_ticks;
uint64_t m_start_ticks;
std::list<LBStruct> m_logos;
double m_offset;
double m_last_ring_offset;
unsigned int m_ring_rot_idx;
};
#endif /* TUNNEL_H */