1 #ifndef GfxTL__BBOXBUILDINFORMATIONTREESTRATEGY_HEADER__
2 #define GfxTL__BBOXBUILDINFORMATIONTREESTRATEGY_HEADER__
7 template<
class InheritedStrategyT >
10 typedef typename InheritedStrategyT::value_type
value_type;
13 :
public InheritedStrategyT::CellData
16 template<
class BaseT >
18 :
public InheritedStrategyT::template
StrategyBase< BaseT >
30 :
public BaseType::BuildInformation
59 template<
class BuildInformationT >
62 BaseType::InitRootBuildInformation(bi);
69 typename BaseType::HandleType i = bi->Range().first;
70 BaseType::AssignAsAABoxMin(this->at(this->Dereference(i)), &bi->m_bbox[0]);
71 BaseType::AssignAsAABoxMax(this->at(this->Dereference(i)), &bi->m_bbox[1]);
72 for (++i; i != bi->Range().second; ++i)
74 BaseType::IncludeInAABox(this->at(this->Dereference(i)), bi->BBox());
78 template<
class BuildInformationT >
80 const BuildInformationT& parentInfo,
unsigned int childIdx,
81 BuildInformationT* bi)
83 BaseType::InitBuildInformation(parent, parentInfo, childIdx,
91 if (!(bi->Range().second - bi->Range().first))
93 std::fill(bi->m_bbox[0], bi->m_bbox[0] + BaseType::m_dim,
95 std::fill(bi->m_bbox[1], bi->m_bbox[1] + BaseType::m_dim,
99 typename BaseType::HandleType i = bi->Range().first;
100 BaseType::AssignAsAABoxMin(this->at(this->Dereference(i)), &bi->m_bbox[0]);
101 BaseType::AssignAsAABoxMax(this->at(this->Dereference(i)), &bi->m_bbox[1]);
102 for (++i; i != bi->Range().second; ++i)
104 BaseType::IncludeInAABox(this->at(this->Dereference(i)), bi->BBox());