"L. Spiro Engine"
Public Member Functions | Protected Attributes | Friends

lsp::CQuadTreeNode Class Reference

A node in a quad-tree. More...

#include <LSPQuadTreeNode.h>

List of all members.

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
CQuadTreeNodem_pqtnChildren [4]
CVector2 m_vCenter
LSREAL m_fRadius

Friends

class CQuadTree

Detailed Description

A node in a quad-tree.

Class CQuadTreeNode Description: A node in a quad-tree.


Member Function Documentation

LSBOOL LSE_CALL lsp::CQuadTreeNode::AddObject ( CQuadTreeObject _pqtoObject)

Adds an object to the node.

Parameters:
_pqtoObjectThe object to add to the node.
Returns:
Returns true if there were no memory allocation issues.
LSE_INLINE const CVector2 &LSE_CALL lsp::CQuadTreeNode::GetCenter ( ) const

Gets the center of the node.

Returns:
Returns the center of the node.
LSE_INLINE LSREAL LSE_CALL lsp::CQuadTreeNode::GetRadius ( ) const

Gets the radius of the node.

Returns:
Returns the radius of the node.
LSVOID LSE_CALL lsp::CQuadTreeNode::RemObject ( CQuadTreeObject _pqtoObject)

Removes an object from the node.

Parameters:
_pqtoObjectThe 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.

Parameters:
_vPosCenter of the node.
_fRadiusRadius of the node.
LSVOID LSE_CALL lsp::CQuadTreeNode::SetChild ( LSUINT32  _ui32Index,
CQuadTreeNode _pqtnChild 
)

Sets a child.

Parameters:
_ui32IndexIndex of the child to set.
_pqtnChildPointer to the child node.

Member Data Documentation

LSREAL lsp::CQuadTreeNode::m_fRadius [protected]

The radius of the node.

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.


The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator