首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

构造函数 Vector2(const Real afCoordinate[二]) 和 Vector2(Real* const r)

2012-12-27 
构造函数 Vector2(const Real afCoordinate[2]) 和 Vector2(Real* const r)C/C++ codeclass _OgreExport V

构造函数 Vector2(const Real afCoordinate[2]) 和 Vector2(Real* const r)

C/C++ code
    class _OgreExport Vector2    {    public:        Real x, y;    public:        inline explicit Vector2( const Real afCoordinate[2] )            : x( afCoordinate[0] ),            y( afCoordinate[1] )        {        }        inline explicit Vector2( Real* const r )            : x( r[0] ), y( r[1] )        {        }    };


这是 ORGE 中的一段源码,为什么要后面那个构造函数,好像前面那个构造函数已经能够实现后面构造函数的所有功能了

热点排行