let id_counter = 0;

export class AbstractLight {

    id = id_counter++;


    toString() {
        return `Light#${this.id}`;
    }

    /**
     *
     * @param {function} f
     * @param {*} [thisArg]
     * @returns {void}
     */
    onDimensionChanged(f, thisArg) {
        throw new Error('Not Implemented');
    }

    /**
     *
     * @param {function} f
     * @param {*} [thisArg]
     * @returns {void}
     */
    offDimensionChanged(f, thisArg) {
        throw new Error('Not Implemented');
    }

    /**
     *
     * @param {number[]} result
     * @returns {void}
     */
    getCenter(result) {
        throw new Error('Not Implemented');
    }

    /**
     *
     * @param {number[]|ArrayLike<number>|Float32Array} result
     * @returns {void}
     */
    getAABB(result) {
        throw new Error('Not Implemented');
    }

    /**
     *
     * @param {number[]|Float32Array|Float64Array} destination
     * @param {number} address
     * @returns {number} number of records written, measured in destination array slots
     */
    toArray(destination, address) {
        throw new Error('Not Implemented');
    }

    /**
     *
     * @param {AbstractLight} other
     * @returns {number}
     */
    compare(other) {
        return this.id - other.id;
    }
}

AbstractLight.prototype.type = 'Abstract';
