2016-07-12 17:40:45 +00:00
|
|
|
#pragma once
|
2015-10-15 18:01:08 +00:00
|
|
|
|
2020-03-24 22:03:54 +00:00
|
|
|
#include "core_global.h"
|
2015-10-15 18:01:08 +00:00
|
|
|
|
|
|
|
namespace paysages {
|
|
|
|
namespace basics {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Iterator delegate that can receive sequential grid coordinates.
|
|
|
|
*
|
|
|
|
* This may be useful for ray marching algorithms for example.
|
|
|
|
*/
|
2020-03-24 22:03:54 +00:00
|
|
|
class CORESHARED_EXPORT SpaceGridIterator {
|
2015-11-09 21:30:46 +00:00
|
|
|
public:
|
2015-10-15 18:01:08 +00:00
|
|
|
SpaceGridIterator();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Abstract method to implement to receive grid coordinates.
|
|
|
|
*
|
|
|
|
* Return false to interrupt the iteration, true to continue.
|
|
|
|
*/
|
|
|
|
virtual bool onCell(int x, int y, int z) = 0;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|