Obstacle2d.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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 <geom@cs.unc.edu>.
  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. #ifndef RVO2D_OBSTACLE_H_
  33. #define RVO2D_OBSTACLE_H_
  34. /**
  35. * \file Obstacle2d.h
  36. * \brief Contains the Obstacle class.
  37. */
  38. #include "Definitions.h"
  39. namespace RVO2D {
  40. /**
  41. * \brief Defines static obstacles in the simulation.
  42. */
  43. class Obstacle2D {
  44. public:
  45. /**
  46. * \brief Constructs a static obstacle instance.
  47. */
  48. Obstacle2D();
  49. bool isConvex_;
  50. Obstacle2D *nextObstacle_;
  51. Vector2 point_;
  52. Obstacle2D *prevObstacle_;
  53. Vector2 unitDir_;
  54. float height_ = 1.0;
  55. float elevation_ = 0.0;
  56. uint32_t avoidance_layers_ = 1;
  57. size_t id_;
  58. friend class Agent2D;
  59. friend class KdTree2D;
  60. friend class RVOSimulator2D;
  61. };
  62. }
  63. #endif /* RVO2D_OBSTACLE_H_ */