Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
godotengine
GitHub Repository: godotengine/godot
Path: blob/master/thirdparty/rvo2/rvo2_2d/Obstacle2d.h
9903 views
1
/*
2
* Obstacle2d.h
3
* RVO2 Library
4
*
5
* Copyright 2008 University of North Carolina at Chapel Hill
6
*
7
* Licensed under the Apache License, Version 2.0 (the "License");
8
* you may not use this file except in compliance with the License.
9
* You may obtain a copy of the License at
10
*
11
* http://www.apache.org/licenses/LICENSE-2.0
12
*
13
* Unless required by applicable law or agreed to in writing, software
14
* distributed under the License is distributed on an "AS IS" BASIS,
15
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
* See the License for the specific language governing permissions and
17
* limitations under the License.
18
*
19
* Please send all bug reports to <[email protected]>.
20
*
21
* The authors may be contacted via:
22
*
23
* Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha
24
* Dept. of Computer Science
25
* 201 S. Columbia St.
26
* Frederick P. Brooks, Jr. Computer Science Bldg.
27
* Chapel Hill, N.C. 27599-3175
28
* United States of America
29
*
30
* <http://gamma.cs.unc.edu/RVO2/>
31
*/
32
33
#ifndef RVO2D_OBSTACLE_H_
34
#define RVO2D_OBSTACLE_H_
35
36
/**
37
* \file Obstacle2d.h
38
* \brief Contains the Obstacle class.
39
*/
40
41
#include "Definitions.h"
42
43
namespace RVO2D {
44
/**
45
* \brief Defines static obstacles in the simulation.
46
*/
47
class Obstacle2D {
48
public:
49
/**
50
* \brief Constructs a static obstacle instance.
51
*/
52
Obstacle2D();
53
54
bool isConvex_;
55
Obstacle2D *nextObstacle_;
56
Vector2 point_;
57
Obstacle2D *prevObstacle_;
58
Vector2 unitDir_;
59
60
float height_ = 1.0;
61
float elevation_ = 0.0;
62
uint32_t avoidance_layers_ = 1;
63
64
size_t id_;
65
66
friend class Agent2D;
67
friend class KdTree2D;
68
friend class RVOSimulator2D;
69
};
70
}
71
72
#endif /* RVO2D_OBSTACLE_H_ */
73
74