Daniele Bartolini 10 anni fa
parent
commit
e75e9621ba

+ 3 - 5
src/core/math/color4.h

@@ -9,15 +9,12 @@
 
 namespace crown
 {
+/// @addtogroup Math
+/// @{
 
 /// Holds RGBA color as four floats.
-///
-/// @ingroup Math
 typedef Vector4 Color4;
 
-/// Functions to mamipulate Color4
-///
-/// @ingroup Math
 Color4 from_rgb(int r, int g, int b);
 Color4 from_rgba(int r, int g, int b, int a);
 Color4 from_rgba(uint32_t rgba);
@@ -263,4 +260,5 @@ inline uint32_t to_abgr(const Color4& c)
 	return abgr;
 }
 
+/// @}
 } // namespace crown

+ 4 - 0
src/core/math/math_utils.h

@@ -12,6 +12,8 @@
 namespace crown
 {
 
+/// @addtogroup Math
+/// @{
 const float PI = 3.1415926535897932f;
 const float TWO_PI = PI * 2.0f;
 const float HALF_PI = PI * 0.5f;
@@ -203,4 +205,6 @@ inline T catmull_rom(const T& p0, const T& p1, const T& p2, const T& p3, float t
 	return tmp * 0.5;
 }
 
+/// @}
+
 } // namespace crown

+ 5 - 5
src/core/math/matrix3x3.h

@@ -11,11 +11,10 @@
 
 namespace crown
 {
+/// @addtogroup Math
+/// @{
 
-/// Functions to manipulate Matrix3x3
-///
-/// @ingroup Math
-const Matrix3x3 IDENTITY = { {1.0f, 0.0f, 0.0f}, {0.0f, 1.0f, 0.0f}, {0.0f, 0.0f, 1.0f} };
+const Matrix3x3 MATRIX3X3_IDENTITY = { {1.0f, 0.0f, 0.0f}, {0.0f, 1.0f, 0.0f}, {0.0f, 0.0f, 1.0f} };
 
 inline Matrix3x3 matrix3x3(const Vector3& x, const Vector3& y, const Vector3& z)
 {
@@ -108,7 +107,7 @@ inline Matrix3x3 operator*(Matrix3x3 a, float k)
 	return a;
 }
 
-/// @copydoc operator*(Matrix3x3, float)
+/// Multiplies the matrix @a a by the scalar @a k and returns the result.
 inline Matrix3x3 operator*(float k, Matrix3x3 a)
 {
 	a *= k;
@@ -326,4 +325,5 @@ inline const float* to_float_ptr(const Matrix3x3& m)
 	return &m.x.x;
 }
 
+/// @}
 } // namespace crown

+ 4 - 4
src/core/math/matrix4x4.h

@@ -12,10 +12,9 @@
 
 namespace crown
 {
+/// @addtogroup Math
+/// @{
 
-/// Functions to manipulate Matrix4x4.
-///
-/// @ingroup Math
 const Matrix4x4 MATRIX4X4_IDENTITY = { {1.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 1.0f, 0.0f, 0.0f}, { 0.0f, 0.0f, 1.0f, 0.0f}, { 0.0f, 0.0f, 0.0f, 1.0f} };
 
 inline Matrix4x4 matrix4x4(float r1c1, float r2c1, float r3c1, float r4c1,
@@ -187,7 +186,7 @@ inline Matrix4x4 operator*(Matrix4x4 a, float k)
 	return a;
 }
 
-/// @copydoc operator*(Matrix4x4, float)
+/// Multiplies the matrix @a a by the scalar @a k and returns the result.
 inline Matrix4x4 operator*(float k, Matrix4x4 a)
 {
 	a *= k;
@@ -564,4 +563,5 @@ inline const float* to_float_ptr(const Matrix4x4& m)
 	return to_float_ptr(m.x);
 }
 
+/// @}
 } // namespace crown

+ 3 - 3
src/core/math/quaternion.h

@@ -11,10 +11,9 @@
 
 namespace crown
 {
+/// @addtogroup Math
+/// @{
 
-/// Functions to manipulate Quaternion.
-///
-/// @ingroup Math
 const Quaternion QUATERNION_IDENTITY = { 0.0f, 0.0f, 0.0f, 1.0f };
 
 inline Quaternion quaternion(float x, float y, float z, float w)
@@ -123,4 +122,5 @@ inline Quaternion power(const Quaternion& q, float exp)
 	return q;
 }
 
+// @}
 } // namespace crown

+ 5 - 5
src/core/math/vector2.h

@@ -11,10 +11,9 @@
 
 namespace crown
 {
+/// @addtogroup Math
+/// @{
 
-/// Functions to manipulate Vector2.
-///
-/// @ingroup Math
 const Vector2 VECTOR2_ZERO = { 0.0f, 0.0f };
 
 inline Vector2 vector2(float x, float y)
@@ -82,7 +81,7 @@ inline Vector2 operator*(Vector2 a, float k)
 	return a;
 }
 
-/// @copydoc operator*(Vector2, float)
+/// Multiplies the vector @a a by the scalar @a k and returns the result.
 inline Vector2 operator*(float k, Vector2 a)
 {
 	a *= k;
@@ -156,10 +155,11 @@ inline float* to_float_ptr(Vector2& a)
 	return &a.x;
 }
 
-/// @copydoc to_float_ptr(Vector2&)
+/// Returns the pointer to the data of @a a.
 inline const float* to_float_ptr(const Vector2& a)
 {
 	return &a.x;
 }
 
+/// @}
 } // namespace crown

+ 5 - 5
src/core/math/vector3.h

@@ -12,10 +12,9 @@
 
 namespace crown
 {
+/// @addtogroup Math
+/// @{
 
-/// Functions to manipulate Vector3.
-///
-/// @ingroup Math
 const Vector3 VECTOR3_ZERO     = { 0.0f, 0.0f, 0.0f };
 const Vector3 VECTOR3_XAXIS    = { 1.0f, 0.0f, 0.0f };
 const Vector3 VECTOR3_YAXIS    = { 0.0f, 1.0f, 0.0f };
@@ -97,7 +96,7 @@ inline Vector3 operator*(Vector3 a, float k)
 	return a;
 }
 
-/// @copydoc operator*(Vector3, float)
+/// Multiplies the vector @a a by the scalar @a k and returns the result.
 inline Vector3 operator*(float k, Vector3 a)
 {
 	a *= k;
@@ -179,7 +178,7 @@ inline float* to_float_ptr(Vector3& a)
 	return &a.x;
 }
 
-/// @copydoc to_float_ptr(Vector3&)
+/// Returns the pointer to the data of @a a.
 inline const float* to_float_ptr(const Vector3& a)
 {
 	return &a.x;
@@ -191,4 +190,5 @@ inline Vector2 to_vector2(const Vector3& a)
 	return vector2(a.x, a.y);
 }
 
+/// @}
 } // namespace crown

+ 5 - 5
src/core/math/vector4.h

@@ -12,10 +12,9 @@
 
 namespace crown
 {
+/// @addtogroup Math
+/// @{
 
-/// Functions to manipulate Vector4.
-///
-/// @ingroup Math
 const Vector4 VECTOR4_ZERO  = { 0.0f, 0.0f, 0.0f, 0.0f };
 const Vector4 VECTOR4_XAXIS = { 1.0f, 0.0f, 0.0f, 0.0f };
 const Vector4 VECTOR4_YAXIS = { 0.0f, 1.0f, 0.0f, 0.0f };
@@ -110,7 +109,7 @@ inline Vector4 operator*(Vector4 a, float k)
 	return a;
 }
 
-/// @copydoc operator*(Vector4, float)
+/// Multiplies the vector @a a by the scalar @a k and returns the result.
 inline Vector4 operator*(float k, Vector4 a)
 {
 	a *= k;
@@ -188,7 +187,7 @@ inline float* to_float_ptr(Vector4& a)
 	return &a.x;
 }
 
-/// @copydoc to_float_ptr(Vector4&)
+/// Returns the pointer to the data of @a a.
 inline const float* to_float_ptr(const Vector4& a)
 {
 	return &a.x;
@@ -199,4 +198,5 @@ inline Vector3 to_vector3(const Vector4& a)
 	return vector3(a.x, a.y, a.z);
 }
 
+/// @}
 } // namespace crown