class HmHasteMoldura extends HmAncestralObject3d {
	constructor (_moldura, _numHaste, _altura, _largura, _profundidade, _x, _y, _z) {
		super({
			moldura: _moldura, numHaste: _numHaste, altura: _altura, 
			largura: _largura, profundidade: _profundidade, x: _x, y: _y, z: _z});
	}
		
	preparar() {
		super.preparar();
		this.meiaAltura = this.altura / 2;
		this.meiaLargura = this.largura / 2;
		this.meiaProfundidade = this.profundidade / 2;
		/*
		this.object3d.acaoInterceptacao() {
			_moldura.quadro.pintura.novaTextura(_numHaste);
		};
		*/
	}

	criarGeometria() {
		return new THREE.BoxGeometry(this.altura, this.largura, this.profundidade);
	}

	criarMaterial() {
		return new THREE.MeshPhongMaterial({color: this.moldura.cor});
	}

	criarMalha() {
		super.criarMalha();
		if (this.malha) {
			this.malha.castShadow = true;
			this.object3d.position.set(this.x,this.y,this.z);
			this.criarTextoHaste();
		}
	}

	criarTextoHaste() {
		this.textoHaste = this.criarObjeto(new HmTextoGlobal(
			this,this.numHaste.toString(),
			__global.fontes.helvetiker,0.2,0.05,"normal"));
		//this.object3d.add(this.textoHaste.object3d);
		this.textoHaste.object3d.position.z = this.meiaProfundidade + 0.1;
		//this.textoMuseu.object3d.position.set(-50, 10, 320);
		this.textoHaste.object3d.acaoInterceptacao = function(){};
	}
}