added stuff for bluetooth
worked on resampling methods
This commit is contained in:
@@ -161,6 +161,19 @@ namespace NM {
|
||||
float getWeightBetween(const TemporalNode& n1, const TemporalNode& n2) const {return n1.pt.getDistance(n2.pt);}
|
||||
};
|
||||
|
||||
struct NodeAccessFavorCenter {
|
||||
int getNumNeighbors(const TemporalNode& n) const {return n.neighbors.size();}
|
||||
const TemporalNode* getNeighbor(const TemporalNode& n, const int idx) const {return n.neighbors[idx];}
|
||||
float getWeightBetween(const TemporalNode& n1, const TemporalNode& n2) const {
|
||||
|
||||
if(n2.pointIndex == 3){
|
||||
return n1.pt.getDistance(n2.pt);
|
||||
} else {
|
||||
return n1.pt.getDistance(n2.pt) / 0.2f;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
public:
|
||||
|
||||
/** attach distance/triangle-to-target to the ToTarget struct */
|
||||
@@ -187,7 +200,8 @@ namespace NM {
|
||||
|
||||
// Node* end = nodes[0]; // TODO;
|
||||
|
||||
NodeAccess acc;
|
||||
//NodeAccess acc;
|
||||
NodeAccessFavorCenter acc;
|
||||
|
||||
// dijkstra
|
||||
Dijkstra<TemporalNode> dijkstra;
|
||||
|
||||
@@ -151,7 +151,7 @@ namespace NM {
|
||||
|
||||
|
||||
/**
|
||||
* higher probability for potints that approach the target location
|
||||
* higher probability for points that approach the target location
|
||||
*/
|
||||
template <typename Tria> class WalkEvalApproachesTarget : public NavMeshWalkEval<Tria> {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user