mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Remane NavMesh "Sample" files to "Editor"
This commit is contained in:
parent
28299b4c59
commit
61ff7e5079
@ -22,7 +22,7 @@
|
||||
#include "DebugUtils/Include/RecastDebugDraw.h"
|
||||
#include "NavEditor/Include/ConvexVolumeTool.h"
|
||||
#include "NavEditor/Include/InputGeom.h"
|
||||
#include "NavEditor/Include/Sample.h"
|
||||
#include "NavEditor/Include/Editor.h"
|
||||
#include <naveditor/include/GameUtils.h>
|
||||
|
||||
// Quick and dirty convex hull.
|
||||
|
@ -24,8 +24,8 @@
|
||||
#include "DebugUtils/Include/DetourDebugDraw.h"
|
||||
#include "NavEditor/Include/CrowdTool.h"
|
||||
#include "NavEditor/Include/InputGeom.h"
|
||||
#include "NavEditor/Include/Sample.h"
|
||||
#include "NavEditor/Include/SampleInterfaces.h"
|
||||
#include "NavEditor/Include/Editor.h"
|
||||
#include "NavEditor/Include/EditorInterfaces.h"
|
||||
#include "thirdparty/recast/DetourCrowd/Include/DetourCrowdInternal.h"
|
||||
|
||||
static bool isectSegAABB(const float* sp, const float* sq,
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include "NavEditor/Include/FileTypes.h"
|
||||
#include "NavEditor/Include/GameUtils.h"
|
||||
#include "NavEditor/Include/InputGeom.h"
|
||||
#include "NavEditor/Include/Sample.h"
|
||||
#include "NavEditor/Include/Editor.h"
|
||||
|
||||
unsigned int EditorDebugDraw::areaToCol(unsigned int area)
|
||||
{
|
@ -2,7 +2,7 @@
|
||||
#include "Recast/Include/Recast.h"
|
||||
#include "DebugUtils/Include/RecastDebugDraw.h"
|
||||
#include "DebugUtils/Include/DetourDebugDraw.h"
|
||||
#include "NavEditor/Include/SampleInterfaces.h"
|
||||
#include "NavEditor/Include/EditorInterfaces.h"
|
||||
#include "NavEditor/Include/PerfTimer.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
@ -22,7 +22,7 @@
|
||||
#include "DebugUtils/Include/DetourDebugDraw.h"
|
||||
#include "DebugUtils/Include/RecastDump.h"
|
||||
#include "Detour/Include/DetourNavMesh.h"
|
||||
#include "NavEditor/Include/Sample_Debug.h"
|
||||
#include "NavEditor/Include/Editor_Debug.h"
|
||||
#include "NavEditor/Include/InputGeom.h"
|
||||
|
||||
/*
|
@ -29,11 +29,11 @@
|
||||
#include "NavEditor/Include/ConvexVolumeTool.h"
|
||||
#include "NavEditor/Include/CrowdTool.h"
|
||||
#include "NavEditor/Include/InputGeom.h"
|
||||
#include "NavEditor/Include/Sample.h"
|
||||
#include "NavEditor/Include/Sample_SoloMesh.h"
|
||||
#include "NavEditor/Include/Editor.h"
|
||||
#include "NavEditor/Include/Editor_SoloMesh.h"
|
||||
|
||||
|
||||
Sample_SoloMesh::Sample_SoloMesh() :
|
||||
Editor_SoloMesh::Editor_SoloMesh() :
|
||||
m_keepInterResults(true),
|
||||
m_totalBuildTimeMs(0),
|
||||
m_triareas(0),
|
||||
@ -47,12 +47,12 @@ Sample_SoloMesh::Sample_SoloMesh() :
|
||||
setTool(new NavMeshTesterTool);
|
||||
}
|
||||
|
||||
Sample_SoloMesh::~Sample_SoloMesh()
|
||||
Editor_SoloMesh::~Editor_SoloMesh()
|
||||
{
|
||||
cleanup();
|
||||
}
|
||||
|
||||
void Sample_SoloMesh::cleanup()
|
||||
void Editor_SoloMesh::cleanup()
|
||||
{
|
||||
delete [] m_triareas;
|
||||
m_triareas = 0;
|
||||
@ -70,9 +70,9 @@ void Sample_SoloMesh::cleanup()
|
||||
m_navMesh = 0;
|
||||
}
|
||||
|
||||
void Sample_SoloMesh::handleSettings()
|
||||
void Editor_SoloMesh::handleSettings()
|
||||
{
|
||||
Sample::handleCommonSettings();
|
||||
Editor::handleCommonSettings();
|
||||
|
||||
if (imguiCheck("Keep Itermediate Results", m_keepInterResults))
|
||||
m_keepInterResults = !m_keepInterResults;
|
||||
@ -84,13 +84,13 @@ void Sample_SoloMesh::handleSettings()
|
||||
|
||||
if (imguiButton("Save"))
|
||||
{
|
||||
Sample::saveAll("solo_navmesh.bin", m_navMesh);
|
||||
Editor::saveAll("solo_navmesh.bin", m_navMesh);
|
||||
}
|
||||
|
||||
if (imguiButton("Load"))
|
||||
{
|
||||
dtFreeNavMesh(m_navMesh);
|
||||
m_navMesh = Sample::loadAll("solo_navmesh.bin");
|
||||
m_navMesh = Editor::loadAll("solo_navmesh.bin");
|
||||
m_navQuery->init(m_navMesh, 2048);
|
||||
}
|
||||
|
||||
@ -104,7 +104,7 @@ void Sample_SoloMesh::handleSettings()
|
||||
imguiSeparator();
|
||||
}
|
||||
|
||||
void Sample_SoloMesh::handleTools()
|
||||
void Editor_SoloMesh::handleTools()
|
||||
{
|
||||
int type = !m_tool ? TOOL_NONE : m_tool->type();
|
||||
|
||||
@ -140,7 +140,7 @@ void Sample_SoloMesh::handleTools()
|
||||
|
||||
}
|
||||
|
||||
void Sample_SoloMesh::handleDebugMode()
|
||||
void Editor_SoloMesh::handleDebugMode()
|
||||
{
|
||||
// Check which modes are valid.
|
||||
bool valid[MAX_DRAWMODE];
|
||||
@ -218,7 +218,7 @@ void Sample_SoloMesh::handleDebugMode()
|
||||
}
|
||||
}
|
||||
|
||||
void Sample_SoloMesh::handleRender()
|
||||
void Editor_SoloMesh::handleRender()
|
||||
{
|
||||
if (!m_geom || !m_geom->getMesh())
|
||||
return;
|
||||
@ -334,16 +334,16 @@ void Sample_SoloMesh::handleRender()
|
||||
glDepthMask(GL_TRUE);
|
||||
}
|
||||
|
||||
void Sample_SoloMesh::handleRenderOverlay(double* proj, double* model, int* view)
|
||||
void Editor_SoloMesh::handleRenderOverlay(double* proj, double* model, int* view)
|
||||
{
|
||||
if (m_tool)
|
||||
m_tool->handleRenderOverlay(proj, model, view);
|
||||
renderOverlayToolStates(proj, model, view);
|
||||
}
|
||||
|
||||
void Sample_SoloMesh::handleMeshChanged(class InputGeom* geom)
|
||||
void Editor_SoloMesh::handleMeshChanged(class InputGeom* geom)
|
||||
{
|
||||
Sample::handleMeshChanged(geom);
|
||||
Editor::handleMeshChanged(geom);
|
||||
|
||||
dtFreeNavMesh(m_navMesh);
|
||||
m_navMesh = 0;
|
||||
@ -358,7 +358,7 @@ void Sample_SoloMesh::handleMeshChanged(class InputGeom* geom)
|
||||
}
|
||||
|
||||
|
||||
bool Sample_SoloMesh::handleBuild()
|
||||
bool Editor_SoloMesh::handleBuild()
|
||||
{
|
||||
if (!m_geom || !m_geom->getMesh())
|
||||
{
|
1514
r5dev/naveditor/Editor_TempObstacles.cpp
Normal file
1514
r5dev/naveditor/Editor_TempObstacles.cpp
Normal file
File diff suppressed because it is too large
Load Diff
@ -28,8 +28,8 @@
|
||||
#include "NavEditor/Include/ConvexVolumeTool.h"
|
||||
#include "NavEditor/Include/CrowdTool.h"
|
||||
#include "NavEditor/Include/InputGeom.h"
|
||||
#include "NavEditor/Include/Sample.h"
|
||||
#include "NavEditor/Include/Sample_TileMesh.h"
|
||||
#include "NavEditor/Include/Editor.h"
|
||||
#include "NavEditor/Include/Editor_TileMesh.h"
|
||||
|
||||
|
||||
inline unsigned int nextPow2(unsigned int v)
|
@ -25,7 +25,7 @@
|
||||
#include "DebugUtils/Include/DebugDraw.h"
|
||||
#include "DebugUtils/Include/RecastDebugDraw.h"
|
||||
#include "Detour/Include/DetourNavMesh.h"
|
||||
#include "NavEditor/Include/Sample.h"
|
||||
#include "NavEditor/Include/Editor.h"
|
||||
#include <naveditor/include/GameUtils.h>
|
||||
|
||||
static bool intersectSegmentTriangle(const float* sp, const float* sq,
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include "DebugUtils/Include/DetourDebugDraw.h"
|
||||
#include "NavEditor/Include/NavMeshPruneTool.h"
|
||||
#include "NavEditor/Include/InputGeom.h"
|
||||
#include "NavEditor/Include/Sample.h"
|
||||
#include "NavEditor/Include/Editor.h"
|
||||
|
||||
#ifdef WIN32
|
||||
# define snprintf _snprintf
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "DebugUtils/Include/DetourDebugDraw.h"
|
||||
#include "DebugUtils/Include/RecastDebugDraw.h"
|
||||
#include "NavEditor/Include/NavMeshTesterTool.h"
|
||||
#include "NavEditor/Include/Sample.h"
|
||||
#include "NavEditor/Include/Editor.h"
|
||||
|
||||
// Uncomment this to dump all the requests in stdout.
|
||||
#define DUMP_REQS
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include "DebugUtils/Include/DetourDebugDraw.h"
|
||||
#include "NavEditor/Include/OffMeshConnectionTool.h"
|
||||
#include "NavEditor/Include/InputGeom.h"
|
||||
#include "NavEditor/Include/Sample.h"
|
||||
#include "NavEditor/Include/Editor.h"
|
||||
|
||||
#ifdef WIN32
|
||||
# define snprintf _snprintf
|
||||
|
@ -836,7 +836,7 @@ Editor_TempObstacles::~Editor_TempObstacles()
|
||||
|
||||
void Editor_TempObstacles::handleSettings()
|
||||
{
|
||||
Sample::handleCommonSettings();
|
||||
Editor::handleCommonSettings();
|
||||
|
||||
if (imguiCheck("Keep Itermediate Results", m_keepInterResults))
|
||||
m_keepInterResults = !m_keepInterResults;
|
||||
@ -1124,7 +1124,7 @@ void Editor_TempObstacles::handleRenderOverlay(double* proj, double* model, int*
|
||||
|
||||
void Editor_TempObstacles::handleMeshChanged(class InputGeom* geom)
|
||||
{
|
||||
Sample::handleMeshChanged(geom);
|
||||
Editor::handleMeshChanged(geom);
|
||||
|
||||
dtFreeTileCache(m_tileCache);
|
||||
m_tileCache = 0;
|
||||
@ -1343,7 +1343,7 @@ bool Editor_TempObstacles::handleBuild()
|
||||
|
||||
void Editor_TempObstacles::handleUpdate(const float dt)
|
||||
{
|
||||
Sample::handleUpdate(dt);
|
||||
Editor::handleUpdate(dt);
|
||||
|
||||
if (!m_navMesh)
|
||||
return;
|
||||
|
@ -19,7 +19,7 @@
|
||||
#ifndef CONVEXVOLUMETOOL_H
|
||||
#define CONVEXVOLUMETOOL_H
|
||||
|
||||
#include "NavEditor/Include/Sample.h"
|
||||
#include "NavEditor/Include/Editor.h"
|
||||
|
||||
// Tool to create convex volumess for InputGeom
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include "DetourCrowd/Include/DetourObstacleAvoidance.h"
|
||||
#include "DetourCrowd/Include/DetourCrowd.h"
|
||||
#include "NavEditor/Include/ValueHistory.h"
|
||||
#include "NavEditor/Include/Sample.h"
|
||||
#include "NavEditor/Include/Editor.h"
|
||||
|
||||
// Tool to create crowds.
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
#define RECASTSAMPLE_H
|
||||
|
||||
#include "Recast/Include/Recast.h"
|
||||
#include "NavEditor/Include/SampleInterfaces.h"
|
||||
#include "NavEditor/Include/EditorInterfaces.h"
|
||||
|
||||
struct hulldef
|
||||
{
|
@ -19,7 +19,7 @@
|
||||
#ifndef RECASTSAMPLEDEBUG_H
|
||||
#define RECASTSAMPLEDEBUG_H
|
||||
|
||||
#include "NavEditor/Include/Sample.h"
|
||||
#include "NavEditor/Include/Editor.h"
|
||||
#include "Detour/Include/DetourNavMesh.h"
|
||||
#include "Recast/Include/Recast.h"
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include "Recast/Include/Recast.h"
|
||||
#include "Detour/Include/DetourNavMesh.h"
|
||||
#include "NavEditor/Include/ChunkyTriMesh.h"
|
||||
#include "NavEditor/Include/Sample.h"
|
||||
#include "NavEditor/Include/Editor.h"
|
||||
|
||||
class Editor_TileMesh : public Editor
|
||||
{
|
@ -19,7 +19,7 @@
|
||||
#ifndef NAVMESHPRUNETOOL_H
|
||||
#define NAVMESHPRUNETOOL_H
|
||||
|
||||
#include "NavEditor/Include/Sample.h"
|
||||
#include "NavEditor/Include/Editor.h"
|
||||
|
||||
// Prune navmesh to accessible locations from a point.
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
#include "Detour/Include/DetourNavMesh.h"
|
||||
#include "Detour/Include/DetourNavMeshQuery.h"
|
||||
#include "NavEditor/Include/Sample.h"
|
||||
#include "NavEditor/Include/Editor.h"
|
||||
|
||||
class NavMeshTesterTool : public EditorTool
|
||||
{
|
||||
|
@ -19,7 +19,7 @@
|
||||
#ifndef OFFMESHCONNECTIONTOOL_H
|
||||
#define OFFMESHCONNECTIONTOOL_H
|
||||
|
||||
#include "NavEditor/Include/Sample.h"
|
||||
#include "NavEditor/Include/Editor.h"
|
||||
|
||||
// Tool to create off-mesh connection for InputGeom
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include "Detour/Include/DetourNavMesh.h"
|
||||
#include "NavEditor/Include/Sample.h"
|
||||
|
||||
class Sample_SoloMesh : public Sample
|
||||
class Editor_SoloMesh : public Sample
|
||||
{
|
||||
protected:
|
||||
bool m_keepInterResults;
|
||||
@ -64,8 +64,8 @@ protected:
|
||||
void cleanup();
|
||||
|
||||
public:
|
||||
Sample_SoloMesh();
|
||||
virtual ~Sample_SoloMesh();
|
||||
Editor_SoloMesh();
|
||||
virtual ~Editor_SoloMesh();
|
||||
|
||||
virtual void handleSettings();
|
||||
virtual void handleTools();
|
||||
@ -78,8 +78,8 @@ public:
|
||||
|
||||
private:
|
||||
// Explicitly disabled copy constructor and copy assignment operator.
|
||||
Sample_SoloMesh(const Sample_SoloMesh&);
|
||||
Sample_SoloMesh& operator=(const Sample_SoloMesh&);
|
||||
Editor_SoloMesh(const Editor_SoloMesh&);
|
||||
Editor_SoloMesh& operator=(const Editor_SoloMesh&);
|
||||
};
|
||||
|
||||
|
||||
|
@ -23,8 +23,8 @@
|
||||
#include "NavEditor/Include/InputGeom.h"
|
||||
#include "NavEditor/Include/TestCase.h"
|
||||
#include "NavEditor/Include/Filelist.h"
|
||||
#include "NavEditor/Include/Sample_TileMesh.h"
|
||||
#include "NavEditor/Include/Sample_Debug.h"
|
||||
#include "NavEditor/Include/Editor_TileMesh.h"
|
||||
#include "NavEditor/Include/Editor_Debug.h"
|
||||
#include "NavEditor/include/DroidSans.h"
|
||||
|
||||
using std::string;
|
||||
|
@ -27,10 +27,10 @@
|
||||
<ClInclude Include="..\naveditor\include\NavMeshTesterTool.h" />
|
||||
<ClInclude Include="..\naveditor\include\OffMeshConnectionTool.h" />
|
||||
<ClInclude Include="..\naveditor\include\PerfTimer.h" />
|
||||
<ClInclude Include="..\naveditor\include\Sample.h" />
|
||||
<ClInclude Include="..\naveditor\include\SampleInterfaces.h" />
|
||||
<ClInclude Include="..\naveditor\include\Sample_Debug.h" />
|
||||
<ClInclude Include="..\naveditor\include\Sample_TileMesh.h" />
|
||||
<ClInclude Include="..\naveditor\include\Editor.h" />
|
||||
<ClInclude Include="..\naveditor\include\EditorInterfaces.h" />
|
||||
<ClInclude Include="..\naveditor\include\Editor_Debug.h" />
|
||||
<ClInclude Include="..\naveditor\include\Editor_TileMesh.h" />
|
||||
<ClInclude Include="..\naveditor\include\TestCase.h" />
|
||||
<ClInclude Include="..\naveditor\include\ValueHistory.h" />
|
||||
<ClInclude Include="..\thirdparty\fastlz\fastlz.h" />
|
||||
@ -53,10 +53,10 @@
|
||||
<ClCompile Include="..\naveditor\NavMeshTesterTool.cpp" />
|
||||
<ClCompile Include="..\naveditor\OffMeshConnectionTool.cpp" />
|
||||
<ClCompile Include="..\naveditor\PerfTimer.cpp" />
|
||||
<ClCompile Include="..\naveditor\Sample.cpp" />
|
||||
<ClCompile Include="..\naveditor\SampleInterfaces.cpp" />
|
||||
<ClCompile Include="..\naveditor\Sample_Debug.cpp" />
|
||||
<ClCompile Include="..\naveditor\Sample_TileMesh.cpp" />
|
||||
<ClCompile Include="..\naveditor\Editor.cpp" />
|
||||
<ClCompile Include="..\naveditor\EditorInterfaces.cpp" />
|
||||
<ClCompile Include="..\naveditor\Editor_Debug.cpp" />
|
||||
<ClCompile Include="..\naveditor\Editor_TileMesh.cpp" />
|
||||
<ClCompile Include="..\naveditor\TestCase.cpp" />
|
||||
<ClCompile Include="..\naveditor\ValueHistory.cpp" />
|
||||
<ClCompile Include="..\thirdparty\fastlz\fastlz.c">
|
||||
|
@ -39,7 +39,7 @@
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\naveditor\include\Sample.h">
|
||||
<ClInclude Include="..\naveditor\include\Editor.h">
|
||||
<Filter>core\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\naveditor\include\MeshLoaderPly.h">
|
||||
@ -57,7 +57,7 @@
|
||||
<ClInclude Include="..\naveditor\include\InputGeom.h">
|
||||
<Filter>builder\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\naveditor\include\Sample_TileMesh.h">
|
||||
<ClInclude Include="..\naveditor\include\Editor_TileMesh.h">
|
||||
<Filter>builder\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\naveditor\include\ChunkyTriMesh.h">
|
||||
@ -84,10 +84,10 @@
|
||||
<ClInclude Include="..\naveditor\include\TestCase.h">
|
||||
<Filter>utils\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\naveditor\include\SampleInterfaces.h">
|
||||
<ClInclude Include="..\naveditor\include\EditorInterfaces.h">
|
||||
<Filter>utils\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\naveditor\include\Sample_Debug.h">
|
||||
<ClInclude Include="..\naveditor\include\Editor_Debug.h">
|
||||
<Filter>utils\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\naveditor\include\PerfTimer.h">
|
||||
@ -119,7 +119,7 @@
|
||||
<ClCompile Include="..\naveditor\main.cpp">
|
||||
<Filter>core</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\naveditor\Sample.cpp">
|
||||
<ClCompile Include="..\naveditor\Editor.cpp">
|
||||
<Filter>core</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\naveditor\MeshLoaderBsp.cpp">
|
||||
@ -158,10 +158,10 @@
|
||||
<ClCompile Include="..\naveditor\NavMeshTesterTool.cpp">
|
||||
<Filter>tools</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\naveditor\SampleInterfaces.cpp">
|
||||
<ClCompile Include="..\naveditor\EditorInterfaces.cpp">
|
||||
<Filter>utils</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\naveditor\Sample_Debug.cpp">
|
||||
<ClCompile Include="..\naveditor\Editor_Debug.cpp">
|
||||
<Filter>utils</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\naveditor\PerfTimer.cpp">
|
||||
@ -170,7 +170,7 @@
|
||||
<ClCompile Include="..\naveditor\ValueHistory.cpp">
|
||||
<Filter>utils</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\naveditor\Sample_TileMesh.cpp">
|
||||
<ClCompile Include="..\naveditor\Editor_TileMesh.cpp">
|
||||
<Filter>builder</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\naveditor\InputGeom.cpp">
|
||||
|
Loading…
x
Reference in New Issue
Block a user