summaryrefslogtreecommitdiff
path: root/Runtime/NavMesh/NavMeshTypes.h
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2019-08-14 22:50:43 +0800
committerchai <chaifix@163.com>2019-08-14 22:50:43 +0800
commit15740faf9fe9fe4be08965098bbf2947e096aeeb (patch)
treea730ec236656cc8cab5b13f088adfaed6bb218fb /Runtime/NavMesh/NavMeshTypes.h
+Unity Runtime codeHEADmaster
Diffstat (limited to 'Runtime/NavMesh/NavMeshTypes.h')
-rw-r--r--Runtime/NavMesh/NavMeshTypes.h76
1 files changed, 76 insertions, 0 deletions
diff --git a/Runtime/NavMesh/NavMeshTypes.h b/Runtime/NavMesh/NavMeshTypes.h
new file mode 100644
index 0000000..cc26075
--- /dev/null
+++ b/Runtime/NavMesh/NavMeshTypes.h
@@ -0,0 +1,76 @@
+#pragma once
+#ifndef NAVMESH_TYPES_H_INCLUDED
+#define NAVMESH_TYPES_H_INCLUDED
+
+#include "Runtime/Math/Vector3.h"
+#include "Runtime/Math/Matrix4x4.h"
+#include "Runtime/Scripting/Backend/ScriptingTypes.h"
+#include "DetourReference.h"
+class NavMeshPath;
+
+// Keep this enum in sync with the one defined in "NavMeshAgentBindings.txt"
+enum ObstacleAvoidanceType
+{
+ kNoObstacleAvoidance = 0,
+ kLowQualityObstacleAvoidance = 1,
+ kMedQualityObstacleAvoidance = 2,
+ kGoodQualityObstacleAvoidance = 3,
+ kHighQualityObstacleAvoidance = 4
+};
+
+// Keep this struct in sync with the one defined in "NavMeshBindings.txt"
+struct NavMeshHit
+{
+ Vector3f position;
+ Vector3f normal;
+ float distance;
+ int mask;
+ int hit;
+};
+
+// Keep this struct in sync with the one defined in "NavMeshBindings.txt"
+enum NavMeshPathStatus
+{
+ kPathComplete = 0,
+ kPathPartial = 1,
+ kPathInvalid = 2
+};
+
+// Keep this enum in sync with the one defined in "NavMeshBindings.txt"
+enum OffMeshLinkType
+{
+ kLinkTypeManual = 0,
+ kLinkTypeDropDown = 1,
+ kLinkTypeJumpAcross = 2
+};
+
+// Keep this struct in sync with the one defined in "NavMeshBindings.txt"
+struct OffMeshLinkData
+{
+ int m_Valid;
+ int m_Activated;
+ int m_InstanceID;
+ OffMeshLinkType m_LinkType;
+ Vector3f m_StartPos;
+ Vector3f m_EndPos;
+};
+
+// Used in: NavMeshBindings.txt, NavMeshAgentBindings.txt, NavMeshPathBindings.txt
+struct MonoNavMeshPath
+{
+ MonoNavMeshPath ()
+ : native (NULL)
+ , corners (SCRIPTING_NULL)
+ {}
+
+ NavMeshPath* native;
+ ScriptingObjectPtr corners;
+};
+
+struct NavMeshCarveData
+{
+ Matrix4x4f transform;
+ Vector3f size;
+};
+
+#endif