// Translate WCS coordinates to DCS
Matrix3d matWCS2DCS;
matWCS2DCS = Matrix3d.PlaneToWorld(acView.ViewDirection);
matWCS2DCS = Matrix3d.Displacement(acView.Target - Point3d.Origin) * matWCS2DCS;
matWCS2DCS = Matrix3d.Rotation(-acView.ViewTwist,
acView.ViewDirection,
acView.Target) * matWCS2DCS;
// If a center point is specified, define the min and max
// point of the extents
// for Center and Scale modes
if (pCenter.DistanceTo(Point3d.Origin) != 0)
{
pMin = new Point3d(pCenter.X - (acView.Width / 2),
pCenter.Y - (acView.Height / 2), 0);
pMax = new Point3d((acView.Width / 2) + pCenter.X,
(acView.Height / 2) + pCenter.Y, 0);
}
//......
// Tranform the extents of the view
matWCS2DCS = matWCS2DCS.Inverse();
eExtents.TransformBy(matWCS2DCS);