summaryrefslogtreecommitdiffstats
path: root/tksao/frame/frame3dbase.C
diff options
context:
space:
mode:
Diffstat (limited to 'tksao/frame/frame3dbase.C')
-rw-r--r--tksao/frame/frame3dbase.C11
1 files changed, 5 insertions, 6 deletions
diff --git a/tksao/frame/frame3dbase.C b/tksao/frame/frame3dbase.C
index b977ecd..889918a 100644
--- a/tksao/frame/frame3dbase.C
+++ b/tksao/frame/frame3dbase.C
@@ -36,9 +36,6 @@ Frame3dBase::Frame3dBase(Tcl_Interp* i, Tk_Canvas c, Tk_Item* item)
highliteColorName_ = dupstr("cyan");
cropsl_ =0;
-
- imageToData3d = Translate3d(-.5, -.5, -.5);
- dataToImage3d = Translate3d( .5, .5, .5);
}
Frame3dBase::~Frame3dBase()
@@ -533,7 +530,7 @@ void Frame3dBase::centerImage()
// always center to center of pixel, even for even sized image
Vector3d bb = (aa*Translate3d(.5,.5,.5)).floor();
// vp_ is in REF coords
- vp_ = bb*imageToData3d;
+ vp_ = bb*Translate3d(-.5, -.5, -.5);
}
else
vp_ = Vector();
@@ -551,7 +548,8 @@ Vector3d Frame3dBase::imageCenter3d(FrScale::SecMode mode)
// Note: imageCenter() is in IMAGE coords
return Vector3d((pp->xmax - pp->xmin)/2.+pp->xmin,
(pp->ymax - pp->ymin)/2.+pp->ymin,
- (zz->zmax - zz->zmin)/2.+zz->zmin) * dataToImage3d;
+ (zz->zmax - zz->zmin)/2.+zz->zmin) *
+ Translate3d( .5, .5, .5);
}
Vector3d Frame3dBase::imageSize3d(FrScale::SecMode mode )
@@ -905,7 +903,8 @@ void Frame3dBase::updateMagnifierMatrices()
void Frame3dBase::updatePannerMatrices()
{
- Vector3d center = imageCenter3d(FrScale::IMGSEC) * imageToData3d;
+ // imageToData3d
+ Vector3d center = imageCenter3d(FrScale::IMGSEC) * Translate3d(-.5, -.5, -.5);
// refToUser3d
Matrix3d refToUser3d =