All Classes Namespaces Files Functions Variables Typedefs Pages
LineObstacle.h
Go to the documentation of this file.
1 /*
2  * LineObstacle.h
3  *
4  *
5  * All rights are retained by the authors and the University of Minnesota.
6  * Please contact sjguy@cs.umn.edu for licensing inquiries.
7  *
8  * Authors: Ioannis Karamouzas, Brian Skinner, and Stephen J. Guy
9  * Contact: ioannis@cs.umn.edu
10  */
11 
17 #pragma once
18 #include "util/Vector2D.h"
19 
20 namespace TTC {
21 
26  {
27  public:
28  /* Constructor. Constructs an obstacle.
29  @param a The first endpoint of the obstacle.
30  @param b The second endpoint of the obstacle. */
31  LineObstacle(const Vector2D& a, const Vector2D& b);
32 
34  ~LineObstacle();
35 
37 
38  Vector2D p1() const {return _p1;}
41  Vector2D p2() const {return _p2;}
43  Vector2D normal() const {return _normal;}
45 
46  protected:
53  };
54 
55 }
Vector2D p1() const
Returns the fist endpoint of the line segment.
Definition: LineObstacle.h:39
~LineObstacle()
Definition: LineObstacle.cpp:22
A line segment obstacle class.
Definition: LineObstacle.h:25
Contains the Vector2D class; a two-dimensional vector class and related vector operations.
Vector2D p2() const
Returns the second endpoint of the line segment.
Definition: LineObstacle.h:41
Vector2D _normal
The normal vector of the line obstacle.
Definition: LineObstacle.h:52
Vector2D _p1
The first endpoint of the obstacle.
Definition: LineObstacle.h:48
Vector2D normal() const
Returns the normal of the line obstacle.
Definition: LineObstacle.h:43
A two-dimensional vector class.
Definition: Vector2D.h:28
Vector2D _p2
The second endpoint of the obstacle.
Definition: LineObstacle.h:50