class HmParede extends HmAncestralObject3d {
	constructor (_paredes,_numParede,_textura,_angulo,_eixo,_largura,_altura,_profundidade,_x,_y,_z) {
		super({
			paredes: _paredes,
			numParede: _numParede,
			textura: _textura,
			angulo: _angulo,
			eixo: _eixo,
			largura: _largura,
			altura: _altura,
			profundidade: _profundidade,
			x: _x,
			y: _y,
			z: _z
		});
	}
	
	preparar() {
		super.preparar();
		this.cfg = this.paredes.cfg[this.numParede];
		this.gui = criarPastaObjeto3d(this, this.paredes.gui,
				"parede " + this.cfg.parede +
				" sala " + this.paredes.sala.cfg.sala);
		this.cor = this.cfg.cor;
		this.meiaLargura = this.largura / 2;
		this.meiaAltura = this.altura / 2;
		this.meiaProfundidade = this.profundidade / 2;
	}

	criar() {
		//this.criarTexturaParede();
		this.criarParede();
		this.criarTexto();
		this.criarQuadros();	
	}
/*
	criarTexturaParede() {
		var _ml = this.medidaLajota;
		this.textura = new THREE.TextureLoader().load(this.cfg.nome_arquivo);
		//this.textura = THREE.ImageUtils.loadTexture(this.cfg.nome_arquivo);
		this.textura.wrapS = this.textura.wrapT = THREE.RepeatWrapping;
		this.textura.repeat.set(this.sala.largura / _ml, this.sala.profundidade / _ml);
	}
*/
	criarParede() {
		var geo = new THREE.BoxGeometry(this.largura,this.altura,this.profundidade);
		var mat = (_obj3D.usarCanvasRenderer) ?
			new THREE.MeshBasicMaterial({color: this.cor,	map: this.textura}) :
			new THREE.MeshPhongMaterial({color: this.cor, opacity: 1, transparent: false, map: this.textura});
		this.malha = this.criarObjetoMesh(new THREE.Mesh(geo,mat));
		this.object3d.position.set(this.x, this.y, this.z);
		this.object3d.rotation.y = this.angulo;
	}

	criarTexto() {
	}

	criarQuadros() {
		this.quadros = this.criarObjeto(HmQuadros);
	}
}