29#ifndef GU_BV4_SLABS_SWIZZLED_ORDERED_H
30#define GU_BV4_SLABS_SWIZZLED_ORDERED_H
74 template<
class LeafTestT,
class ParamsT>
75 static void BV4_ProcessStreamSwizzledOrderedQ(
const BVDataPackedQ*
PX_RESTRICT node, PxU32 initData, ParamsT*
PX_RESTRICT params)
77 const BVDataPackedQ* root = node;
80 PxU32 stack[GU_BV4_STACK_SIZE];
83 const PxU32* tmp =
reinterpret_cast<const PxU32*
>(¶ms->mLocalDir_Padded);
84 const PxU32 X = tmp[0]>>31;
85 const PxU32 Y = tmp[1]>>31;
86 const PxU32 Z = tmp[2]>>31;
90 const PxU32 bitIndex = 3+(Z|(Y<<1)|(X<<2));
91 const PxU32 dirMask = 1u<<bitIndex;
95 const PxU32 childData = stack[--nb];
96 node = root + getChildOffset(childData);
97 const PxU32 nodeType = getChildType(childData);
99 const BVDataSwizzledQ* tn =
reinterpret_cast<const BVDataSwizzledQ*
>(node);
102 BV4_ProcessNodeOrdered2_SwizzledQ<LeafTestT, 0>(code2, tn, params);
103 BV4_ProcessNodeOrdered2_SwizzledQ<LeafTestT, 1>(code2, tn, params);
105 BV4_ProcessNodeOrdered2_SwizzledQ<LeafTestT, 2>(code2, tn, params);
107 BV4_ProcessNodeOrdered2_SwizzledQ<LeafTestT, 3>(code2, tn, params);
115 template<
class LeafTestT,
class ParamsT>
116 static void BV4_ProcessStreamSwizzledOrderedNQ(
const BVDataPackedNQ*
PX_RESTRICT node, PxU32 initData, ParamsT*
PX_RESTRICT params)
118 const BVDataPackedNQ* root = node;
121 PxU32 stack[GU_BV4_STACK_SIZE];
124 const PxU32* tmp =
reinterpret_cast<const PxU32*
>(¶ms->mLocalDir_Padded);
125 const PxU32 X = tmp[0]>>31;
126 const PxU32 Y = tmp[1]>>31;
127 const PxU32 Z = tmp[2]>>31;
131 const PxU32 bitIndex = 3+(Z|(Y<<1)|(X<<2));
132 const PxU32 dirMask = 1u<<bitIndex;
136 const PxU32 childData = stack[--nb];
137 node = root + getChildOffset(childData);
138 const PxU32 nodeType = getChildType(childData);
140 const BVDataSwizzledNQ* tn =
reinterpret_cast<const BVDataSwizzledNQ*
>(node);
143 BV4_ProcessNodeOrdered2_SwizzledNQ<LeafTestT, 0>(code2, tn, params);
144 BV4_ProcessNodeOrdered2_SwizzledNQ<LeafTestT, 1>(code2, tn, params);
146 BV4_ProcessNodeOrdered2_SwizzledNQ<LeafTestT, 2>(code2, tn, params);
148 BV4_ProcessNodeOrdered2_SwizzledNQ<LeafTestT, 3>(code2, tn, params);
#define PX_RESTRICT
Definition PxPreprocessor.h:355