Blocking traversaltag setting on KeyRelease: Fix for N_SE-53471
[platform/framework/native/uifw.git] / inc / FGrpFloatPoint3.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0/
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17
18 /**
19  * @file        FGrpFloatPoint3.h
20  * @brief       This is the header file for the %FloatPoint3 class.
21  *
22  * This header file contains the declarations of the %FloatPoint3 class.
23  *
24  */
25
26 #ifndef _FGRP_FLOAT_POINT3_H_
27 #define _FGRP_FLOAT_POINT3_H_
28
29 #include <FBaseObject.h>
30
31 namespace Tizen { namespace Graphics
32 {
33 class FloatVector4;
34 }}
35
36 namespace Tizen { namespace Graphics
37 {
38 /**
39  * @class       FloatPoint3
40  * @brief       This class encapsulates a 3-dimensional point.
41  *
42  * @since 2.0
43  *
44  * The %FloatPoint3 class provides a float precision, three-dimensional point class.
45  *
46  */
47 class _OSP_EXPORT_ FloatPoint3
48         : public Tizen::Base::Object
49 {
50 public:
51         /**
52          * This is the default constructor for this class. @n
53          * This constructor initializes the instance to a 3-dimensional zero point.
54          *
55          * @since 2.0
56          */
57         FloatPoint3(void);
58
59         /**
60          * This is the copy constructor for the %FloatPoint3 class. @n
61          * This constructor initializes the instance of %FloatPoint3 with the attributes of the specified instance of %FloatPoint3.
62          *
63          * @since 2.0
64          *
65          * @param[in]   rhs     An instance of %FloatPoint3
66          */
67         FloatPoint3(const FloatPoint3& rhs);
68
69         /**
70          * This constructor initializes the instance of %FloatPoint3 with the attributes of the specified instance of %FloatVector4.
71          *
72          * @since 2.0
73          *
74          * @param[in]   vector  An instance of %FloatVector4
75          * @remarks     The normalized vector can only be converted to point. Therefore, when the input vector is not normalized then the point is converted from the normal vector of the input instance.
76          */
77         explicit FloatPoint3(const FloatVector4& vector);
78
79         /**
80          * This constructor initializes the instance of %FloatPoint3 with the attributes of the specified instance of the array.
81          *
82          * @since 2.0
83          *
84          * @param[in]   point   The point with 3 float values
85          */
86         explicit FloatPoint3(const float point[3]);
87
88         /**
89          * This constructor initializes the instance of %FloatPoint3 with floating point numbers for each coordinate.
90          *
91          * @since 2.0
92          *
93          * @param[in]   x       x component of point instance
94          * @param[in]   y       y component of point instance
95          * @param[in]   z       z component of point instance
96          */
97         FloatPoint3(float x, float y, float z);
98
99         /**
100          * This destructor overrides Tizen::Base::Object::~Object().
101          *
102          * @since 2.0
103          */
104         virtual ~FloatPoint3(void);
105
106         /**
107          * Checks whether the current instance and the specified instance of %FloatPoint3 are equal.
108          *
109          * @since 2.0
110          *
111          * @return      @c true if all members of the current point instance are equal to the corresponding point members in the specified instance, @n
112          *                      else @c false
113          * @param[in]   rhs     An instance of %FloatPoint3
114          */
115         bool operator ==(const FloatPoint3& rhs) const;
116
117         /**
118          * Checks whether the current instance and the specified instance of %FloatPoint3 are not equal.
119          *
120          * @since 2.0
121          *
122          * @return      @c true if all point members of the current instance are not equal to the corresponding point members in the specified instance, @n
123          *                      else @c false
124          * @param[in]   rhs     An instance of %FloatPoint3
125          */
126         inline bool operator !=(const FloatPoint3& rhs) const
127         {
128                 return !(*this == rhs);
129         }
130
131         /**
132          * Assigns the values of the specified instance to the current instance of %FloatPoint3.
133          *
134          * @since 2.0
135          *
136          * @return      The reference to this instance
137          * @param[in]   rhs     An instance of %FloatPoint3
138          */
139         FloatPoint3& operator =(const FloatPoint3& rhs);
140
141         /**
142          * Multiplies the value to each point members of current instance of %FloatPoint3.
143          *
144          * @since 2.0
145          *
146          * @return      A new instance of %FloatPoint3 containing the resulting value of the operation
147          * @param[in]   value   A @c float value to multiply
148          */
149         FloatPoint3 operator *(float value) const;
150
151         /**
152          * Divides each point members of current instance of %FloatPoint3 with the specified value.
153          *
154          * @since 2.0
155          *
156          * @return      A new instance of %FloatPoint3 containing the resulting value of the operation
157          * @param[in]   value   A @c float value to divide
158          */
159         FloatPoint3 operator /(float value) const;
160
161         /**
162          * Adds the value of the specified instance and the current instance of %FloatPoint3.
163          *
164          * @since 2.0
165          *
166          * @return      A new instance of %FloatPoint3 containing the resulting value of the operation
167          * @param[in]   rhs     An instance of %FloatPoint3
168          */
169         FloatPoint3 operator +(const FloatPoint3& rhs) const;
170
171         /**
172          * Subtracts the value of the specified instance from the current instance of %FloatPoint3.
173          *
174          * @since 2.0
175          *
176          * @return      A new instance of %FloatPoint3 containing the resulting value of the operation
177          * @param[in]   rhs     An instance of %FloatPoint3
178          */
179         FloatPoint3 operator -(const FloatPoint3& rhs) const;
180
181         /**
182          * Adds the value of the specified instance to the current instance of %FloatPoint3.
183          *
184          * @since 2.0
185          *
186          * @return      The reference to %FloatPoint3 containing the resulting value of the operation
187          * @param[in]   rhs     An instance of %FloatPoint3
188          */
189         FloatPoint3& operator +=(const FloatPoint3& rhs);
190
191         /**
192          * Subtracts the value of the specified instance from the current instance of %FloatPoint3.
193          *
194          * @since 2.0
195          *
196          * @return      The reference to %FloatPoint3 containing the resulting value of the operation
197          * @param[in]   rhs     An instance of %FloatPoint3
198          */
199         FloatPoint3& operator -=(const FloatPoint3& rhs);
200
201         /**
202          * Checks whether the current instance of %FloatPoint3 equals the specified instance of %FloatPoint3.
203          *
204          * @since 2.0
205          *
206          * @return      @c true if the values of the current instance is equal to the value of the specified instance, @n
207          *                      else @c false
208          * @param[in]   obj     An instance of %FloatPoint3
209          * @remarks     This method overrides Tizen::Base::Object::Equals(). This method uses the values of the Point components to compare the two instances.
210          */
211         virtual bool Equals(const Tizen::Base::Object& obj) const;
212
213         /**
214          * Gets the hash value of the current instance of %FloatPoint3.
215          *
216          * @since 2.0
217          *
218          * @return      The hash value of the current instance
219          * @remarks     Two equal instances must return the same hash value. For better performance,
220          *                              the used hash function must generate a random distribution for all inputs.
221          */
222         virtual int GetHashCode(void) const;
223
224         /**
225          * x component of the current instance of %FloatPoint3.
226          *
227          * @since 2.0
228          */
229         float x;
230
231         /**
232          * y component of the current instance of %FloatPoint3.
233          *
234          * @since 2.0
235          */
236         float y;
237
238         /**
239          * z component of the current instance of %FloatPoint3.
240          *
241          * @since 2.0
242          */
243         float z;
244
245 private:
246         friend class _FloatPoint3Impl;
247         class _FloatPoint3Impl* __pImpl;
248
249 }; // FloatPoint3
250
251 /**
252  * Gets the instance of %FloatPoint3 resulting from the product of the value and the specified instance of %FloatPoint3.
253  *
254  * @since 2.0
255  *
256  * @return      A new instance of %FloatPoint3 containing the resulting value of the operation
257  * @param[in]   value   A @c float value to multiply
258  * @param[in]   rhs     An instance of %FloatPoint3
259  */
260 _OSP_EXPORT_ FloatPoint3 operator *(const float& value, const FloatPoint3& rhs);
261
262 /**
263  * Gets the instance of %FloatPoint3 resulting from the divide of the value and the specified instance of %FloatPoint3.
264  *
265  * @since 2.0
266  *
267  * @return      A new instance of %FloatPoint3 containing the resulting value of the operation
268  * @param[in]   value   A @c float value to divide
269  * @param[in]   rhs     An instance of %FloatPoint3
270  */
271 _OSP_EXPORT_ FloatPoint3 operator /(const float& value, const FloatPoint3& rhs);
272
273 }} // Tizen::Graphics
274
275 #endif //_FGRP_FLOAT_POINT3_H_