File: shadowhandler.h

package info (click to toggle)
amoeba 1.1-26
  • links: PTS
  • area: contrib
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 1,256 kB
  • ctags: 1,561
  • sloc: cpp: 8,315; makefile: 173
file content (34 lines) | stat: -rw-r--r-- 724 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef _SHADOWHANDLER_H
#define _SHADOWHANDLER_H 1

#include "main/event.h"
#include "math/vector.h"
#include "main/mainloop.h"
#include "packer/file.h"
#include "math/array.h"
#include "main/objhandler.h"

class ShadowHandler : public ObjHandler 
{
public:
	ShadowHandler(MainLoop *ml, const char *title, const char *elem, Hashtable *attr);
	~ShadowHandler();

	void start_effect();
	void draw_scene(float progress);
	void end_effect();

protected:
	struct extravertexinfo {
		float a, b, c, d;
		int neighbours[3];
		bool visible;
	};

	GLfloat *shadowvol;
	Array<extravertexinfo> evi;
	
	int do_shadow_pass(const float lx, const float ly, const float lz, GLfloat *shadowvol);
};

#endif /* !defined(_SHADOWHANDLER_H) */