posts - 310, comments - 0, trackbacks - 0, articles - 0
  C++博客 :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理
An Introduction to Navigation
翻译:kun 2014.12.4 


The navigation side of CAINav consists of features used to create and use navigation meshes for pathfinding and local steering.
CAINav提供创建Navmesh、基于Navmesh的寻路和局部转向避障。


Core: org.critterai.nav
Unity extensions: org.critterai.nav.u3d
核心命名空间:org.critterai.nav
Unity扩展:org.critterai.nav.u3d




There are five main classes you'll be dealing with:
经常和你打交道的类有五个:


Note Note:
CAINav uses the OpenGL coordinate system.
注意:
CAINav使用OpenGL坐标系。


The Navmesh class defines the structure and state of the navigation mesh. The only user component that deals directly with this class on a regular basis is the component responsible for creating the mesh and managing its state. Normal navigation clients, the one's needing to perform pathfinding and such, rarely if ever interact directly with the navigation mesh.
【Navmesh】类定义了导航网格的数据结构和状态。这个类用于保存用户创建的导航网格数据和数据状态。需要使用导航的地方一般是进行寻路操作,偶尔也可以使用navmesh进行一些交互。


The most important class to understand and become comfortable with is the NavmeshQuery class. It provides almost all of the client navigation features, including A* and Dijkstra path searches, string pulling, point and polygon searches, raycasting, etc.
【NavmeshQuery】类是需要理解透彻的最重要的类。它提供了所有用户级的导航功能,包括使用A*算法和Dijkstra算法进行寻路、绳索牵引、搜索点和多边形、射线查询等等。


The NavmeshQueryFilter is a seemingly minor class, but it has a large impact on navigation. Filters are used to define the costs of traversing the mesh and flags that control which parts of the navigation mesh are included in operations. Multiple filters can be used to customize the navigation behavior on a per client basis.
【NavmeshQueryFilter】是一个看起来很小的类,但是它对导航的影响很大。过滤器用来定义穿过某个区域时的代价。可以使用多个过滤器来实现自定义的导航行为。


The PathCorridor class provides a way of moving along a navigation path without worrying about the minutiae of managing the path.
【PathCorridor】类提供了一种沿导航路径,而不必担心管理路径的细节(1)。


The CrowdManager is the big beast of the navigation classes. It not only handles a lot of the path management for you, but also local steering and dynamic avoidance between navigation clients. I.e. It can keep your agents from running into each other.
【CrowdManager】类是十分庞杂的一个类。它不仅为你处理了非常多的路径管理相关的事情,同时也处理一些局部避障和避开其它寻路代理对象。也就是说,他可以让所有的代理对象不会相互穿插。


(1)需要实验。