예제 #1
0
void Client::pulisciTavolo(QString)
{
	labelG1->setPixmap(QPixmap(":/icons/null.png"));
	labelG2->setPixmap(QPixmap(":/icons/null.png"));
	setNormale(lineEditPuntiG1);
	setNormale(lineEditPuntiG2);
}
예제 #2
0
void Quadrilateral::create(Vector3 origin, float length, float width,Vector3 orientation)
{
	Vector3 V0, V1, V2, V3;
	if(orientation.x() == -1 || orientation.x() == 1){
       		 V0 = Vector3(origin.x(),origin.y()-(length/2),origin.z()-(width/2));
		 V1 = Vector3(origin.x(),origin.y()+(length/2),origin.z()-(width/2));
		 V2 = Vector3(origin.x(),origin.y()+(length/2),origin.z()+(width/2));
		 V3 = Vector3(origin.x(),origin.y()-(length/2),origin.z()+(width/2));
		 setVertex(V0);
		 setVertex(V1);
		 setVertex(V2);
		 setVertex(V3);
		 setNormale(Vector3(orientation.x(),0,0));
	}
        else {
		if(orientation.y() == -1 || orientation.y() == 1){
	       		 V0 = Vector3(origin.x()-(length/2),origin.y(),origin.z()-(width/2));
			 V1 = Vector3(origin.x()+(length/2),origin.y(),origin.z()-(width/2));
			 V2 = Vector3(origin.x()+(length/2),origin.y(),origin.z()+(width/2));
			 V3 = Vector3(origin.x()-(length/2),origin.y(),origin.z()+(width/2));
			 setVertex(V0);
		 	 setVertex(V1);
		  	 setVertex(V2);
		 	 setVertex(V3);
			 setNormale(Vector3(0,orientation.y(),0));
		}
		else {
			if(orientation.z() == -1 || orientation.z() == 1){
       		 		V0 = Vector3(origin.x()-(length/2),origin.y()-(width/2),origin.z());
		 		V1 = Vector3(origin.x()+(length/2),origin.y()-(width/2),origin.z());
		 		V2 = Vector3(origin.x()+(length/2),origin.y()+(width/2),origin.z());
		 		V3 = Vector3(origin.x()-(length/2),origin.y()+(width/2),origin.z());
		 		setVertex(V0);
		 		setVertex(V1);
		  		setVertex(V2);
		 		setVertex(V3);
		 		setNormale(Vector3(0,0,orientation.z()));
			}
		}
	}
}
예제 #3
0
Quadrilateral::Quadrilateral(const Quadrilateral& F):Face(F)
{
	assert(F.vertexs.size()==4);
	setVertexs(F.vertexs);
	setNormale(F.N);
}