Merge pull request #11190 from dabingnn/v3_comments

V3 comments
This commit is contained in:
minggo 2015-03-27 13:40:07 +08:00
commit de3822c1b6
27 changed files with 247 additions and 86 deletions

View File

@ -31,6 +31,11 @@ THE SOFTWARE.
#include "math/CCGeometry.h"
#include "math/CCMath.h"
/**
* @addtogroup base
* @{
*/
NS_CC_BEGIN
/**@{
@ -108,4 +113,7 @@ extern CC_DLL const AffineTransform AffineTransformIdentity;
NS_CC_END
// end of base transform
/// @}
#endif // __MATH_CCAFFINETRANSFORM_H__

View File

@ -32,13 +32,13 @@ THE SOFTWARE.
#include "base/ccMacros.h"
#include "math/CCMath.h"
NS_CC_BEGIN
/**
* @addtogroup data_structures
* @addtogroup base
* @{
*/
NS_CC_BEGIN
class CC_DLL Size
{
public:
@ -207,9 +207,9 @@ public:
static const Rect ZERO;
};
// end of data_structure group
/// @}
NS_CC_END
// end of base group
/// @}
#endif // __MATH_CCGEOMETRY_H__

View File

@ -4,6 +4,11 @@
#include <memory>
#include <string.h>
#include "platform/CCPlatformMacros.h"
/**
* @addtogroup base
* @{
*/
/**Util macro for conversion from degrees to radians.*/
#define MATH_DEG_TO_RAD(x) ((x) * 0.0174532925f)
/**Util macro for conversion from radians to degrees.*/
@ -39,5 +44,9 @@
#define USING_NS_CC_MATH
#endif
/**
* end of base group
* @}
*/
#endif // __CCMATHBASE_H__

View File

@ -28,13 +28,13 @@
#include "base/ccTypes.h"
NS_CC_BEGIN
/**
* @addtogroup data_structures
* @addtogroup base
* @{
*/
NS_CC_BEGIN
/** @file CCVertex.h */
/** converts a line to a polygon */
@ -46,10 +46,11 @@ bool CC_DLL ccVertexLineIntersect(float Ax, float Ay,
float Cx, float Cy,
float Dx, float Dy, float *T);
// end of data_structures group
/// @}
NS_CC_END
// end of base group
/// @}
#endif /* __CCVERTEX_H__ */

View File

@ -31,6 +31,11 @@
#include <xmmintrin.h>
#endif
/**
* @addtogroup base
* @{
*/
NS_CC_MATH_BEGIN
//class Plane;
@ -275,12 +280,9 @@ public:
const Vec3& cameraUpVector, const Vec3& cameraForwardVector,
Mat4* dst);
/**
* Fills in an existing Mat4 so that it reflects the coordinate system about a specified Plane.
*
* @param plane The Plane about which to create a reflection.
* @param dst A matrix to store the result in.
*/
//Fills in an existing Mat4 so that it reflects the coordinate system about a specified Plane.
//plane The Plane about which to create a reflection.
//dst A matrix to store the result in.
//static void createReflection(const Plane& plane, Mat4* dst);
/**
@ -485,11 +487,7 @@ public:
bool inverse();
/**
* Stores the inverse of this matrix in the specified matrix.
*
* @param dst A matrix to store the invert of this matrix in.
*
* @return true if the the matrix can be inverted, false otherwise.
* Get the inversed matrix.
*/
Mat4 getInversed() const;
@ -546,9 +544,7 @@ public:
void negate();
/**
* Negates this matrix and stores the result in dst.
*
* @param dst A matrix to store the result in.
Get the Negated matrix.
*/
Mat4 getNegated() const;
@ -867,9 +863,7 @@ public:
void transpose();
/**
* Transposes this matrix and stores the result in dst.
*
* @param dst A matrix to store the result in.
* Get the Transposed matrix.
*/
Mat4 getTransposed() const;
@ -993,7 +987,10 @@ inline Vec4& operator*=(Vec4& v, const Mat4& m);
inline const Vec4 operator*(const Mat4& m, const Vec4& v);
NS_CC_MATH_END
/**
end of base group
@}
*/
#include "math/Mat4.inl"
#endif // MATH_MAT4_H

View File

@ -28,6 +28,11 @@
#include "CCMathBase.h"
/**
* @addtogroup base
* @{
*/
NS_CC_MATH_BEGIN
/**
@ -115,7 +120,10 @@ private:
};
NS_CC_MATH_END
/**
end of base group
@}
*/
#define MATRIX_SIZE ( sizeof(float) * 16)
#endif

View File

@ -26,6 +26,11 @@
#include "math/Mat4.h"
//#include "Plane.h"
/**
* @addtogroup base
* @{
*/
NS_CC_MATH_BEGIN
class Mat4;
@ -184,9 +189,8 @@ public:
void conjugate();
/**
* Gets the conjugate of this quaternion in dst.
* Gets the conjugate of this quaternion.
*
* @param dst A quaternion to store the conjugate in.
*/
Quaternion getConjugated() const;
@ -203,16 +207,12 @@ public:
bool inverse();
/**
* Gets the inverse of this quaternion in dst.
* Gets the inverse of this quaternion.
*
* Note that the inverse of a quaternion is equal to its conjugate
* when the quaternion is unit-length. For this reason, it is more
* efficient to use the conjugate method directly when you know your
* quaternion is already unit-length.
*
* @param dst A quaternion to store the inverse in.
*
* @return true if the inverse can be computed, false otherwise.
*/
Quaternion getInversed() const;
@ -241,13 +241,11 @@ public:
void normalize();
/**
* Normalizes this quaternion and stores the result in dst.
* Get the normalized quaternion.
*
* If the quaternion already has unit length or if the length
* of the quaternion is zero, this method simply copies
* this vector into dst.
*
* @param dst A quaternion to store the result in.
* this vector.
*/
Quaternion getNormalized() const;
@ -413,7 +411,10 @@ private:
};
NS_CC_MATH_END
/**
end of base group
@}
*/
#include "Quaternion.inl"
#endif

View File

@ -31,6 +31,11 @@ THE SOFTWARE.
#include "platform/CCGL.h"
#include "base/ccMacros.h"
/**
* @addtogroup base
* @{
*/
namespace cocos2d {
struct AffineTransform;
@ -43,5 +48,8 @@ CC_DLL void CGAffineToGL(const AffineTransform &t, GLfloat *m);
CC_DLL void GLToCGAffine(const GLfloat *m, AffineTransform *t);
/**@}*/
}//namespace cocos2d
/**
end of base group
@}
*/
#endif // __SUPPORT_TRANSFORM_UTILS_H__

View File

@ -27,6 +27,11 @@
#include <math.h>
#include "math/CCMathBase.h"
/**
* @addtogroup base
* @{
*/
NS_CC_MATH_BEGIN
/** Clamp a value between from and to.
@ -245,13 +250,7 @@ public:
void normalize();
/**
* Normalizes this vector and stores the result in dst.
*
* If the vector already has unit length or if the length
* of the vector is zero, this method simply copies the
* current vector into dst.
*
* @param dst The destination vector.
Get the normalized vector.
*/
Vec2 getNormalized() const;
@ -757,6 +756,11 @@ typedef Vec2 Point;
NS_CC_MATH_END
/**
end of base group
@}
*/
#include "Vec2.inl"
#endif // MATH_VEC2_H

View File

@ -24,6 +24,11 @@
#include "math/CCMathBase.h"
/**
* @addtogroup base
* @{
*/
NS_CC_MATH_BEGIN
class Mat4;
@ -271,13 +276,7 @@ public:
void normalize();
/**
* Normalizes this vector and stores the result in dst.
*
* If the vector already has unit length or if the length
* of the vector is zero, this method simply copies the
* current vector into dst.
*
* @param dst The destination vector.
* Get the normalized vector.
*/
Vec3 getNormalized() const;
@ -482,7 +481,10 @@ inline const Vec3 operator*(float x, const Vec3& v);
//typedef Vec3 Point3;
NS_CC_MATH_END
/**
end of base group
@}
*/
#include "Vec3.inl"
#endif // MATH_VEC3_H

View File

@ -28,6 +28,11 @@
#include "math/CCMathBase.h"
/**
* @addtogroup base
* @{
*/
NS_CC_MATH_BEGIN
class Mat4;
@ -269,13 +274,7 @@ public:
void normalize();
/**
* Normalizes this vector and stores the result in dst.
*
* If the vector already has unit length or if the length
* of the vector is zero, this method simply copies the
* current vector into dst.
*
* @param dst The destination vector.
* Get the normalized vector.
*/
Vec4 getNormalized() const;
@ -460,7 +459,10 @@ public:
inline const Vec4 operator*(float x, const Vec4& v);
NS_CC_MATH_END
/**
end of base group
@}
*/
#include "math/Vec4.inl"
#endif // MATH_VEC4_H

View File

@ -27,6 +27,11 @@
#include "renderer/CCRenderCommand.h"
/**
* @addtogroup support
* @{
*/
NS_CC_BEGIN
class TextureAtlas;
@ -73,4 +78,8 @@ protected:
};
NS_CC_END
/**
end of support group
@}
*/
#endif //_CC_BATCHCOMMAND_H_

View File

@ -28,6 +28,11 @@
#include "renderer/CCRenderCommand.h"
/**
* @addtogroup support
* @{
*/
NS_CC_BEGIN
/**
Custom command is used for call custom openGL command which can not be done by other commands,
@ -68,5 +73,8 @@ protected:
};
NS_CC_END
/**
end of support group
@}
*/
#endif //_CC_CUSTOMCOMMAND_H_

View File

@ -38,6 +38,11 @@ THE SOFTWARE.
#include "platform/CCGL.h"
#include "math/CCMath.h"
/**
* @addtogroup support
* @{
*/
NS_CC_BEGIN
class GLProgram;
@ -514,5 +519,8 @@ protected:
};
NS_CC_END
/**
end of support group
@}
*/
#endif /* __CCGLPROGRAM_H__ */

View File

@ -33,15 +33,15 @@ THE SOFTWARE.
#include "base/CCRef.h"
/**
* @addtogroup support
* @{
*/
NS_CC_BEGIN
class GLProgram;
/**
* @addtogroup shaders
* @{
*/
/** GLProgramCache
Singleton that stores manages GLProgram objects (shaders)
@since v2.0
@ -109,9 +109,8 @@ private:
std::unordered_map<std::string, GLProgram*> _programs;
};
NS_CC_END
// end of shaders group
/// @}
NS_CC_END
#endif /* __CCGLPROGRAMCACHE_H__ */

View File

@ -33,6 +33,11 @@ THE SOFTWARE.
#include "math/Vec3.h"
#include "math/Vec4.h"
/**
* @addtogroup support
* @{
*/
NS_CC_BEGIN
class GLProgram;
@ -305,4 +310,8 @@ protected:
NS_CC_END
/**
end of support group
@}
*/
#endif /* __CCGLPROGRAMSTATE_H__ */

View File

@ -32,6 +32,11 @@ THE SOFTWARE.
#include "math/Vec3.h"
#include "math/Vec4.h"
/**
* @addtogroup support
* @{
*/
NS_CC_BEGIN
class GLProgram;
@ -66,5 +71,8 @@ protected:
};
NS_CC_END
/**
end of support group
@}
*/
#endif /* __CCGLPROGRAMSTATECACHE_H__ */

View File

@ -32,6 +32,11 @@
#include "base/CCRef.h"
#include "CCRenderCommand.h"
/**
* @addtogroup support
* @{
*/
NS_CC_BEGIN
//Used for internal
@ -76,4 +81,8 @@ protected:
NS_CC_END
/**
end of support group
@}
*/
#endif //_CC_GROUPCOMMAND_H_

View File

@ -27,6 +27,11 @@
#include "renderer/CCVertexIndexData.h"
/**
* @addtogroup support
* @{
*/
NS_CC_BEGIN
class IndexBuffer;
@ -80,4 +85,8 @@ protected:
NS_CC_END
/**
end of support group
@}
*/
#endif //__CC_PRIMITIVE_H__

View File

@ -28,6 +28,11 @@
#include "renderer/CCPrimitive.h"
#include "renderer/CCRenderCommand.h"
/**
* @addtogroup support
* @{
*/
NS_CC_BEGIN
class GLProgramState;
/**
@ -82,4 +87,8 @@ protected:
NS_CC_END
/**
end of support group
@}
*/
#endif //_CC_PRIMITIVE_COMMAND_H__

View File

@ -28,6 +28,11 @@
#include "renderer/CCRenderCommand.h"
#include "renderer/CCGLProgramState.h"
/**
* @addtogroup support
* @{
*/
NS_CC_BEGIN
/**
@ -97,4 +102,8 @@ protected:
NS_CC_END
/**
end of support group
@}
*/
#endif //_CC_QUADCOMMAND_H_

View File

@ -31,6 +31,11 @@
#include "platform/CCPlatformMacros.h"
#include "base/ccTypes.h"
/**
* @addtogroup support
* @{
*/
NS_CC_BEGIN
/** Base class of the `RenderCommand` hierarchy.
@ -124,5 +129,8 @@ protected:
};
NS_CC_END
/**
end of support group
@}
*/
#endif //__CCRENDERCOMMAND_H_

View File

@ -34,6 +34,11 @@
#include "renderer/CCGLProgram.h"
#include "platform/CCGL.h"
/**
* @addtogroup support
* @{
*/
NS_CC_BEGIN
class EventListenerCustom;
@ -260,4 +265,8 @@ protected:
NS_CC_END
/**
end of support group
@}
*/
#endif //__CC_RENDERER_H_

View File

@ -28,6 +28,11 @@
#include "renderer/CCRenderCommand.h"
#include "renderer/CCGLProgramState.h"
/**
* @addtogroup support
* @{
*/
NS_CC_BEGIN
/**
Command used to render one or more Triangles, which is similar to QuadCommand.
@ -108,5 +113,8 @@ protected:
};
NS_CC_END
/**
end of support group
@}
*/
#endif // defined(__CC_TRIANGLES_COMMAND__)

View File

@ -29,6 +29,11 @@
#include "base/CCRef.h"
#include "platform/CCGL.h"
/**
* @addtogroup support
* @{
*/
NS_CC_BEGIN
class EventListenerCustom;
@ -253,4 +258,8 @@ public:
NS_CC_END
/**
end of support group
@}
*/
#endif /* __CC_VERTEX_INDEX_BUFFER_H__*/

View File

@ -28,6 +28,11 @@
#include "base/CCRef.h"
#include <map>
/**
* @addtogroup support
* @{
*/
NS_CC_BEGIN
class VertexBuffer;
@ -175,5 +180,8 @@ protected:
};
NS_CC_END
/**
end of support group
@}
*/
#endif //__CC_VERTEX_INDEX_DATA_H__

View File

@ -31,13 +31,13 @@ THE SOFTWARE.
#include "platform/CCGL.h"
#include "platform/CCPlatformMacros.h"
NS_CC_BEGIN
/**
* @addtogroup shaders
* @addtogroup support
* @{
*/
NS_CC_BEGIN
extern CC_DLL const GLchar * ccPosition_uColor_frag;
extern CC_DLL const GLchar * ccPosition_uColor_vert;
@ -86,10 +86,12 @@ extern CC_DLL const GLchar * cc3D_Particle_tex_frag;
extern CC_DLL const GLchar * cc3D_Particle_color_frag;
extern CC_DLL const GLchar * cc3D_Skybox_vert;
extern CC_DLL const GLchar * cc3D_Skybox_frag;
// end of shaders group
/// @}
NS_CC_END
/**
end of support group
@}
*/
/// @endcond
#endif /* __CCSHADER_H__ */