|
AnyCAD Rapid API 2023
Help you to create a better world!
|
Public 成员函数 | |
| long | GetUuid () |
| long | GetWidth () |
| long | GetHeight () |
| float | GetZoomFactor () |
| void | SetZoomFactor (float val) |
| float | GetFPS () |
| void | SetFPS (float val) |
| boolean | GetViewMode2D () |
| void | SetViewMode2D (boolean val) |
| CameraDriver | GetCameraDriver () |
| void | SetCameraDriver (CameraDriver val) |
| void | Destroy () |
| void | Clear () |
| void | SetDocument (Document doc) |
| Document | GetDocument () |
| void | SetViewId (ObjectId viewId) |
| ObjectId | GetViewId () |
| void | PushEditMode (String name, Editor editor) |
| boolean | PopEditMode () |
| void | PushEditor (Editor editor, boolean bClearOld) |
| Editor | GetEditor () |
| void | ClearEditor () |
| float | GetTimeTicks () |
| void | OnTime (float timeTick) |
| void | Run (GuiRenderer gui) |
| boolean | ProcessEvent (GuiRenderer gui) |
| int | Redraw (float timeTick, boolean force) |
| int | Redraw (float timeTick) |
| void | RequestUpdate (EnumUpdateFlags flag) |
| ViewContext | GetContext () |
| void | ZoomToExtend (float ratio) |
| void | ZoomToExtend () |
| void | ZoomToBox (AABox bbox, float ratio) |
| ScreenShot | CreateScreenShot () |
| void | SetBackgroundColor (Vector4 clr) |
| void | SetBackground (Background background) |
| Background | GetBackground () |
| void | SetCoordinateGrid (CoordinateGridWidget grid) |
| CoordinateGridWidget | GetCoordinateGrid () |
| void | ShowCoordinateGrid (boolean bShow) |
| void | SetCoordinateWidget (EnumViewCoordinateType type) |
| EnumViewCoordinateType | GetCoordinateWidget () |
| void | SetCoordinateWidgetPosition (short position) |
| void | SetCoordinateWidgetText (String textX, String textY, String textZ) |
| void | SetRulerWidget (EnumRulerWidgetType type) |
| Vector3 | ScreenPointToWorldPoint (long x, long y, float z) |
| Vector3 | WorldPointToSceenPoint (Vector3 pt) |
| Ray | WindowPointToRay (long x, long y) |
| void | SetStandardView (EnumStandardView view, boolean bAnimation) |
| void | SetStandardView (EnumStandardView view) |
| void | LookAt (Vector3 target, Vector3 dir, Vector3 up, boolean bAnimation) |
| void | ReloadSettings () |
| void | OnResized (long width, long height) |
| void | OnDocumentChanged (DocumentEventArgs args) |
| void | OnMouseDown (InputEvent evt) |
| void | OnMouseUp (InputEvent evt) |
| void | OnMouseMove (InputEvent evt) |
| void | OnMultiTouch (MultiTouchEvent evt) |
| void | OnBeginMultiTouch (MultiTouchEvent evt) |
| void | OnEndMultiTouch (MultiTouchEvent evt) |
| void | OnMouseWheel (InputEvent evt, int delta) |
| void | OnKeyDown (InputEvent evt) |
| void | OnKeyUp (InputEvent evt) |
| void | OnInput (ParameterDict parameters) |
| void | ResizeWindow (long width, long height) |
| FloatList | ReadDepthBuffer (long posX, long posY, long width, long height) |
| boolean | WndProc (int hWnd, int msg, java.math.BigInteger wparam, long lparam) |
| void | OnDeviceLost (int hParent) |
静态 Public 成员函数 | |
| static void | SetZoomFacotr (float zoomOut, float zoomIn) |
三维渲染视图
<> 渲染视图的基类
| void Viewer.Clear | ( | ) |
清空场景
| void Viewer.ClearEditor | ( | ) |
清空设置的编辑器。
| ScreenShot Viewer.CreateScreenShot | ( | ) |
创建屏幕截图
| Background Viewer.GetBackground | ( | ) |
获取当前的背景对象
| ViewContext Viewer.GetContext | ( | ) |
获取视图上下文。
| CoordinateGridWidget Viewer.GetCoordinateGrid | ( | ) |
获取轴网组件
| float Viewer.GetTimeTicks | ( | ) |
获取时间间隔
设置相机方向
| target | 目标位置 |
| dir | 方向 |
| up | Z朝向 |
| bAnimation | 是否启用动画方式 |
| void Viewer.OnDocumentChanged | ( | DocumentEventArgs | args | ) |
文档有更新时调用
| args | Document事件参数 |
| void Viewer.OnMouseWheel | ( | InputEvent | evt, |
| int | delta | ||
| ) |
| delta | > 0 scroll up, < 0 scroll down |
| void Viewer.OnResized | ( | long | width, |
| long | height | ||
| ) |
窗口大小变化后调用.
| width | 窗口宽度 |
| height | 窗口高度 |
| void Viewer.OnTime | ( | float | timeTick | ) |
时间事件处理。
| timeTick |
| boolean Viewer.PopEditMode | ( | ) |
EditMode出栈。
| boolean Viewer.ProcessEvent | ( | GuiRenderer | gui | ) |
处理消息。。仅在独立窗口模式下调用
| gui | 界面外挂,可为null。 |
| void Viewer.PushEditMode | ( | String | name, |
| Editor | editor | ||
| ) |
设置编辑模式, editor作为默认的编辑器
| name | 名称 |
| editor | EditMode对象 |
| void Viewer.PushEditor | ( | Editor | editor, |
| boolean | bClearOld | ||
| ) |
设置编辑器
| editor | 编辑器对象 |
| bClearOld | 是否清空之前的编辑器 |
| int Viewer.Redraw | ( | float | timeTick | ) |
绘制画面
| timeTick | 时间间隔 |
| int Viewer.Redraw | ( | float | timeTick, |
| boolean | force | ||
| ) |
绘制画面
| timeTick | 时间间隔 |
| void Viewer.RequestUpdate | ( | EnumUpdateFlags | flag | ) |
请求更新视图
| flag | 更新标记 |
| void Viewer.Run | ( | GuiRenderer | gui | ) |
以模态运行。循环执行,直至程序退出。仅在独立窗口模式下调用
| gui | 界面外挂,可为null。 |
| Vector3 Viewer.ScreenPointToWorldPoint | ( | long | x, |
| long | y, | ||
| float | z | ||
| ) |
屏幕坐标转换成三维世界坐标
| x | 鼠标的x坐标,相对窗口 |
| y | 鼠标的y坐标,相对窗口 |
| z | 深度。取值范围[0, 1] |
| void Viewer.SetBackground | ( | Background | background | ) |
设置背景对象。
| background | 对象 |
| void Viewer.SetBackgroundColor | ( | Vector4 | clr | ) |
设置背景颜色
| clr | 颜色 |
| void Viewer.SetCoordinateGrid | ( | CoordinateGridWidget | grid | ) |
设置工作轴网
| grid | 轴网对象 |
| void Viewer.SetCoordinateWidget | ( | EnumViewCoordinateType | type | ) |
设置坐标系组件样式
| type | 类型 |
| void Viewer.SetCoordinateWidgetPosition | ( | short | position | ) |
设置坐标系组件的位置
| position | 位置序号. [0, 1, 2, 3] |
| void Viewer.SetCoordinateWidgetText | ( | String | textX, |
| String | textY, | ||
| String | textZ | ||
| ) |
设置坐标系三个轴的名称
| textX | X轴名称 |
| textY | Y轴名称 |
| textZ | Z轴名称 |
| void Viewer.SetRulerWidget | ( | EnumRulerWidgetType | type | ) |
设置刻度尺,仅在ViewMode2D开启时有效
| type | 刻度尺类型,支持下述选项: Empty: 无刻度尺 Default: 默认刻度尺样式 |
| void Viewer.SetStandardView | ( | EnumStandardView | view | ) |
设置相机方向。
| view | 标准方向 |
| void Viewer.SetStandardView | ( | EnumStandardView | view, |
| boolean | bAnimation | ||
| ) |
设置相机方向。
| view | 标准方向 |
| bAnimation | 是否动画 |
| void Viewer.ShowCoordinateGrid | ( | boolean | bShow | ) |
设置轴网可见性
| bShow |
| Ray Viewer.WindowPointToRay | ( | long | x, |
| long | y | ||
| ) |
窗口的坐标转换成射线。
| x | X坐标 |
| y | Y坐标 |
| void Viewer.ZoomToBox | ( | AABox | bbox, |
| float | ratio | ||
| ) |
缩放到指定的包围盒
| bbox | 包围盒 |
| ratio | 比例。1为默认比例 |
| void Viewer.ZoomToExtend | ( | ) |
缩放视图适应窗口
| void Viewer.ZoomToExtend | ( | float | ratio | ) |
缩放视图适应窗口