Added 3d Fractal, StaticAnimation, different render modes and other stuff
1 parent 871649c commit 3673e9dd3ec4c104632ff0e44494079eae4e4e64
@glproj03 glproj03 authored on 6 Feb 2006
Showing 10 changed files
View
22
include/animation.h
 
#include "thing.h"
 
#include <string>
#include <vector>
 
#ifndef PI
#define PI 3.14159265f
#endif
 
class Animation {
public:
Animation();
virtual void init();
virtual void tick();
};
 
class StaticAnimation : public Animation {
private:
Vec* rot_diff;
Vec* pos_diff;
Vec* amb_diff;
Vec* spec_diff;
std::vector<Thing*> things;
float speed;
public:
StaticAnimation();
StaticAnimation(Thing* t);
void init();
void tick();
void setRot(Vec r);
void setPos(Vec p);
void addThing(Thing* t);
void setSpeed(float s);
virtual ~StaticAnimation();
};
 
class UserAnimation : public Animation {
private:
void addThing(Thing* t);
void addColor(Color* t);
void init();
void tick();
virtual ~UserAnimation();
};
 
#endif
View
14
include/glumodel.h
Fractal();
void init(float _iters, float _len);
};
 
class SierpinskiPyramid : public GenericModel {
private:
int iter;
std::vector<Poly*> faces;
GLuint list;
public:
SierpinskiPyramid(Vec p, float l, int n);
void construct(int n);
void draw();
void drawPyramid();
void buildList();
virtual ~SierpinskiPyramid();
};
 
class KochFractal : public Fractal {
public:
KochFractal();
//TODO: move draw function to Fractal class, it's common for all
View
include/light.h
View
include/model.h
View
sources/animation.cpp
View
sources/glumodel.cpp
View
sources/light.cpp
View
sources/main.cpp
View
sources/model.cpp
View
sources/poly.cpp