mirror of https://github.com/axmolengine/axmol.git
Fix method name spelling in AutoPolygon
This commit is contained in:
parent
a5525c15ab
commit
b0c4adcbd0
|
@ -119,11 +119,16 @@ const unsigned int PolygonInfo::getVertCount() const
|
||||||
return (unsigned int)triangles.vertCount;
|
return (unsigned int)triangles.vertCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
const unsigned int PolygonInfo::getTriaglesCount() const
|
const unsigned int PolygonInfo::getTrianglesCount() const
|
||||||
{
|
{
|
||||||
return (unsigned int)triangles.indexCount/3;
|
return (unsigned int)triangles.indexCount/3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const unsigned int PolygonInfo::getTriaglesCount() const
|
||||||
|
{
|
||||||
|
return getTrianglesCount();
|
||||||
|
}
|
||||||
|
|
||||||
const float PolygonInfo::getArea() const
|
const float PolygonInfo::getArea() const
|
||||||
{
|
{
|
||||||
float area = 0;
|
float area = 0;
|
||||||
|
|
|
@ -107,7 +107,10 @@ public:
|
||||||
* get triangles count
|
* get triangles count
|
||||||
* @return number of triangles
|
* @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
|
* get sum of all triangle area size
|
||||||
|
|
|
@ -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");
|
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_PolygonInfo_getTriaglesCount : Invalid Native Object");
|
||||||
if (argc == 0)
|
if (argc == 0)
|
||||||
{
|
{
|
||||||
const unsigned int ret = cobj->getTriaglesCount();
|
const unsigned int ret = cobj->getTrianglesCount();
|
||||||
jsval jsret = JSVAL_NULL;
|
jsval jsret = JSVAL_NULL;
|
||||||
jsret = uint32_to_jsval(cx, ret);
|
jsret = uint32_to_jsval(cx, ret);
|
||||||
args.rval().set(jsret);
|
args.rval().set(jsret);
|
||||||
|
|
|
@ -593,7 +593,7 @@ void SpritePolygonPerformanceTestDynamic::initIncrementStats()
|
||||||
{
|
{
|
||||||
_pinfo = AutoPolygon::generatePolygon(s_pathGrossini);
|
_pinfo = AutoPolygon::generatePolygon(s_pathGrossini);
|
||||||
_incVert = _pinfo.getVertCount();
|
_incVert = _pinfo.getVertCount();
|
||||||
_incTri = _pinfo.getTriaglesCount();
|
_incTri = _pinfo.getTrianglesCount();
|
||||||
_incPix = _pinfo.getArea();
|
_incPix = _pinfo.getArea();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue