XLE  v0.02.0
Classes | Public Types | Public Member Functions | Protected Attributes | Friends | List of all members
SceneEngine::PlacementsQuadTree Class Reference

Quad tree arrangement for static placements More...

#include <PlacementsQuadTree.h>

Classes

class  Metrics
 

Public Types

typedef std::pair< Float3, Float3 > BoundingBox
 

Public Member Functions

bool CalculateVisibleObjects (const float cellToClipAligned[], const BoundingBox objCellSpaceBoundingBoxes[], size_t objStride, unsigned visObjs[], unsigned &visObjsCount, unsigned visObjMaxCount, Metrics *metrics=nullptr) const
 
 PlacementsQuadTree (const BoundingBox objCellSpaceBoundingBoxes[], size_t objStride, size_t objCount)
 

Protected Attributes

std::unique_ptr< Pimpl > _pimpl
 

Friends

class PlacementsQuadTreeDebugger
 

Detailed Description

Quad tree arrangement for static placements

Given a set of objects (identified by cell-space bounding boxes) calculate a balanced quad tree. This can be used to optimise camera frustum.

Use "CalculateVisibleObjects" to perform camera frustum tests using the quad tree information.

Note that all object culling is done using bounding boxes axially aligned in cell-space (not object local space). This can be a little less accurate than object space. But it avoids an expensive matrix multiply. If the world space bounding box straddles the edge of the frustum, the caller may wish to perform a local space bounding box test to further improve the result.


The documentation for this class was generated from the following files: