#pragma once
#include "../../stdafx.h"
#include "../glLibLight.h"
#include "../glLibObjects/glLibObject.h"
#include "../glLibMath/glLibMathVec.h"

namespace glLib { namespace Effect {

class glLibInternal_edge {
	public:
		GLuint index_p1, index_p2;
		GLfloat p1[3], p2[3];
		GLfloat direction_p1[3], direction_p2[3];
		bool is_duplicate;

	public:
		glLibInternal_edge(GLuint index_p1, GLuint index_p2) {
			this->index_p1 = index_p1;
			this->index_p2 = index_p2;
			is_duplicate = false;
		}

		bool operator==(const glLibInternal_edge edge) const {
			return
				(index_p1==edge.index_p1&&index_p2==edge.index_p2) ||
				(index_p1==edge.index_p2&&index_p2==edge.index_p1);
		}
};

void extrude_light_volumes(const light* source_light, const ::glLib::Object::object* object, float front, float back, ::glLib::Object::object* light_volume);

};};