mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-05-02 14:57:59 +03:00
Some terrain fixes
This commit is contained in:
parent
0545622f5a
commit
fa76d1631b
4 changed files with 9 additions and 9 deletions
|
@ -46,12 +46,12 @@ namespace
|
|||
|
||||
// Algorithm described by Hanan Samet - 'Neighbour Finding in Quadtrees'
|
||||
// http://www.cs.umd.edu/~hjs/pubs/SametPRIP81.pdf
|
||||
Terrain::QuadTreeNode* searchNeighbourRecursive (Terrain::QuadTreeNode* currentNode, Terrain::Direction dir)
|
||||
QuadTreeNode* searchNeighbourRecursive (QuadTreeNode* currentNode, Direction dir)
|
||||
{
|
||||
if (!currentNode->getParent())
|
||||
return NULL; // Arrived at root node, the root node does not have neighbours
|
||||
|
||||
Terrain::QuadTreeNode* nextNode;
|
||||
QuadTreeNode* nextNode;
|
||||
if (adjacent(currentNode->getDirection(), dir))
|
||||
nextNode = searchNeighbourRecursive(currentNode->getParent(), dir);
|
||||
else
|
||||
|
|
|
@ -14,6 +14,8 @@ namespace Terrain
|
|||
/// We keep storage of terrain data abstract here since we need different implementations for game and editor
|
||||
class Storage
|
||||
{
|
||||
public:
|
||||
virtual ~Storage() {}
|
||||
private:
|
||||
virtual ESM::Land* getLand (int cellX, int cellY) = 0;
|
||||
virtual const ESM::LandTexture* getLandTexture(int index, short plugin) = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue