Fawkes API
Fawkes Development Version
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
hom_coord.h
1
2
/***************************************************************************
3
* hom_coord.h - Homogeneous coordinates
4
*
5
* Created: Thu Sep 27 16:07:00 2007
6
* Copyright 2007-2008 Daniel Beck
7
*
8
****************************************************************************/
9
10
/* This program is free software; you can redistribute it and/or modify
11
* it under the terms of the GNU General Public License as published by
12
* the Free Software Foundation; either version 2 of the License, or
13
* (at your option) any later version. A runtime exception applies to
14
* this software (see LICENSE.GPL_WRE file mentioned below for details).
15
*
16
* This program is distributed in the hope that it will be useful,
17
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
* GNU Library General Public License for more details.
20
*
21
* Read the full text in the LICENSE.GPL_WRE file in the doc directory.
22
*/
23
24
#ifndef __GEOMETRY_HOM_COORD_H_
25
#define __GEOMETRY_HOM_COORD_H_
26
27
#include <geometry/printable.h>
28
29
namespace
fawkes {
30
31
class
Vector;
32
class
HomTransform;
33
34
class
HomCoord
:
public
Printable
35
{
36
public
:
37
HomCoord
(
const
HomCoord
& c);
38
39
virtual
~HomCoord
();
40
41
virtual
float
x
()
const
;
42
virtual
float
&
x
();
43
virtual
HomCoord
&
x
(
float
x);
44
45
virtual
float
y
()
const
;
46
virtual
float
&
y
();
47
virtual
HomCoord
&
y
(
float
y);
48
49
virtual
float
z
()
const
;
50
virtual
float
&
z
();
51
virtual
HomCoord
&
z
(
float
z);
52
53
virtual
float
w
()
const
;
54
virtual
float
&
w
();
55
virtual
HomCoord
&
w
(
float
w);
56
57
virtual
HomCoord
&
rotate_x
(
float
rad);
58
virtual
HomCoord
&
rotate_y
(
float
rad);
59
virtual
HomCoord
&
rotate_z
(
float
rad);
60
61
HomCoord
&
transform
(
const
HomTransform
& t);
62
63
virtual
HomCoord
operator-
(
const
HomCoord
& h)
const
;
64
virtual
HomCoord
&
operator-=
(
const
HomCoord
& h);
65
66
virtual
HomCoord
operator+
(
const
HomCoord
& h)
const
;
67
virtual
HomCoord
&
operator+=
(
const
HomCoord
& h);
68
69
virtual
float
operator*
(
const
HomCoord
& h)
const
;
70
71
virtual
HomCoord
operator*
(
const
float
s)
const
;
72
virtual
HomCoord
&
operator*=
(
const
float
s);
73
74
virtual
HomCoord
&
operator=
(
const
HomCoord
& h);
75
76
virtual
bool
operator==
(
const
HomCoord
& h)
const
;
77
virtual
bool
operator!=
(
const
HomCoord
& h)
const
;
78
79
protected
:
80
HomCoord
(
float
x = 0.0,
float
y = 0.0,
float
z = 0.0,
float
w = 0.0);
81
HomCoord
(
const
Vector
& v);
82
83
virtual
std::ostream&
print
(std::ostream& stream)
const
;
84
85
Vector
*
m_vector
;
86
};
87
88
}
// end namespace fawkes
89
90
#endif
/* __GEOMETRY_HOM_COORD_H_ */
src
libs
geometry
hom_coord.h
Generated by
1.8.1.2