Fix method name spelling in AutoPolygon

This commit is contained in:
mogemimi 2015-12-23 19:07:03 +09:00
parent a5525c15ab
commit b0c4adcbd0
4 changed files with 12 additions and 4 deletions

View File

@ -119,11 +119,16 @@ const unsigned int PolygonInfo::getVertCount() const
return (unsigned int)triangles.vertCount;
}
const unsigned int PolygonInfo::getTriaglesCount() const
const unsigned int PolygonInfo::getTrianglesCount() const
{
return (unsigned int)triangles.indexCount/3;
}
const unsigned int PolygonInfo::getTriaglesCount() const
{
return getTrianglesCount();
}
const float PolygonInfo::getArea() const
{
float area = 0;

View File

@ -107,7 +107,10 @@ public:
* get triangles count
* @return number of triangles
*/
const unsigned int getTriaglesCount() const;
const unsigned int getTrianglesCount() const;
/** @deprecated Use method getTrianglesCount() instead */
CC_DEPRECATED_ATTRIBUTE const unsigned int getTriaglesCount() const;
/**
* get sum of all triangle area size

View File

@ -5418,7 +5418,7 @@ bool js_cocos2dx_PolygonInfo_getTriaglesCount(JSContext *cx, uint32_t argc, jsva
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_PolygonInfo_getTriaglesCount : Invalid Native Object");
if (argc == 0)
{
const unsigned int ret = cobj->getTriaglesCount();
const unsigned int ret = cobj->getTrianglesCount();
jsval jsret = JSVAL_NULL;
jsret = uint32_to_jsval(cx, ret);
args.rval().set(jsret);

View File

@ -593,7 +593,7 @@ void SpritePolygonPerformanceTestDynamic::initIncrementStats()
{
_pinfo = AutoPolygon::generatePolygon(s_pathGrossini);
_incVert = _pinfo.getVertCount();
_incTri = _pinfo.getTriaglesCount();
_incTri = _pinfo.getTrianglesCount();
_incPix = _pinfo.getArea();
}