Преглед изворни кода

Update documentation of core/math

Daniele Bartolini пре 12 година
родитељ
комит
ca2d8e40a8

+ 3 - 0
engine/core/math/AABB.h

@@ -36,6 +36,9 @@ OTHER DEALINGS IN THE SOFTWARE.
 namespace crown
 {
 
+/// Functions to manipulate AABB.
+///
+/// @ingroup Math
 namespace aabb
 {
 	void reset(AABB& b);

+ 4 - 0
engine/core/math/Frustum.h

@@ -39,6 +39,10 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 namespace crown
 {
+
+/// Functions to manipulate Frustum.
+///
+/// @ingroup Math
 namespace frustum
 {
 	/// Returns whether the frustum @a f contains the point @a p.

+ 10 - 0
engine/core/math/MathTypes.h

@@ -29,6 +29,9 @@ OTHER DEALINGS IN THE SOFTWARE.
 namespace crown
 {
 
+/// @defgroup Math Math
+
+/// @ingroup Math
 struct Vector2
 {
 	Vector2();
@@ -48,6 +51,7 @@ struct Vector2
 	float x, y;
 };
 
+/// @ingroup Math
 struct Vector3
 {
 	Vector3();
@@ -67,6 +71,7 @@ struct Vector3
 	float x, y, z;
 };
 
+/// @ingroup Math
 struct Vector4
 {
 	Vector4();
@@ -86,6 +91,7 @@ struct Vector4
 	float x, y, z, w;
 };
 
+/// @ingroup Math
 struct Quaternion
 {
 	Quaternion();
@@ -97,6 +103,7 @@ struct Quaternion
 	float x, y, z, w;
 };
 
+/// @ingroup Math
 struct AABB
 {
 	AABB();
@@ -111,6 +118,8 @@ struct AABB
 /// 3D Plane.
 /// The form is ax + by + cz + d = 0
 /// where: d = -vector3::dot(n, p)
+///
+/// @ingroup Math
 struct Plane
 {
 	/// Does nothing for efficiency.
@@ -122,6 +131,7 @@ struct Plane
 	float d;
 };
 
+/// @ingroup Math
 struct Frustum
 {
 	Frustum();

+ 3 - 0
engine/core/math/Plane.h

@@ -34,6 +34,9 @@ OTHER DEALINGS IN THE SOFTWARE.
 namespace crown
 {
 
+/// Functions to manipulate Plane.
+///
+/// @ingroup Math
 namespace plane
 {
 	/// Normalizes the plane @æ p and returns its result.

+ 3 - 0
engine/core/math/Quaternion.h

@@ -44,6 +44,9 @@ Quaternion operator*(Quaternion a, const Quaternion& b);
 /// Multiplies the quaternion @a a by the scalar @a k.
 Quaternion operator*(const Quaternion& a, float k);
 
+/// Functions to manipulate Quaternion.
+///
+/// @ingroup Math
 namespace quaternion
 {
 	const Quaternion IDENTITY = Quaternion(0.0, 0.0, 0.0, 1.0);

+ 3 - 0
engine/core/math/Vector2.h

@@ -55,6 +55,9 @@ Vector2 operator/(Vector2 a, float k);
 /// Returns true whether the vectors @a a and @a b are equal.
 bool operator==(const Vector2& a, const Vector2& b);
 
+/// Functions to manipulate Vector2.
+///
+/// @ingroup Math
 namespace vector2
 {
 	const Vector2 ZERO = Vector2(0, 0);

+ 3 - 0
engine/core/math/Vector3.h

@@ -56,6 +56,9 @@ Vector3 operator/(Vector3 a, float k);
 /// Returns true whether the vectors @a a and @a b are equal.
 bool operator==(const Vector3& a, const Vector3& b);
 
+/// Functions to manipulate Vector3.
+///
+/// @ingroup Math
 namespace vector3
 {
 	const Vector3 ZERO = Vector3(0, 0, 0);

+ 3 - 0
engine/core/math/Vector4.h

@@ -55,6 +55,9 @@ Vector4 operator/(Vector4 a, float k);
 /// Returns true whether the vectors @a a and @a b are equal.
 bool operator==(const Vector4& a, const Vector4& b);
 
+/// Functions to manipulate Vector4.
+///
+/// @ingroup Math
 namespace vector4
 {
 	const Vector4 ZERO = Vector4(0, 0, 0, 0);