|
AnyCAD Rapid API 2026
Help you to create a better world!
|
视图上下文,用于保存渲染视图的状态. 更多...
Public 成员函数 | |
| ViewContext (global::System.IntPtr cPtr, bool cMemoryOwn) | |
| 仅供内部使用 | |
| void | Dispose () |
| ViewContext (Viewer viewer) | |
| SceneManager | GetSceneManager () |
| Document | GetDocument () |
| void | SetDocument (Document val) |
| EnumUpdateFlags | GetUpdateTicket () |
| void | SetUpdateTicket (EnumUpdateFlags val) |
| Vector3 | GetOrbitPivot () |
| bool | GetFixedOrbitPivot () |
| void | SetFixedOrbitPivot (bool val) |
| Vector3 | GetOrbitAxis () |
| void | SetOrbitAxis (Vector3 val) |
| EnumMouseButton | GetPanButton () |
| void | SetPanButton (EnumMouseButton val) |
| EnumMouseButton | GetOrbitButton () |
| void | SetOrbitButton (EnumMouseButton val) |
| EnumMouseButton | GetPickButton () |
| void | SetPickButton (EnumMouseButton val) |
| EnumKeyModifier | GetPanKeyModifier () |
| void | SetPanKeyModifier (EnumKeyModifier val) |
| EnumKeyModifier | GetOrbitKeyModifier () |
| void | SetOrbitKeyModifier (EnumKeyModifier val) |
| EnumKeyModifier | GetPickKeyModifier () |
| void | SetPickKeyModifier (EnumKeyModifier val) |
| EnumKeyModifier | GetMultiPickModifier () |
| void | SetMultiPickModifier (EnumKeyModifier val) |
| bool | GetRectPick () |
| void | SetRectPick (bool val) |
| bool | GetLassoPick () |
| void | SetLassoPick (bool val) |
| bool | GetFreeOrbit () |
| void | SetFreeOrbit (bool val) |
| bool | GetZoomByWheel () |
| void | SetZoomByWheel (bool val) |
| bool | GetSnapGrid () |
| void | SetSnapGrid (bool val) |
| Vector3 | GetWorldUp () |
| void | SetWorldUp (Vector3 val) |
| bool | GetZoomByDoubleClick () |
| void | SetZoomByDoubleClick (bool val) |
| bool | GetSenseUnpickableObject () |
| void | SetSenseUnpickableObject (bool val) |
| bool | GetEditByDoubleClick () |
| void | SetEditByDoubleClick (bool val) |
| ObjectId | GetViewId () |
| void | SetViewId (ObjectId val) |
| bool | GetUseWidgetCursor () |
| void | SetUseWidgetCursor (bool val) |
| bool | IsSame (ViewContext ctx) |
| 判断是否相等 | |
| void | Destroy () |
| 释放所有资源。内部调用 | |
| Scene | GetScene () |
| 获取场景 | |
| Scene | GetTempScene () |
| 获取管理临时对象的场景 | |
| Scene | GetScene2D () |
| 获取2D场景 | |
| SelectionManager | GetSelectionManager () |
| 获取选择管理器 | |
| Camera | GetCamera () |
| 获取相机 | |
| void | SetOrbitPivot (Vector3 center) |
| 设置旋转中心 | |
| void | SetUserOrbitPivot (Vector3 center) |
| 设置用户指定的固定旋转中心. | |
| void | ResetOrbitPivot () |
| 重置以场景中心作为旋转中心。 | |
| void | ClearPickFilters () |
| 清空选择过滤器 | |
| void | ResetPickFilters () |
| 重置选择过滤器 | |
| void | AddPickFilter (EnumShapeFilter filter) |
| 添加选择过滤条件 | |
| void | ClearPickFilter (EnumShapeFilter filter) |
| 清除指定的选择过滤条件 | |
| void | SetPickFilter (EnumShapeFilter filter) |
| 设置选择过滤条件 | |
| EnumShapeFilter | GetPickFilter () |
| 获取选择过滤条件 | |
| void | ResetDisplayFilters () |
| 重置显示过滤条件 | |
| void | SetDisplayFilter (EnumShapeFilter filter) |
| 设置显示过滤条件 | |
| EnumShapeFilter | GetDisplayFilter () |
| void | AddDisplayFilter (EnumShapeFilter filter) |
| 添加显示过滤条件 | |
| void | ClearDisplayFilter (EnumShapeFilter filter) |
| 清除指定的过滤条件 | |
| void | ClearAll () |
| 清空所有的场景 | |
| void | ClearSelection (bool notify) |
| 清空选择集 | |
| void | ClearSelection () |
| 清空选择集 | |
| void | ClearTemp () |
| 清空临时场景 | |
| void | SetDisplayMode (EnumDisplayMode mode) |
| 设置显示模式 | |
| EnumDisplayMode | GetDisplayMode () |
| 获取显示模式 | |
| void | SetDefaultMaterial (EnumShapeFilter type, MaterialInstance material) |
| 设置指定几何元素类型的默认状态材质 | |
| MaterialInstance | GetDefaultMaterial (EnumShapeFilter type) |
| 获取指定几何元素类型的默认状态材质 | |
| void | SetPreviewMaterial (EnumShapeFilter type, MaterialInstance material) |
| 设置指定几何元素类型的预览状态材质 | |
| MaterialInstance | GetPreviewMaterial (EnumShapeFilter type) |
| 获取指定几何元素类型的预览状态材质 | |
| TempViewContext | GetTempContext () |
| 获取临时的视图上下文 | |
| SnapEngine | GetSnapEngine () |
| 获取捕捉引擎 | |
| Vector2 | GetCursorPosition () |
| 获取目前光标的位置 | |
| void | SetCursorPosition (Vector2 position) |
| 设置光标位置 | |
| CursorWidget | GetCursorWidget () |
| 获取鼠标光标组件 | |
| void | UseEngineCursor (bool enabled) |
| 是否启用引擎自绘制光标 | |
| void | Resize (uint width, uint height) |
| 设置视图大小 | |
| void | RequestUpdate (EnumUpdateFlags flag) |
| 请求更新场景 | |
| void | ZoomToExtend (float ratio) |
| 缩放视图适应窗口 | |
| void | ZoomToExtend () |
| 缩放视图适应窗口 | |
| void | ZoomToBox (AABox bbox, float ratio) |
| 缩放到指定的包围盒 | |
| void | ZoomToBox (AABox bbox) |
| 缩放到指定的包围盒 | |
| void | ZoomToSelection (float ratio) |
| 缩放到选择对象。 | |
| void | ZoomToSelection () |
| 缩放到选择对象。 | |
| void | Zoom (int x, int y, int delta) |
| 在指定的位置缩放视图,一般是鼠标的位置。 | |
| void | Pan (int offsetX, int offsetY) |
| 平移视图 | |
| void | Orbit (int offsetX, int offsetY, bool fixedAxis) |
| 旋转视图 | |
| void | Orbit (int offsetX, int offsetY) |
| 旋转视图 | |
| void | UpdateWorld () |
| 更新场景的包围盒。内部调用 | |
| Vector3d | ScreenPointToWorldPoint (uint x, uint y, float z) |
| 屏幕坐标转换成三维世界坐标 | |
| Vector3d | WorldPointToSceenPoint (Vector3 pt) |
| 三维世界坐标转换成二维的屏幕坐标 | |
| Ray | WindowPointToRay (uint x, uint y) |
| 窗口的坐标转换成射线。 | |
| PickedItem | SnapPoint (int x, int y) |
| 捕捉三维的位置 | |
| PickedItem | Select (int x, int y) |
| 选择单个对象 | |
| PickedItem | Highlight (int x, int y) |
| 高亮单个对象 | |
| GAx2 | GetWorkingPlane () |
| 获取当前工作平面坐标系 | |
| void | PushCursor (string cursorId) |
| 设置光标 | |
| void | PopCursor () |
| 与Push对应 | |
| void | SetCursor (string cursorId) |
| 设置光标 | |
视图上下文,用于保存渲染视图的状态.
Group: Rendering
| void AnyCAD.Foundation.ViewContext.AddDisplayFilter | ( | EnumShapeFilter | filter | ) |
添加显示过滤条件
| filter | 形状过滤条件枚举值 |
| void AnyCAD.Foundation.ViewContext.AddPickFilter | ( | EnumShapeFilter | filter | ) |
添加选择过滤条件
| filter | fiter |
| void AnyCAD.Foundation.ViewContext.ClearDisplayFilter | ( | EnumShapeFilter | filter | ) |
清除指定的过滤条件
| filter | 形状过滤条件枚举值 |
| void AnyCAD.Foundation.ViewContext.ClearPickFilter | ( | EnumShapeFilter | filter | ) |
清除指定的选择过滤条件
| filter | filter |
| Camera AnyCAD.Foundation.ViewContext.GetCamera | ( | ) |
获取相机
| Vector2 AnyCAD.Foundation.ViewContext.GetCursorPosition | ( | ) |
获取目前光标的位置
| CursorWidget AnyCAD.Foundation.ViewContext.GetCursorWidget | ( | ) |
获取鼠标光标组件
| MaterialInstance AnyCAD.Foundation.ViewContext.GetDefaultMaterial | ( | EnumShapeFilter | type | ) |
获取指定几何元素类型的默认状态材质
| type | 类型 |
| EnumDisplayMode AnyCAD.Foundation.ViewContext.GetDisplayMode | ( | ) |
获取显示模式
| EnumShapeFilter AnyCAD.Foundation.ViewContext.GetPickFilter | ( | ) |
获取选择过滤条件
| MaterialInstance AnyCAD.Foundation.ViewContext.GetPreviewMaterial | ( | EnumShapeFilter | type | ) |
获取指定几何元素类型的预览状态材质
| type | 类型 |
| Scene AnyCAD.Foundation.ViewContext.GetScene | ( | ) |
获取场景
| Scene AnyCAD.Foundation.ViewContext.GetScene2D | ( | ) |
获取2D场景
| SelectionManager AnyCAD.Foundation.ViewContext.GetSelectionManager | ( | ) |
获取选择管理器
| SnapEngine AnyCAD.Foundation.ViewContext.GetSnapEngine | ( | ) |
获取捕捉引擎
| TempViewContext AnyCAD.Foundation.ViewContext.GetTempContext | ( | ) |
获取临时的视图上下文
| Scene AnyCAD.Foundation.ViewContext.GetTempScene | ( | ) |
获取管理临时对象的场景
| GAx2 AnyCAD.Foundation.ViewContext.GetWorkingPlane | ( | ) |
获取当前工作平面坐标系
| PickedItem AnyCAD.Foundation.ViewContext.Highlight | ( | int | x, |
| int | y ) |
高亮单个对象
| x | 窗口坐标 |
| y | 窗口坐标 |
| void AnyCAD.Foundation.ViewContext.Orbit | ( | int | offsetX, |
| int | offsetY ) |
旋转视图
| offsetX | X方向 |
| offsetY | Y方向 |
| void AnyCAD.Foundation.ViewContext.Orbit | ( | int | offsetX, |
| int | offsetY, | ||
| bool | fixedAxis ) |
旋转视图
| offsetX | X方向 |
| offsetY | Y方向 |
| fixedAxis | 是否固定轴 |
| void AnyCAD.Foundation.ViewContext.Pan | ( | int | offsetX, |
| int | offsetY ) |
平移视图
| offsetX | X方向偏移位置 |
| offsetY | Y方向偏移位置 |
| void AnyCAD.Foundation.ViewContext.PushCursor | ( | string | cursorId | ) |
设置光标
| cursorId | 光标ID |
| void AnyCAD.Foundation.ViewContext.RequestUpdate | ( | EnumUpdateFlags | flag | ) |
请求更新场景
| flag | 状态 |
| void AnyCAD.Foundation.ViewContext.Resize | ( | uint | width, |
| uint | height ) |
设置视图大小
| width | |
| height |
| Vector3d AnyCAD.Foundation.ViewContext.ScreenPointToWorldPoint | ( | uint | x, |
| uint | y, | ||
| float | z ) |
屏幕坐标转换成三维世界坐标
| x | 鼠标的x坐标,相对窗口 |
| y | 鼠标的y坐标,相对窗口 |
| z | 深度。取值范围[0, 1] |
| PickedItem AnyCAD.Foundation.ViewContext.Select | ( | int | x, |
| int | y ) |
选择单个对象
| x | 窗口坐标 |
| y | 窗口坐标 |
| void AnyCAD.Foundation.ViewContext.SetCursor | ( | string | cursorId | ) |
设置光标
| cursorId | 光标ID |
| void AnyCAD.Foundation.ViewContext.SetCursorPosition | ( | Vector2 | position | ) |
设置光标位置
| position | 窗口坐标 |
| void AnyCAD.Foundation.ViewContext.SetDefaultMaterial | ( | EnumShapeFilter | type, |
| MaterialInstance | material ) |
设置指定几何元素类型的默认状态材质
| type | 类型 |
| material | 材质 |
| void AnyCAD.Foundation.ViewContext.SetDisplayFilter | ( | EnumShapeFilter | filter | ) |
设置显示过滤条件
| filter | 形状过滤条件枚举值 |
| void AnyCAD.Foundation.ViewContext.SetDisplayMode | ( | EnumDisplayMode | mode | ) |
设置显示模式
| mode | 显示模式枚举值 |
| void AnyCAD.Foundation.ViewContext.SetOrbitPivot | ( | Vector3 | center | ) |
设置旋转中心
| center | 旋转中心坐标. |
| void AnyCAD.Foundation.ViewContext.SetPickFilter | ( | EnumShapeFilter | filter | ) |
设置选择过滤条件
| filter | 可以是多个组合 |
| void AnyCAD.Foundation.ViewContext.SetPreviewMaterial | ( | EnumShapeFilter | type, |
| MaterialInstance | material ) |
设置指定几何元素类型的预览状态材质
| type | 类型 |
| material | 材质 |
| void AnyCAD.Foundation.ViewContext.SetUserOrbitPivot | ( | Vector3 | center | ) |
设置用户指定的固定旋转中心.
| center | 旋转中心坐标. |
| PickedItem AnyCAD.Foundation.ViewContext.SnapPoint | ( | int | x, |
| int | y ) |
捕捉三维的位置
| x | 鼠标的x坐标,相对窗口 |
| y | 鼠标的y坐标,相对窗口 |
| void AnyCAD.Foundation.ViewContext.UseEngineCursor | ( | bool | enabled | ) |
是否启用引擎自绘制光标
| enabled | true启用 |
| Ray AnyCAD.Foundation.ViewContext.WindowPointToRay | ( | uint | x, |
| uint | y ) |
窗口的坐标转换成射线。
| x | X坐标 |
| y | Y坐标 |
三维世界坐标转换成二维的屏幕坐标
| pt | 世界坐标 |
| void AnyCAD.Foundation.ViewContext.Zoom | ( | int | x, |
| int | y, | ||
| int | delta ) |
在指定的位置缩放视图,一般是鼠标的位置。
| x | 相对窗口的X坐标 |
| y | 相对窗口的Y坐标。 |
| delta | 缩放步进。 |
| void AnyCAD.Foundation.ViewContext.ZoomToBox | ( | AABox | bbox | ) |
缩放到指定的包围盒
| bbox | 包围盒 |
| void AnyCAD.Foundation.ViewContext.ZoomToBox | ( | AABox | bbox, |
| float | ratio ) |
缩放到指定的包围盒
| bbox | 包围盒 |
| ratio | 比例。1.2为默认比例 |
| void AnyCAD.Foundation.ViewContext.ZoomToSelection | ( | float | ratio | ) |
缩放到选择对象。
| ratio | 缩放比例 |