-
- /*
- Get the contents of the requested area from somewhere.
- Shall touch only nodes that have VOXELFLAG_NOT_LOADED
- Shall reset VOXELFLAG_NOT_LOADED
-
- If not found from source, add with VOXELFLAG_INEXISTENT
- */
- virtual void emerge(VoxelArea a, s32 caller_id=-1)
- {
- //dstream<<"emerge p=("<<p.X<<","<<p.Y<<","<<p.Z<<")"<<std::endl;
- addArea(a);
- for(s32 z=a.MinEdge.Z; z<=a.MaxEdge.Z; z++)
- for(s32 y=a.MinEdge.Y; y<=a.MaxEdge.Y; y++)
- for(s32 x=a.MinEdge.X; x<=a.MaxEdge.X; x++)
- {
- s32 i = m_area.index(x,y,z);
- // Don't touch nodes that have already been loaded
- if(!(m_flags[i] & VOXELFLAG_NOT_LOADED))
- continue;
- m_flags[i] = VOXELFLAG_INEXISTENT;
- }
- }