Week 4 blog

imaj_ashwini
Published: 06/22/2020

Hello everyone,

We are into the fourth week now, and closing into the first month. Last week, I rearranged all my functions and classes so that it becomes more readable, organised and clean. Now the main classes and the funtions involved in the integration of recast/detour into Panda3D are:

  • NavMesh
    • It stores the navigation mesh generated by NavMeshBuilder class.
    • It can called as an object, or more Panda3D specifically, as PT(NavMesh) object, which is Panda3D's own Pointer declaration.
  • NavMeshBuilder
    • It takes the nodepath as input from the user. 
    • It builds the polygon mesh, polygon detailed mesh and navigation mesh (which is then stored in class NavMesh).
    • It has a function to draw the polygon mesh generated, which may be helpful for the user for debugging purposes.
    • The user can set the properties of the actor, so that the NavMeshBuilder accounts for it while building the meshes.
  • NavMeshNode
    • This class inherits from PandaNode and hence allows handling of relative coordinate system.
  • NavMeshQuery
    • This class has the query functions.
    • Query functions are processed over the class NavMesh objects, which contain the generated navigation mesh.
    • Query functions include the following:
      • Given an input point, a function can return the point nearest to it and on the navigation mesh.
      • Given two input points, a function can return the array of points which form the path between those two points (this function is yet to be added).

Apart from these classes, the exposed functions are included as PUBLISHED. This now, I would be working on cleaning up of code for better readability and adjusting to Panda3D's coding style. Also, changes are required in order to make the library available in python environment.

For all of this to happen, the mentors have really helped me a lot. So a huge shout out to them. Thank you @rdb and @moguri :D 

Meet you all next week!

Stay safe, Thank you.

1000 characters left