Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/lib/math/line.h @ 10772

Last change on this file since 10772 was 9110, checked in by bensch, 18 years ago

orxonox/trunk: merged the Presentation back

File size: 1.2 KB
RevLine 
[5420]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
[4578]16/*!
[6617]17 * @file line.h
18 * A basic 3D math line framework
[5008]19 *
[6617]20 * Contains class to handle lines
[4578]21*/
[2043]22
[6617]23#ifndef __LINE_H_
24#define __LINE_H_
[2043]25
[3860]26#include "compiler.h"
[6617]27#include "vector.h"
28#include "rotation_OBSOLETE.h"
[2043]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*/
36class Line
37{
38  public:
[4578]39
[2043]40  Vector r;   //!< Offset
41  Vector a;   //!< Direction
[4578]42
[2043]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 () {}
[4578]46
[2043]47  float distance (const Line& l) const;
[3228]48  float distancePoint (const Vector& v) const;
[4578]49  float distancePoint (const sVec3D& v) const;
[2043]50  Vector* footpoints (const Line& l) const;
51  float len () const;
[4578]52
[2043]53  void rotate(const Rotation& rot);
54};
55
[4578]56
[6617]57#endif /* __LINE_H_ */
[4578]58
Note: See TracBrowser for help on using the repository browser.