Last change
on this file since 10235 was
9110,
checked in by bensch, 18 years ago
|
orxonox/trunk: merged the Presentation back
|
File size:
1.2 KB
|
Line | |
---|
1 | /* |
---|
2 | orxonox - the future of 3D-vertical-scrollers |
---|
3 | |
---|
4 | Copyright (C) 2004 orx |
---|
5 | |
---|
6 | This program is free software; you can redistribute it and/or modify |
---|
7 | it under the terms of the GNU General Public License as published by |
---|
8 | the Free Software Foundation; either version 2, or (at your option) |
---|
9 | any later version. |
---|
10 | |
---|
11 | ### File Specific: |
---|
12 | main-programmer: Christian Meyer |
---|
13 | co-programmer: ... |
---|
14 | */ |
---|
15 | |
---|
16 | /*! |
---|
17 | * @file line.h |
---|
18 | * A basic 3D math line framework |
---|
19 | * |
---|
20 | * Contains class to handle lines |
---|
21 | */ |
---|
22 | |
---|
23 | #ifndef __LINE_H_ |
---|
24 | #define __LINE_H_ |
---|
25 | |
---|
26 | #include "compiler.h" |
---|
27 | #include "vector.h" |
---|
28 | #include "rotation_OBSOLETE.h" |
---|
29 | |
---|
30 | //! 3D line |
---|
31 | /** |
---|
32 | Class to store Lines in 3-dimensional space |
---|
33 | |
---|
34 | Supports line-to-line distance measurements and rotation |
---|
35 | */ |
---|
36 | class Line |
---|
37 | { |
---|
38 | public: |
---|
39 | |
---|
40 | Vector r; //!< Offset |
---|
41 | Vector a; //!< Direction |
---|
42 | |
---|
43 | Line ( Vector r, Vector a) : r(r), a(a) {} //!< assignment constructor |
---|
44 | Line () : r(Vector(0,0,0)), a(Vector (1,1,1)) {} |
---|
45 | ~Line () {} |
---|
46 | |
---|
47 | float distance (const Line& l) const; |
---|
48 | float distancePoint (const Vector& v) const; |
---|
49 | float distancePoint (const sVec3D& v) const; |
---|
50 | Vector* footpoints (const Line& l) const; |
---|
51 | float len () const; |
---|
52 | |
---|
53 | void rotate(const Rotation& rot); |
---|
54 | }; |
---|
55 | |
---|
56 | |
---|
57 | #endif /* __LINE_H_ */ |
---|
58 | |
---|
Note: See
TracBrowser
for help on using the repository browser.