OpenWalnut
1.3.1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
src
core
common
math
WUnitSphereCoordinates.h
1
//---------------------------------------------------------------------------
2
//
3
// Project: OpenWalnut ( http://www.openwalnut.org )
4
//
5
// Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS
6
// For more information see http://www.openwalnut.org/copying
7
//
8
// This file is part of OpenWalnut.
9
//
10
// OpenWalnut is free software: you can redistribute it and/or modify
11
// it under the terms of the GNU Lesser General Public License as published by
12
// the Free Software Foundation, either version 3 of the License, or
13
// (at your option) any later version.
14
//
15
// OpenWalnut is distributed in the hope that it will be useful,
16
// but WITHOUT ANY WARRANTY; without even the implied warranty of
17
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
// GNU Lesser General Public License for more details.
19
//
20
// You should have received a copy of the GNU Lesser General Public License
21
// along with OpenWalnut. If not, see <http://www.gnu.org/licenses/>.
22
//
23
//---------------------------------------------------------------------------
24
25
#ifndef WUNITSPHERECOORDINATES_H
26
#define WUNITSPHERECOORDINATES_H
27
28
#include <vector>
29
30
#include "../../common/math/linearAlgebra/WLinearAlgebra.h"
31
32
/**
33
* This class stores coordinates on the unit sphere.
34
*/
35
class
WUnitSphereCoordinates
// NOLINT
36
{
37
// TODO(all): implement test
38
// friend class WUnitSphereCoordinatesTest;
39
public
:
40
/**
41
* Default constructor.
42
*/
43
WUnitSphereCoordinates
();
44
45
/**
46
* Constructor for unit sphere angles.
47
* \param theta coordinate
48
* \param phi coordinate
49
*/
50
WUnitSphereCoordinates
(
double
theta,
double
phi );
51
52
/**
53
* Constructor for Euclidean coordinates.
54
* \param vector Euclidean coordinates
55
*/
56
explicit
WUnitSphereCoordinates
(
WVector3d
vector );
57
58
/**
59
* Destructor.
60
*/
61
virtual
~WUnitSphereCoordinates
();
62
63
/**
64
* Return the theta angle.
65
*
66
* \return theta angle
67
*/
68
double
getTheta
()
const
;
69
70
/**
71
* Return the phi angle.
72
*
73
* \return phi angle
74
*/
75
double
getPhi
()
const
;
76
77
/**
78
* Set theta angle.
79
* \param theta Value for theta.
80
*/
81
void
setTheta
(
double
theta );
82
83
/**
84
* Set phi angle.
85
* \param phi Value for phi.
86
*/
87
void
setPhi
(
double
phi );
88
89
/**
90
* Returns the stored sphere coordinates as Euclidean coordinates.
91
*
92
* \return sphere coordinates in euclidean space
93
*/
94
WVector3d
getEuclidean
()
const
;
95
96
protected
:
97
private
:
98
/** coordinate */
99
double
m_theta
;
100
/** coordinate */
101
double
m_phi
;
102
};
103
104
#endif // WUNITSPHERECOORDINATES_H
Generated by
1.8.1.2