Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00031
00032 #pragma once
00033
00034 #include "../api_core.h"
00035 #include "../System/sharedptr.h"
00036
00037 class CL_Angle_Impl;
00038
00042 enum CL_AngleUnit
00043 {
00044 cl_degrees,
00045 cl_radians
00046 };
00047
00051 enum CL_EulerOrder
00052 {
00053 cl_XYZ,
00054 cl_XZY,
00055 cl_YZX,
00056 cl_YXZ,
00057 cl_ZXY,
00058 cl_ZYX
00059 };
00060
00061
00065 class CL_API_CORE CL_Angle
00066 {
00069 public:
00071 CL_Angle();
00072
00074 CL_Angle(float value, CL_AngleUnit unit);
00075
00081 static CL_Angle from_radians(float value);
00082
00088 static CL_Angle from_degrees(float value);
00089
00093 public:
00095 float to_degrees() const;
00096
00098 float to_radians() const;
00099
00103 public:
00105 void set_degrees(float degrees);
00106
00108 void set_radians(float radians);
00109
00113 CL_Angle &normalize();
00114
00118 CL_Angle &normalize_180();
00119
00123 public:
00125 void operator += (const CL_Angle &angle);
00126
00128 void operator -= (const CL_Angle &angle);
00129
00131 void operator *= (const CL_Angle &angle);
00132
00134 void operator /= (const CL_Angle &angle);
00135
00137 CL_Angle operator + (const CL_Angle &angle) const;
00138
00140 CL_Angle operator - (const CL_Angle &angle) const;
00141
00143 CL_Angle operator * (const CL_Angle &angle) const;
00144
00146 CL_Angle operator * (float value) const;
00147
00149 CL_Angle operator / (const CL_Angle &angle) const;
00150
00152 CL_Angle operator / (float value) const;
00153
00155 bool operator < (const CL_Angle &angle) const;
00156
00158 bool operator <= (const CL_Angle &angle) const;
00159
00161 bool operator > (const CL_Angle &angle) const;
00162
00164 bool operator >= (const CL_Angle &angle) const;
00165
00167 bool operator== (const CL_Angle &angle) const;
00168
00170 bool operator!= (const CL_Angle &angle) const;
00171
00175 private:
00176 float value_rad;
00177
00179 };
00180