⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 roadmap.h

📁 多机器人路径规划算法
💻 H
字号:
/* \file Roadmap.h Contains the class Roadmap. */

#ifndef __ROADMAP_H__
#define __ROADMAP_H__

#include "RVODef.h"
#include "RoadmapVertex.h"

namespace RVO {

  /* The class defining the roadmap. */
  class Roadmap
  {
  private:
    /* Constructor. */
    Roadmap();
    /* Deconstructor. */
    ~Roadmap();

    /* Initializes visibility of roadmap vertices after obstacles and roadmap have been read in. */
    void init();
           
    /* Flag defining whether the mutually visible roadmap vertices should automatically be connected by edges. */
    bool _automatic;

    /* The list of roadmap vertices. */
    std::vector<RoadmapVertex*> _vertices;

    /* Adds an edge between two vertices to the roadmap (i.e. add neighbors to each of the roadmap vertices).
    \param vID_1 The ID of the fisrt vertex. 
    \param vID_2 The ID of the second vertex. */
    void addEdge(int vID_1, int vID_2);
    
    /* Adds a vertex to the roadmap.
    \param p The position of the vertex. 
    */
    void addVertex(const Vector2& p);
    
  protected:
    /* A reference to the singleton simulator. */
    static RVOSimulator* _sim;

    friend class Agent;
    friend class RoadmapVertex;
    friend class Goal;
    friend class RVOSimulator;
  };

} // RVO namespace 
#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -