source: molecuilder/src/Plane.hpp@ 6a314f

Last change on this file since 6a314f was 0f55b2, checked in by Tillmann Crueger <crueger@…>, 15 years ago

Started work on the VectorComposites

  • Property mode set to 100644
File size: 969 bytes
Line 
1/*
2 * Plane.hpp
3 *
4 * Created on: Apr 7, 2010
5 * Author: crueger
6 */
7
8#ifndef PLANE_HPP_
9#define PLANE_HPP_
10
11#include <memory>
12
13class Vector;
14
15class Plane
16{
17 typedef std::auto_ptr<Vector> vec_ptr;
18public:
19 Plane(const Vector &y1, const Vector &y2, const Vector &y3);
20 Plane(const Vector &y1, const Vector &y2, double _offset);
21 Plane(const Vector &_normalVector, double _offset=0);
22 Plane(const Vector &_normalVector, const Vector &_offsetVector);
23 virtual ~Plane();
24
25 // Accessor Functions
26 /**
27 * returns normal Vector for a plane
28 */
29 Vector getNormal();
30 /**
31 * returns the distance of the plane from the origin
32 */
33 double getOffset();
34 /**
35 * returns a vector that points on the plane.
36 * Same as getOffset()*getNormal();
37 */
38 Vector getOffsetVector();
39
40 // some calculations
41 Vector GetIntersection(const Vector &Origin, const Vector &LineVector);
42
43private:
44 vec_ptr normalVector;
45 double offset;
46};
47
48#endif /* PLANE_HPP_ */
Note: See TracBrowser for help on using the repository browser.