载入中...
搜索中...
未找到
eve::spatial::BSPTree2D类 参考

Binary space partition tree (kd-style AABB splits) for 2D culling. Alternating X/Y splits at node midplanes; spanning items stay on the node. 更多...

#include <BSPTree2D.h>

Public 成员函数

 BSPTree2D (float minX, float minY, float maxX, float maxY, int maxDepth=12, int maxPerNode=8)
 
 ~BSPTree2D ()=default
 
 BSPTree2D (const BSPTree2D &)=delete
 
BSPTree2Doperator= (const BSPTree2D &)=delete
 
void clear ()
 
bool insert (int id, float minX, float minY, float maxX, float maxY)
 
bool remove (int id)
 
bool update (int id, float minX, float minY, float maxX, float maxY)
 
bool contains (int id) const
 
int getCount () const
 
int queryPoint (float x, float y)
 
int queryRect (float minX, float minY, float maxX, float maxY)
 
int queryCircle (float cx, float cy, float radius)
 
int getResultCount () const
 
int getResultId (int index) const
 
float getMinX () const
 
float getMinY () const
 
float getMaxX () const
 
float getMaxY () const
 
int getMaxDepth () const
 
int getMaxPerNode () const
 

详细描述

Binary space partition tree (kd-style AABB splits) for 2D culling. Alternating X/Y splits at node midplanes; spanning items stay on the node.

在文件 BSPTree2D.h16 行定义.

构造及析构函数说明

◆ BSPTree2D() [1/2]

eve::spatial::BSPTree2D::BSPTree2D ( float  minX,
float  minY,
float  maxX,
float  maxY,
int  maxDepth = 12,
int  maxPerNode = 8 
)

◆ ~BSPTree2D()

eve::spatial::BSPTree2D::~BSPTree2D ( )
default

◆ BSPTree2D() [2/2]

eve::spatial::BSPTree2D::BSPTree2D ( const BSPTree2D )
delete

成员函数说明

◆ clear()

void eve::spatial::BSPTree2D::clear ( )

在文件 BSPTree2D.cpp27 行定义.

引用了 eve::spatial::QueryIds::clear().

◆ contains()

bool eve::spatial::BSPTree2D::contains ( int  id) const

在文件 BSPTree2D.cpp34 行定义.

被这些函数引用 insert(), remove() , 以及 update().

◆ getCount()

int eve::spatial::BSPTree2D::getCount ( ) const
inline

在文件 BSPTree2D.h30 行定义.

◆ getMaxDepth()

int eve::spatial::BSPTree2D::getMaxDepth ( ) const
inline

在文件 BSPTree2D.h43 行定义.

◆ getMaxPerNode()

int eve::spatial::BSPTree2D::getMaxPerNode ( ) const
inline

在文件 BSPTree2D.h44 行定义.

◆ getMaxX()

float eve::spatial::BSPTree2D::getMaxX ( ) const
inline

在文件 BSPTree2D.h41 行定义.

引用了 eve::spatial::AABB2::maxX.

◆ getMaxY()

float eve::spatial::BSPTree2D::getMaxY ( ) const
inline

在文件 BSPTree2D.h42 行定义.

引用了 eve::spatial::AABB2::maxY.

◆ getMinX()

float eve::spatial::BSPTree2D::getMinX ( ) const
inline

在文件 BSPTree2D.h39 行定义.

引用了 eve::spatial::AABB2::minX.

◆ getMinY()

float eve::spatial::BSPTree2D::getMinY ( ) const
inline

在文件 BSPTree2D.h40 行定义.

引用了 eve::spatial::AABB2::minY.

◆ getResultCount()

int eve::spatial::BSPTree2D::getResultCount ( ) const
inline

在文件 BSPTree2D.h36 行定义.

引用了 eve::spatial::QueryIds::getCount().

◆ getResultId()

int eve::spatial::BSPTree2D::getResultId ( int  index) const
inline

在文件 BSPTree2D.h37 行定义.

引用了 eve::spatial::QueryIds::getId().

◆ insert()

bool eve::spatial::BSPTree2D::insert ( int  id,
float  minX,
float  minY,
float  maxX,
float  maxY 
)

在文件 BSPTree2D.cpp36 行定义.

引用了 b, contains(), id, eve::spatial::makeAABB2() , 以及 remove().

被这些函数引用 update().

◆ operator=()

BSPTree2D & eve::spatial::BSPTree2D::operator= ( const BSPTree2D )
delete

◆ queryCircle()

int eve::spatial::BSPTree2D::queryCircle ( float  cx,
float  cy,
float  radius 
)

◆ queryPoint()

int eve::spatial::BSPTree2D::queryPoint ( float  x,
float  y 
)

◆ queryRect()

int eve::spatial::BSPTree2D::queryRect ( float  minX,
float  minY,
float  maxX,
float  maxY 
)

◆ remove()

bool eve::spatial::BSPTree2D::remove ( int  id)

在文件 BSPTree2D.cpp47 行定义.

引用了 contains().

被这些函数引用 insert().

◆ update()

bool eve::spatial::BSPTree2D::update ( int  id,
float  minX,
float  minY,
float  maxX,
float  maxY 
)

在文件 BSPTree2D.cpp54 行定义.

引用了 contains() , 以及 insert().


该类的文档由以下文件生成: