xyginext  0.2.0
Second generation of xygine game creation framework
Public Member Functions | Friends | List of all members
xy::QuadTreeItem Class Referencefinal

Entities with a QuadTreeItem and Transform component will be actively partitioned an in QuadTree system which is added to the entities scene. More...

#include <QuadTreeItem.hpp>

Public Member Functions

 QuadTreeItem ()
 Default constructor.
 
 QuadTreeItem (sf::FloatRect area, std::uint64_t flags=std::numeric_limits< std::uint64_t >::max())
 Construct a QuadTreeItem from a given area and filter flags.
 
void setArea (sf::FloatRect)
 Sets the area of the quad tree item in relative coordinates.
 
void setFilterFlags (std::uint64_t flags)
 Allows filtering QuadTreeItems during QuadTree queries. The filter consists of up to 64 flags allowing quad tree items to be categorised. When the quad tree is queried only the items matching the query flags are returned. For example setting the flag to 4 will set the 3rd bit, and items matching a quad tree query which includes the 3rd bit will be included in the results. All flags are set by default, so all items are returned in a query.
 
std::uint64_t getFilterFlags () const
 Returns the current flags for this item. Defaults to the max size of uint64 (all flags set)
 

Friends

class QuadTree
 
class QuadTreeNode
 

Detailed Description

Entities with a QuadTreeItem and Transform component will be actively partitioned an in QuadTree system which is added to the entities scene.