1. Piotr Wach
  2. LiquidMastachEngine

Source

LiquidMastachEngine / Backup / 18.01.04 / Silnik graficzny / Frustum.h

/*
* LIQUID MASTAH Engine
* (c) GOSU code '2003
* http://www.algorithms.prv.pl
*
* Autor: Piotr Wach aka Wachu  
* e-mail: gosuwachu@o2.pl
*/

// FrustumCulling.h: interface for the CFrustumCulling class.
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_FRUSTUMCULLING_H__77303165_565F_4D84_855D_23231614D099__INCLUDED_)
#define AFX_FRUSTUMCULLING_H__77303165_565F_4D84_855D_23231614D099__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000


#include "../Libaries/MathLib.h"

#include <windows.h>
#include <gl/gl.h>


class CFrustum  
{
private:
	float frustum[6][4];

	float proj[16];
	float modl[16];
	float clip[16];

	float oldProjectionMatrix[16];
	float oldModelviewMatrix[16];

public:
	bool change;


public:
	CFrustum();
	virtual ~CFrustum();

	void CalculateFrustum(bool calculate);
	bool SameMatrix();

	bool PointInFrustum(float x, float y, float z);
};

#endif // !defined(AFX_FRUSTUMCULLING_H__77303165_565F_4D84_855D_23231614D099__INCLUDED_)