stromx  0.8.0
Position.h
1 /*
2  * Copyright 2013 Matthias Fuchs
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef STROMX_RUNTIME_POSITION_H
18 #define STROMX_RUNTIME_POSITION_H
19 
20 
21 namespace stromx
22 {
23  namespace runtime
24  {
26  class Position
27  {
28  public:
30  Position() : m_x(0), m_y(0) {}
31 
33  Position(const float x, const float y) : m_x(x), m_y(y) {}
34 
36  float x() const { return m_x; }
37 
39  float y() const { return m_y; }
40 
42  void setX(const float x) { m_x = x; }
43 
45  void setY(const float y) { m_y = y; }
46 
47  private:
48  float m_x;
49  float m_y;
50  };
51  }
52 }
53 
54 #endif // STROMX_RUNTIME_POSITION_H
Position(const float x, const float y)
Definition: Position.h:33
The stromx class library.
Definition: AdjustRgbChannels.cpp:29
float x() const
Definition: Position.h:36
Position()
Definition: Position.h:30
2D position.
Definition: Position.h:26
float y() const
Definition: Position.h:39
void setX(const float x)
Definition: Position.h:42
void setY(const float y)
Definition: Position.h:45