The newly added rcBuildContext abstracts the timer, logging and build time reporting. I'm planning to add more error and warning handling support via that interface in the future, for example drawing and high-lighting bad geometry.
Majority of the Recast functions now expect a valid pointer to rcBuildContext as first parameter. Allocators and a couple of really simple utility functions are an excetion. If you don't care about build timing or logging, you can just pass a pointer to an instance of the default implementation of rcBuildContext. Like this:
rcBuildContext dummy;...rcErodeWalkableArea(&dummy, m_cfg.walkableRadius, *m_chf);
There is an example implementation in the SampleInterfaces.h/cpp. I also moved the other example implementations of interfaces there (FileIO, DebugDrawGL).
The files RecastTimer.h/cpp and RecastLog.h/cpp were removed in the process. I added RecastAssert.h which is used in some places to check that validity of the passed parameter (more validation later).
I wish a smooth migration! Let me know if there is something I overlooked.
Off to update the Win32 project. [EDIT] updated.
google 4682
ReplyDeletegoogle 4683
google 4684
google 4685
google 4686