started working on the tex-part
started working on eval-graphics ned helper methods tested some new aspects some fixes and changes added some graphics new test-floorplan many cleanups
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
#include "MyGridNode.h"
|
||||
|
||||
/**
|
||||
* allows dijkstra calculation on top of our data-structure
|
||||
* allows BETTER dijkstra calculation on top of our data-structure
|
||||
*/
|
||||
class DijkstraMapper {
|
||||
|
||||
@@ -19,9 +19,31 @@ public:
|
||||
const MyGridNode* getNeighbor(const MyGridNode& node, const int idx) const {return &grid.getNeighbor(node, idx);}
|
||||
|
||||
float getWeightBetween(const MyGridNode& n1, const MyGridNode& n2) const {
|
||||
float d = ((Point3)n1 - (Point3)n2).length(2.0);
|
||||
float d = ((Point3)n1 - (Point3)n2).length(2) ;
|
||||
//if (d > 20) {d*= 1.30;}
|
||||
return d / std::pow(n2.imp, 3);
|
||||
d /= std::pow(n2.imp, 3);
|
||||
return d;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* allows NORMAL dijkstra calculation on top of our data-structure
|
||||
*/
|
||||
class DijkstraMapperNormal {
|
||||
|
||||
Grid<MyGridNode>& grid;
|
||||
|
||||
public:
|
||||
|
||||
DijkstraMapperNormal(Grid<MyGridNode>& grid) : grid(grid) {;}
|
||||
|
||||
int getNumNeighbors(const MyGridNode& node) const {return node.getNumNeighbors();}
|
||||
|
||||
const MyGridNode* getNeighbor(const MyGridNode& node, const int idx) const {return &grid.getNeighbor(node, idx);}
|
||||
|
||||
float getWeightBetween(const MyGridNode& n1, const MyGridNode& n2) const {
|
||||
return ((Point3)n1 - (Point3)n2).length();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user