frustum.h

来自「小型的3D游戏引擎」· C头文件 代码 · 共 32 行

H
32 行
字号
#ifndef _FRUSTUM_H_
#define _FRUSTUM_H_

#include "math/vector.h"
#include "math/math.h"
#include "math/aabb.h"
#include "math/plane.h"

class GcFrustum
{
public:

	// Constructor / Destructor
	GcFrustum();
	~GcFrustum();


	// Extract the frustum form OpenGL
	void Extract();

	// Check to see if the box is in the frustum
	//bool BoxInFrustum(float x, float y, float z, float size, float height);

	bool Contains(GcAABB & aabb);

private:
	GcPlane m_frustum[6];
};

GcFrustum * ActiveFrustum();

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?