// =================================================================== // $Id: $ // // ktb.h // definition of classes for CKTB tree building up and traversal // // Class: CKTBNodeAbstract, SKTBNode, CKTBAllocMan, CKTBNodeIterator // // REPLACEMENT_STRING // // Copyright by Vlastimil Havran, 2006 - email to vhavran AT seznam.cz // Initial coding by Vlastimil Havran, 2006 #ifndef __KTBCONF_H__ #define __KTBCONF_H__ // GOLEM headers #include "configh.h" #include "subdivm.h" #ifdef __SSE__ // SSE supported #include #endif // If we support the use of SSE instructions for ray shooting //#define _USE_HAVRAN_SSE namespace GtpVisibilityPreprocessor { #ifdef __SSE__ // The second parameter is // #define GPREFETCH(A, B) _mm_prefetch((const char*)A, B) #else #define GPREFETCH(A, B) #endif #if defined(__INTEL_COMPILER)||defined(_MSC_VER) // Intel compiler or Microsoft Compiler #define GALIGN16 __declspec(align(16)) #endif #ifndef __INTEL_COMPILER #ifdef __GNUC__ // GNU compiler - somehow correct, but it crashes during // compilation for GCC 4.1.2 !!!!!!!!!!!!!!!!!!!!!!!!!!!! //#define GALIGN16 __attribute((aligned(16))) #undef GALIGN16 #define GALIGN16 #endif #endif // forward declarations class CObjectList; // The statistics for construction #define _KTB_CONSTR_STATS // If to use 8 Bytes representation of the node #define _KTB8Bytes // If to use allocated boxes in minbox nodes or allocate // them as a whole nodes, the difference is access time // when the boxes are not needed #define _SHORT_FORM_MINBOX // ----------------------------------------------- // The containter at the leaves or interior node (tagged object lists) // We use vector representation of object list typedef CObjectList* CKTBObjectContainer; // ============================================== // definition of axes of spatial subdivision class CKTBAxes { public: enum Axes { // The axes of a splitting plane EE_X_axis = 0, EE_Y_axis = 1, EE_Z_axis = 2, // The leaf node, full or empty EE_Leaf = 3, // The link node for DFS order representation EE_Link = 4, EE_X_axisBox = 5, EE_Y_axisBox = 6, EE_Z_axisBox = 7, }; enum { EE_Mask = 0x7 }; }; } #endif // __KTBCONF_H__