"L. Spiro Engine"
|
A node in a quad-tree. More...
#include <LSPQuadTreeNode.h>
Public Member Functions | |
LSVOID LSE_CALL | SetCenterAndRadius (const CVector2 &_vPos, LSREAL _fRadius) |
LSE_INLINE const CVector2 &LSE_CALL | GetCenter () const |
LSE_INLINE LSREAL LSE_CALL | GetRadius () const |
LSVOID LSE_CALL | SetChild (LSUINT32 _ui32Index, CQuadTreeNode *_pqtnChild) |
LSBOOL LSE_CALL | AddObject (CQuadTreeObject *_pqtoObject) |
LSVOID LSE_CALL | RemObject (CQuadTreeObject *_pqtoObject) |
Protected Attributes | |
CSingleLinkedList < CQuadTreeObject * > | m_sllObjects |
CQuadTreeNode * | m_pqtnChildren [4] |
CVector2 | m_vCenter |
LSREAL | m_fRadius |
Friends | |
class | CQuadTree |
A node in a quad-tree.
Class CQuadTreeNode Description: A node in a quad-tree.
LSBOOL LSE_CALL lsp::CQuadTreeNode::AddObject | ( | CQuadTreeObject * | _pqtoObject | ) |
Adds an object to the node.
_pqtoObject | The object to add to the node. |
LSE_INLINE const CVector2 &LSE_CALL lsp::CQuadTreeNode::GetCenter | ( | ) | const |
Gets the center of the node.
LSE_INLINE LSREAL LSE_CALL lsp::CQuadTreeNode::GetRadius | ( | ) | const |
Gets the radius of the node.
LSVOID LSE_CALL lsp::CQuadTreeNode::RemObject | ( | CQuadTreeObject * | _pqtoObject | ) |
Removes an object from the node.
_pqtoObject | The object to remove from the node. |
LSVOID LSE_CALL lsp::CQuadTreeNode::SetCenterAndRadius | ( | const CVector2 & | _vPos, |
LSREAL | _fRadius | ||
) |
Sets the center and radius of the node.
_vPos | Center of the node. |
_fRadius | Radius of the node. |
LSVOID LSE_CALL lsp::CQuadTreeNode::SetChild | ( | LSUINT32 | _ui32Index, |
CQuadTreeNode * | _pqtnChild | ||
) |
Sets a child.
_ui32Index | Index of the child to set. |
_pqtnChild | Pointer to the child node. |
LSREAL lsp::CQuadTreeNode::m_fRadius [protected] |
The radius of the node.
CQuadTreeNode* lsp::CQuadTreeNode::m_pqtnChildren[4] [protected] |
The 4 children of this node.
CSingleLinkedList<CQuadTreeObject *> lsp::CQuadTreeNode::m_sllObjects [protected] |
Linked list of objects in this node.
CVector2 lsp::CQuadTreeNode::m_vCenter [protected] |
The center of the node.