#ifndef PLANE_H
#define PLANE_H

//#include <math.h>
//bumpmapping idea from:  www.UltimateGameProgramming.com   dot3bumpNet

#include "utils/Matrix4.h"
#include <GL/glut.h>
#include <GL/gl.h>
#include <GL/glu.h>

#include "utils/glext.h"



#include "utils/CtgaLoader.h"
#include "utils/Vector2.h"




class plane
{
public:
	plane();
	~plane(void);

	bool initialie (Vector3 light_pos);

	void render (void);

	void nick_plane (float dx, float dz, Vector3 cam_dir);

	void damp (void);


	
	CTGALoader Terrain;        // Terrain texture image.
	CTGALoader BumpMap;
	

	GLuint plane_list;
	GLuint simple_plane_list;

	
	void toggle_gfx(void);


	//GLuint normalization_cube_map;	
	//int GenNormalizationCubeMap(unsigned int size, GLuint &texid);

public:
	float nickX;
	float nickZ;

private:
	Vector3 lightPos;
	Matrix4 tangentMatrix;

	int stabilize_nick;

	bool gfx_prop;


	
};

#endif // PLANE_H

