⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 aabr.h

📁 小型的3D游戏引擎
💻 H
字号:
////////////////////////////////////////////////////
// Axis-aligned bounding rectangle
// 2003-03-15
////////////////////////////////////////////////////
#ifndef _AABR_H_
#define _AABR_H_
#include "../entity/trsnode.h"

class GcAABR : public GcTRSNode
{
	public:
		GcAABR();
		GcAABR( GcVector3 & v );
		GcAABR( GcVector3 & v, GcVector3 & pos );
		GcAABR( GcAABR & aabb );
		
		void RenderOutlines();
		const bool Intersects( GcAABR * box );

		void SetExtents( GcVector3 & v ) { m_extents = v; }
		float Extent( int i ) { return m_extents[i]; }
		const GcVector3 & GetExtent() const { return m_extents; }
		GcVector3 & GetExtents() { return m_extents; }
		GcVector3 * GetOrthogonals() { return m_orthogonals; }
		GcVector3 & GetOrthogonal( int i ) { return m_orthogonals[i]; }
		void Render() {}
		
		//const GcVector3 Center() const { return GcVector3( GetWorldTranslation() ); }

	protected:
		GcVector3 m_extents;
		GcVector3 m_orthogonals[3];
		

};

#endif /* _AABR_H_ */

⌨️ 快捷键说明

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