using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.Geometry;
using Autodesk.AutoCAD.Runtime;
using System;
using System.Collections.Generic;
using System.Linq;
namespace Autodesk.AutoCAD.EditorInput
{
public static class ExtensionMethods
{
public static Matrix3d EyeToWorld(this ViewTableRecord view)
{
if (view == null)
throw new ArgumentNullException("view");
return
Matrix3d.Rotation(-view.ViewTwist, view.ViewDirection, view.Target) *
Matrix3d.Displacement(view.Target - Point3d.Origin) *
Matrix3d.PlaneToWorld(view.ViewDirection);
}
public static Matrix3d WorldToEye(this ViewTableRecord view)
{
return view.EyeToWorld().Inverse();
}
public static void Zoom(this Editor ed, Extents3d ext)
{
if (ed == null)
CAD net Zoom功能
最新推荐文章于 2024-04-25 01:32:37 发布
本文介绍了一组针对AutoCAD视图操作的扩展方法,包括视图转换矩阵的计算、视图缩放和平移等功能,这些方法可以方便地实现对AutoCAD图形窗口的定制化操作。

最低0.47元/天 解锁文章
2085

被折叠的 条评论
为什么被折叠?



