A couple of wee transform featurettes;
- center of rotation for camera in cameraview rotate has to remain the camera center itself, drawing the dashed helpline then doesn't work, since it's behind the camera clipplane. Just disabled that line. - made MMB switch for cameraview grab to become quadratic, for a dolly this feels OK, and makes it possible to move in small and large scenes. - restored SHIFT modifier for translation and scaling. This based on old convention that allowed precision editing on top of the transform you already applied before pressing SHIFT. Solved it with a new flag (T_SHIFT_MOD), since the G.qual cannot be used. Transform() innerloop has to detect the SHIFT event itself. Also coded it with storing the mouseposition while SHIFT event happened. Hope Martin can approve! :) - Martin's last commit made Manipulator Translate not work, it passed on a zero translation to the constrainter, causing NaN's. Nicely catched the exception. - Fixed 'Trackball' to accept number input too
This commit is contained in:
@@ -244,6 +244,7 @@ static void draw_icon_centered(float *pos, unsigned int *rect, int rectsize)
|
||||
glDrawPixels(rectsize, rectsize, GL_RGBA, GL_UNSIGNED_BYTE, rect);
|
||||
}
|
||||
|
||||
/* bad frontbuffer call... because it is used in transform after force_draw() */
|
||||
void helpline(float *vec)
|
||||
{
|
||||
float vecrot[3], cent[2];
|
||||
@@ -255,23 +256,24 @@ void helpline(float *vec)
|
||||
|
||||
getmouseco_areawin(mval);
|
||||
project_float(vecrot, cent); // no overflow in extreme cases
|
||||
if(cent[0]!=3200.0f) {
|
||||
persp(PERSP_WIN);
|
||||
|
||||
glDrawBuffer(GL_FRONT);
|
||||
|
||||
BIF_ThemeColor(TH_WIRE);
|
||||
|
||||
persp(PERSP_WIN);
|
||||
|
||||
glDrawBuffer(GL_FRONT);
|
||||
|
||||
BIF_ThemeColor(TH_WIRE);
|
||||
|
||||
setlinestyle(3);
|
||||
glBegin(GL_LINE_STRIP);
|
||||
glVertex2sv(mval);
|
||||
glVertex2fv(cent);
|
||||
glEnd();
|
||||
setlinestyle(0);
|
||||
|
||||
persp(PERSP_VIEW);
|
||||
glFlush(); // flush display for frontbuffer
|
||||
glDrawBuffer(GL_BACK);
|
||||
setlinestyle(3);
|
||||
glBegin(GL_LINE_STRIP);
|
||||
glVertex2sv(mval);
|
||||
glVertex2fv(cent);
|
||||
glEnd();
|
||||
setlinestyle(0);
|
||||
|
||||
persp(PERSP_VIEW);
|
||||
glFlush(); // flush display for frontbuffer
|
||||
glDrawBuffer(GL_BACK);
|
||||
}
|
||||
}
|
||||
|
||||
void drawaxes(float size)
|
||||
|
||||
Reference in New Issue
Block a user