#include "base.hh"
#include "gfx.hh"
#include "eng.hh"
#include "eng_bsp.hh"
#include "eng_debug.hh"
Namespaces | |
| namespace | eng |
Defines | |
| #define | ENG_BSP_CC 1 |
| #define | CODE_FOR_EACH_OBJECT_IN_PARTITION(INNER_CODE) |
Typedefs | |
| typedef SortableDistance < Object > | eng::SortableObject |
Functions | |
| static BoxVolume | eng::SplitLeft (const BoxVolume &volume, uint axis) |
| static BoxVolume | eng::SplitRight (const BoxVolume &volume, uint axis) |
Objects that don't fit inside a BSP: ------------------------------------------ BSP has two policies: ePolicy_FORCE or ePolicy_THROW_EXCEPTION. Force fit is appropriate for dynamic Objects that normally can transition across BSP boundaries. Alternatively, the BSP code can throw an exception to let client resolve the problem.
Testing visibility by frustum instead of viewpoint: --------------------------------------------------- The classic way of testing if a BSP node is to test if it is facing the viewpoint. This implementation instead tests if a BSP node's volume is inside the view frustum. This alternative is equivalent. The reason is that the functions for frustum culling were available. That is, view-frustum culling is reused for BSP node culling.
Opaque/translucent Objects: --------------------------- Most terminal partitions contain only opaque Objects which can be left unsorted (rely on depth buffer). Those that contain a translucent Object requires manually sorting according to distance from the viewpoint (slow but rare).
| #define CODE_FOR_EACH_OBJECT_IN_PARTITION | ( | INNER_CODE | ) |
Value:
{ \
if ( mObjectList != NULL ) \
{ \
for ( ObjectList::iterator iter = mObjectList->begin(); \
iter != mObjectList->end(); \
++iter ) \
{ \
SharedPtr<Object> object = *iter; \
CHECK_TYPESIG(object,TYPESIG_OBJECT); \
INNER_CODE; \
} \
} \
}
| #define ENG_BSP_CC 1 |
Palomino 3D Engine documents generated by doxygen 1.5.3 on Fri Nov 23 11:26:14 2007