📄 aabb.h
字号:
////////////////////////////////////////////////////
// Axis-aligned bounding box
// 2003-03-15
////////////////////////////////////////////////////
#ifndef _AABB_H_
#define _AABB_H_
#include "../entity/trsnode.h"
//#include "plane.h"
class GcAABB : public GcTRSNode
{
public:
GcAABB();
GcAABB( GcVector3 & v );
GcAABB( GcVector3 & v, GcVector3 & pos );
GcAABB( GcAABB & aabb );
void RenderOutlines();
const bool Intersects( GcAABB * box );
// const bool Intersects( GcPlane & plane );
inline const bool Intersects( GcAABB & plane ); // FIXME: Make param const
void SetExtents( GcVector3 & v );
std::string Info();
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() {}
GcVector3 Point( int i );
//const GcVector3 Center() const { return GcVector3( GetWorldTranslation() ); }
protected:
GcVector3 m_extents;
GcVector3 m_orthogonals[3];
GcVector3 m_points[8];
};
#endif /* _AABB_H_ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -