// Author : Chris Tolley
// Date   : 7/13/2004
// QuadNode.h contains the declaration for an abstract base class to use
// in a quad tree.

#if !defined(AFX_QUADNODE_H__1DE36834_D911_47A9_AD23_B8A83E841593__INCLUDED_)
#define AFX_QUADNODE_H__1DE36834_D911_47A9_AD23_B8A83E841593__INCLUDED_

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

#include <iostream>
using namespace std;

class QuadNode  
{
public:
	// Default Constructor
	QuadNode( unsigned short midX, unsigned short midZ, float radius )
		: m_usMidX( midX ), m_usMidZ( midZ ), m_fRadius( radius ) {};

	// Returns true if this node is inside a sphere created from point
	// x,z and radius
	virtual bool InSphere( float x, float z, float radius );

	// Destructor
	virtual ~QuadNode() {};

protected:
	// The center point of this node
	unsigned short m_usMidX;
	unsigned short m_usMidZ;

	// The edge size or radius of this node
	float m_fRadius;
};

#endif // !defined(AFX_QUADNODE_H__1DE36834_D911_47A9_AD23_B8A83E841593__INCLUDED_)
