|
@@ -157,14 +157,18 @@ QtOutputView::setColor(size_t ix,size_t iz){
|
|
|
|
|
|
void
|
|
|
QtOutputView::drawVector(size_t ix,size_t iz,double u,double v){
|
|
|
+ double h=height();
|
|
|
+ double w=width();
|
|
|
+
|
|
|
double x1=ix*dX;
|
|
|
double y1=solver->get_geometry().Z[ix][iz];
|
|
|
double x2=x1+u;
|
|
|
double y2=y1+v;
|
|
|
- double x3=x2+(-0.866*u+0.5*v)*scale_arrow_head*lX;
|
|
|
- double y3=y2+(-0.5*u-0.866*v)*scale_arrow_head*factor;
|
|
|
- double x4=x2+(-0.866*u-0.5*v)*scale_arrow_head*lX;
|
|
|
- double y4=y2+(0.5*u-0.866*v)*scale_arrow_head*factor;
|
|
|
+ double x3=x2+(-0.866*u/lX*w+0.5*v/factor*h)*scale_arrow_head*lX/w;
|
|
|
+ double y3=y2+(-0.5*u/lX*w-0.866*v/factor*h)*scale_arrow_head*factor/h;
|
|
|
+
|
|
|
+ double x4=x2+(-0.866*u/lX*w-0.5*v/factor*h)*scale_arrow_head*lX/w;
|
|
|
+ double y4=y2+(0.5*u/lX*w-0.866*v/factor*h)*scale_arrow_head*factor/h;
|
|
|
|
|
|
glColor3f(1,1,0);
|
|
|
glBegin(GL_LINE_STRIP);
|