var Point3Dc = function (a,b,c) { var that= {}; that.x = a; that.y = b; that.z =c; that.getX3D = function () { return that.x; } that.getY3D = function () { return that.y; } that.getZ3D = function () { return that.z; } return that; };