このようなネストされた継承された構造があります。
template <typename U, typename T, typename _Prd = equal_to<T> >
class Octree
{
...
private :
BBox<T,3,_Prd> bounds ;
void SplitNode() ;
virtual bool isSplit () ;
...
};
template <typename U, typename T, typename _Prd = equal_to<T> >
class Hull
{
...
//nest the octree class here
class OcHull: public Octree<U, T, _Prd>
{
bool isSplit () ;
};
OcHull * GetOcHull() const ;
private:
OcHull * hullstructure ;
};
そして、OcHull の境界変数にアクセスしたい場合、コンパイラはこの変数があることを認識しません。
template <typename U, typename T, typename _Prd>
bool Hull<U,T,_Prd>::OcHull::isSplit()
{
assert(typeid(double) == typeid(T)) ;
// for each possible view of currect cell
for (size_t i = 0 ; i < camera_array.size() ; ++i)
{
//project centre of the cell
// bounds is not detected. bound is meant to be inherited from BBox<T,3,_Prd> bounds ; above
Vec<double,2> projectedP = camera_array[i].projectToCamPlane(bounds.centre) ;
...
}
}
エラーは
Hull.hpp:84: error: ‘bounds’ was not declared in this scope
境界が見えない理由を教えてください。