Last change
on this file since c20eac was 25e17e9, checked in by Tillmann Crueger <crueger@…>, 15 years ago |
Added a line class that represents one dimensional subspaces
|
-
Property mode
set to
100644
|
File size:
493 bytes
|
Line | |
---|
1 | /*
|
---|
2 | * Line.hpp
|
---|
3 | *
|
---|
4 | * Created on: Apr 30, 2010
|
---|
5 | * Author: crueger
|
---|
6 | */
|
---|
7 |
|
---|
8 | #ifndef LINE_HPP_
|
---|
9 | #define LINE_HPP_
|
---|
10 |
|
---|
11 | #include "Space.hpp"
|
---|
12 |
|
---|
13 | #include <memory>
|
---|
14 |
|
---|
15 | class Vector;
|
---|
16 |
|
---|
17 | class Line : public Space
|
---|
18 | {
|
---|
19 | public:
|
---|
20 | Line(Vector &_origin, Vector &_direction);
|
---|
21 | virtual ~Line();
|
---|
22 |
|
---|
23 | virtual double distance(const Vector &point) const=0;
|
---|
24 | virtual Vector getClosestPoint(const Vector &point) const=0;
|
---|
25 |
|
---|
26 | private:
|
---|
27 | std::auto_ptr<Vector> origin;
|
---|
28 | std::auto_ptr<Vector> direction;
|
---|
29 | };
|
---|
30 |
|
---|
31 | #endif /* LINE_HPP_ */
|
---|
Note:
See
TracBrowser
for help on using the repository browser.