X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Fpublic-api%2Fmath%2Fangle-axis.h;h=721e7a7f19230b8b3090a346bba40bf475d7c466;hb=0b501ba800a263b97d99adf224fc42d0c2aa8b37;hp=1ff1ed3883355219a15cfc440a7f63e2e4b83559;hpb=2876faf9ce9400279e30f699137e4342002184e6;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/public-api/math/angle-axis.h b/dali/public-api/math/angle-axis.h index 1ff1ed3..721e7a7 100644 --- a/dali/public-api/math/angle-axis.h +++ b/dali/public-api/math/angle-axis.h @@ -2,7 +2,7 @@ #define DALI_ANGLE_AXIS_H /* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -51,7 +51,8 @@ struct AngleAxis AngleAxis() : angle(0.0f), axis(0.0f, 0.0f, 0.0f) - { } + { + } /** * @brief Creates an angle-axis pair. @@ -60,14 +61,21 @@ struct AngleAxis * @param[in] initialAngle The initial angle in radians * @param[in] initialAxis The initial axis */ - AngleAxis( Radian initialAngle, const Vector3& initialAxis ) - : angle( initialAngle ), - axis( initialAxis ) - { } + AngleAxis(Radian initialAngle, const Vector3& initialAxis) + : angle(initialAngle), + axis(initialAxis) + { + } - Radian angle; ///< The angle in radians - Vector3 axis; ///< The axis +public: + AngleAxis(const AngleAxis&) = default; ///< Default copy constructor + AngleAxis(AngleAxis&&) noexcept = default; ///< Default move constructor + AngleAxis& operator=(const AngleAxis&) = default; ///< Default copy assignment operator + AngleAxis& operator=(AngleAxis&&) noexcept = default; ///< Default move assignment operator +public: + Radian angle; ///< The angle in radians + Vector3 axis; ///< The axis }; // Compiler generated destructor, copy constructor and assignment operators are ok as this class is POD @@ -80,7 +88,7 @@ struct AngleAxis * @param rhs angle axis * @return True if they are equal */ -inline bool operator==( const Dali::AngleAxis& lhs, const Dali::AngleAxis& rhs ) +inline bool operator==(const Dali::AngleAxis& lhs, const Dali::AngleAxis& rhs) { return (lhs.angle == rhs.angle) && (lhs.axis == rhs.axis); } @@ -93,9 +101,9 @@ inline bool operator==( const Dali::AngleAxis& lhs, const Dali::AngleAxis& rhs ) * @param[in] angleAxis The angle axis to print * @return The output stream operator */ -inline std::ostream& operator<< (std::ostream& o, const Dali::AngleAxis& angleAxis) +inline std::ostream& operator<<(std::ostream& o, const Dali::AngleAxis& angleAxis) { - return o << "[ Axis: [" << angleAxis.axis.x << ", " << angleAxis.axis.y << ", " << angleAxis.axis.z << "], Angle: " << Degree( angleAxis.angle ).degree << " degrees ]"; + return o << "[ Axis: [" << angleAxis.axis.x << ", " << angleAxis.axis.y << ", " << angleAxis.axis.z << "], Angle: " << Degree(angleAxis.angle).degree << " degrees ]"; } /**