From 6c78170d8c81b0e4b66fc352472576bcf334138d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Wed, 18 May 2022 14:21:02 +0200 Subject: rvo2: Re-sync with upstream, properly document Godot-specific changes Still tracking the `v1.0.1` tag for now, just reverting all the unnecessary style changes that created a diff with upstream. --- thirdparty/rvo2/KdTree.h | 70 ++++++++++++++++++++++++------------------------ 1 file changed, 35 insertions(+), 35 deletions(-) (limited to 'thirdparty/rvo2/KdTree.h') diff --git a/thirdparty/rvo2/KdTree.h b/thirdparty/rvo2/KdTree.h index 1dbad00ea4..e05a7f40d4 100644 --- a/thirdparty/rvo2/KdTree.h +++ b/thirdparty/rvo2/KdTree.h @@ -47,78 +47,78 @@ // - Removed `sim_`. // - KdTree things are public namespace RVO { -class Agent; -class RVOSimulator; + class Agent; + class RVOSimulator; -/** + /** * \brief Defines kd-trees for agents in the simulation. */ -class KdTree { -public: - /** + class KdTree { + public: + /** * \brief Defines an agent kd-tree node. */ - class AgentTreeNode { - public: - /** + class AgentTreeNode { + public: + /** * \brief The beginning node number. */ - size_t begin; + size_t begin; - /** + /** * \brief The ending node number. */ - size_t end; + size_t end; - /** + /** * \brief The left node number. */ - size_t left; + size_t left; - /** + /** * \brief The right node number. */ - size_t right; + size_t right; - /** + /** * \brief The maximum coordinates. */ - Vector3 maxCoord; + Vector3 maxCoord; - /** + /** * \brief The minimum coordinates. */ - Vector3 minCoord; - }; + Vector3 minCoord; + }; - /** + /** * \brief Constructs a kd-tree instance. * \param sim The simulator instance. */ - explicit KdTree(); + explicit KdTree(); - /** + /** * \brief Builds an agent kd-tree. */ - void buildAgentTree(std::vector agents); + void buildAgentTree(std::vector agents); - void buildAgentTreeRecursive(size_t begin, size_t end, size_t node); + void buildAgentTreeRecursive(size_t begin, size_t end, size_t node); - /** + /** * \brief Computes the agent neighbors of the specified agent. * \param agent A pointer to the agent for which agent neighbors are to be computed. * \param rangeSq The squared range around the agent. */ - void computeAgentNeighbors(Agent *agent, float rangeSq) const; + void computeAgentNeighbors(Agent *agent, float rangeSq) const; - void queryAgentTreeRecursive(Agent *agent, float &rangeSq, size_t node) const; + void queryAgentTreeRecursive(Agent *agent, float &rangeSq, size_t node) const; - std::vector agents_; - std::vector agentTree_; + std::vector agents_; + std::vector agentTree_; - friend class Agent; - friend class RVOSimulator; -}; -} // namespace RVO + friend class Agent; + friend class RVOSimulator; + }; +} #endif /* RVO_KD_TREE_H_ */ -- cgit v1.2.3 From 86cdf1f2cf795f4f8b89c0b2da221d4b225d8f5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Wed, 18 May 2022 14:53:52 +0200 Subject: rvo2: Sync with upstream commit bfc0486 https://github.com/snape/RVO2-3D/commit/bfc048670a4e85066e86a1f923d8ea92e3add3b2 --- thirdparty/rvo2/KdTree.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'thirdparty/rvo2/KdTree.h') diff --git a/thirdparty/rvo2/KdTree.h b/thirdparty/rvo2/KdTree.h index e05a7f40d4..69d8920ce0 100644 --- a/thirdparty/rvo2/KdTree.h +++ b/thirdparty/rvo2/KdTree.h @@ -8,7 +8,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -27,16 +27,14 @@ * Chapel Hill, N.C. 27599-3175 * United States of America * - * + * */ /** * \file KdTree.h * \brief Contains the KdTree class. */ -#ifndef RVO_KD_TREE_H_ -#define RVO_KD_TREE_H_ - -#include "API.h" +#ifndef RVO3D_KD_TREE_H_ +#define RVO3D_KD_TREE_H_ #include #include @@ -121,4 +119,4 @@ namespace RVO { }; } -#endif /* RVO_KD_TREE_H_ */ +#endif /* RVO3D_KD_TREE_H_ */ -- cgit v1.2.3