1
0
Fork 0
blockofighter/src/legoblocks.h

92 lines
1.5 KiB
C
Raw Normal View History

2014-02-16 10:41:12 +00:00
#ifndef __LEGOBLOCKS_H_INCLUDED__
#define __LEGOBLOCKS_H_INCLUDED__
//#include "mesh.h"
#include "object.h"
#include "material.h"
#include "mesh.h"
#define BLOCKHEIGHT 0.4
class BasicBlock : public MeshObject{
private:
int width, height, depth;
2014-02-16 10:41:12 +00:00
public:
BasicBlock(int width, int height, int depth);
2014-02-16 10:41:12 +00:00
void setColor(float red, float green, float blue);
2014-02-16 10:41:12 +00:00
};
class BasicBlockAppearance : public Appearance{
private:
int width, height, depth;
int gllist;
2014-02-16 10:41:12 +00:00
protected:
bool usematerial;
2014-02-16 10:41:12 +00:00
public:
float displacement[3];
BasicBlockAppearance(int width, int height, int depth);
2014-02-16 10:41:12 +00:00
virtual void prepare(void);
virtual void draw(void);
2014-02-16 10:41:12 +00:00
};
void drawDetailRectangle(float width, float height);
extern int knobgllist;
extern int knobdetail;
void initKnob(void);
void createKnob(int knobsegments = -1);
class HeadAppearance : public Appearance{
private:
int gllist;
2014-02-16 10:41:12 +00:00
public:
HeadAppearance(void);
2014-02-16 10:41:12 +00:00
void prepare(void);
void draw(void);
2014-02-16 10:41:12 +00:00
};
#define FLOWER_RED 1
#define FLOWER_YELLOW 2
#define FLOWER_WHITE 3
class FlowerAppearance : public Appearance{
private:
int gllist;
int color1, color2, color3;
2014-02-16 10:41:12 +00:00
public:
FlowerAppearance(int color1, int color2, int color3);
2014-02-16 10:41:12 +00:00
void prepare(void);
void draw(void);
2014-02-16 10:41:12 +00:00
};
class LampAppearance : public Appearance{
private:
int gllist;
2014-02-16 10:41:12 +00:00
public:
LampAppearance(void);
2014-02-16 10:41:12 +00:00
void prepare(void);
void draw(void);
2014-02-16 10:41:12 +00:00
};
#endif