/**
 * Copyright (c) 2018 Bitbloq (BQ)
 *
 * License: MIT
 *
 * long description for the file
 *
 * @summary short description for the file
 * @author David García <https://github.com/empoalp>, Alberto Valero <https://github.com/avalero>
 *
 * Created at     : 2018-10-16 12:59:08
 * Last modified  : 2018-11-16 17:37:42
 */
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    }
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
import ObjectsCommon from './ObjectsCommon';
import Object3D from './Object3D';
import isEqual from 'lodash.isequal';
import * as THREE from 'three';
var STLObject = /** @class */ (function (_super) {
    __extends(STLObject, _super);
    function STLObject(parameters, operations, viewOptions, scene) {
        if (operations === void 0) { operations = []; }
        if (viewOptions === void 0) { viewOptions = ObjectsCommon.createViewOptions(); }
        var _this = _super.call(this, viewOptions, operations, scene) || this;
        _this.parameters = __assign({}, parameters);
        _this._meshUpdateRequired = true;
        return _this;
    }
    STLObject.prototype.setParameters = function (parameters) {
        if (!isEqual(parameters, this.parameters)) {
            this.parameters = __assign({}, parameters);
            this._meshUpdateRequired = true;
        }
    };
    STLObject.prototype.getBufferGeometry = function () {
        return new THREE.BufferGeometry().fromGeometry(this.getGeometry());
    };
    STLObject.prototype.getGeometry = function () {
        var geometry = this.parameters.geometry;
        return geometry;
    };
    STLObject.typeName = 'STLObject';
    return STLObject;
}(Object3D));
export default STLObject;
//# sourceMappingURL=STLObject.js.map