From 8722a9920c1f6119bf6e769cba270e63097f8e25 Mon Sep 17 00:00:00 2001
From: chai <215380520@qq.com>
Date: Thu, 23 May 2024 10:08:29 +0800
Subject: + astar project
---
.../com.arongranberg.astar/RVO/RVOObstacle.cs | 58 ++++++++++++++++++++++
1 file changed, 58 insertions(+)
create mode 100644 Other/AstarPathfindingDemo/Packages/com.arongranberg.astar/RVO/RVOObstacle.cs
(limited to 'Other/AstarPathfindingDemo/Packages/com.arongranberg.astar/RVO/RVOObstacle.cs')
diff --git a/Other/AstarPathfindingDemo/Packages/com.arongranberg.astar/RVO/RVOObstacle.cs b/Other/AstarPathfindingDemo/Packages/com.arongranberg.astar/RVO/RVOObstacle.cs
new file mode 100644
index 0000000..3b80019
--- /dev/null
+++ b/Other/AstarPathfindingDemo/Packages/com.arongranberg.astar/RVO/RVOObstacle.cs
@@ -0,0 +1,58 @@
+using UnityEngine;
+using System.Collections.Generic;
+
+namespace Pathfinding.RVO {
+ using Pathfinding.Drawing;
+
+ ///
+ /// Base class for simple RVO colliders.
+ ///
+ /// This is a helper base class for RVO colliders. It provides automatic gizmos
+ /// and helps with the winding order of the vertices as well as automatically updating the obstacle when moved.
+ ///
+ /// Extend this class to create custom RVO obstacles.
+ ///
+ /// See: RVOSquareObstacle
+ ///
+ /// Deprecated: This component is deprecated. Local avoidance colliders never worked particularly well and the performance was poor. Modify the graphs instead so that pathfinding takes obstacles into account.
+ ///
+ public abstract class RVOObstacle : VersionedMonoBehaviour {
+ ///
+ /// Mode of the obstacle.
+ /// Determines winding order of the vertices
+ ///
+ public ObstacleVertexWinding obstacleMode;
+
+ public RVOLayer layer = RVOLayer.DefaultObstacle;
+
+ ///
+ /// RVO Obstacle Modes.
+ /// Determines winding order of obstacle vertices
+ ///
+ public enum ObstacleVertexWinding {
+ /// Keeps agents from entering the obstacle
+ KeepOut,
+ /// Keeps agents inside the obstacle
+ KeepIn,
+ }
+
+ ///
+ /// Enable executing in editor to draw gizmos.
+ /// If enabled, the CreateObstacles function will be executed in the editor as well
+ /// in order to draw gizmos.
+ ///
+ protected abstract bool ExecuteInEditor { get; }
+
+ /// If enabled, all coordinates are handled as local.
+ protected abstract bool LocalCoordinates { get; }
+
+ ///
+ /// Static or dynamic.
+ /// This determines if the obstacle can be updated by e.g moving the transform
+ /// around in the scene.
+ ///
+ protected abstract bool StaticObstacle { get; }
+
+ protected abstract float Height { get; }
+ }
+}
--
cgit v1.1-26-g67d0