|
AnyCAD Rapid API 2024
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 | InternalPushEditor (Editor editor, boolean bClearOld) |
| Editor | GetEditor () |
| void | ClearEditor () |
| float | GetTimeTicks () |
| void | OnTime (float timeTick) |
| void | Run (GuiRenderer gui) |
| boolean | ProcessEvent (GuiRenderer gui) |
| EnumRedrawResult | Redraw (float timeTick, boolean force) |
| EnumRedrawResult | Redraw (float timeTick) |
| void | RequestUpdate (EnumUpdateFlags flag) |
| ViewContext | GetContext () |
| void | ZoomToExtend (float ratio) |
| void | ZoomToExtend () |
| void | ZoomToBox (AABox bbox, float ratio) |
| void | ZoomToBox (AABox bbox) |
| ScreenShot | CreateScreenShot () |
| void | SetBackgroundColor (Vector4 clr) |
| void | SetBackground (Background background) |
| Background | GetBackground () |
| void | SetCoordinateGrid (CoordinateGridWidget grid) |
| CoordinateGridWidget | GetCoordinateGrid () |
| void | ShowCoordinateGrid (boolean bShow) |
| void | SetWorkingPlane (GAx2 ax) |
| GAx2 | GetWorkingPlane () |
| 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) |
| boolean | OnEditorAction (String name, ParameterDict parameters) |
| void | ResizeWindow (long width, long height) |
| void | InstallEventHandlers () |
| FloatList | ReadDepthBuffer (long posX, long posY, long width, long height) |
| boolean | WndProc (long hWnd, int msg, java.math.BigInteger wparam, long lparam) |
| void | OnDeviceLost (long hParent) |
静态 Public 成员函数 | |
| static void | SetZoomFacotr (float zoomOut, float zoomIn) |
三维渲染视图
<> 渲染视图的基类
| void Viewer.Clear | ( | ) |
清空场景
| void Viewer.ClearEditor | ( | ) |
清空设置的编辑器。
| ScreenShot Viewer.CreateScreenShot | ( | ) |
创建屏幕截图
| void Viewer.Destroy | ( | ) |
内部方法。释放资源
| Background Viewer.GetBackground | ( | ) |
获取当前的背景对象
| ViewContext Viewer.GetContext | ( | ) |
获取视图上下文。
| CoordinateGridWidget Viewer.GetCoordinateGrid | ( | ) |
获取轴网组件
| Document Viewer.GetDocument | ( | ) |
获取文档对象
| float Viewer.GetTimeTicks | ( | ) |
获取时间间隔
| ObjectId Viewer.GetViewId | ( | ) |
获取View的ID
| GAx2 Viewer.GetWorkingPlane | ( | ) |
获取工作平面坐标系
| void Viewer.InstallEventHandlers | ( | ) |
内部方法。设置事件处理器
| void Viewer.InternalPushEditor | ( | Editor | editor, |
| boolean | bClearOld ) |
内部方法,禁止调用
| editor | 编辑器 |
| bClearOld | 是否清空 |
设置相机方向
| target | 目标位置 |
| dir | 方向 |
| up | Z朝向 |
| bAnimation | 是否启用动画方式 |
| void Viewer.OnDeviceLost | ( | long | hParent | ) |
内部方法
| hParent |
| void Viewer.OnDocumentChanged | ( | DocumentEventArgs | args | ) |
文档有更新时调用
| args | Document事件参数 |
| boolean Viewer.OnEditorAction | ( | String | name, |
| ParameterDict | parameters ) |
执行Editor的动作
| name | 名称 |
| parameters | 参数 |
| void Viewer.OnInput | ( | ParameterDict | parameters | ) |
处理用户输入消息
| parameters | 参数 |
| void Viewer.OnKeyDown | ( | InputEvent | evt | ) |
处理键盘按下消息
| evt | 参数 |
| void Viewer.OnKeyUp | ( | InputEvent | evt | ) |
处理键盘松开消息
| evt | 参数 |
| void Viewer.OnMouseDown | ( | InputEvent | evt | ) |
处理鼠标按下消息
| evt | 参数 |
| void Viewer.OnMouseMove | ( | InputEvent | evt | ) |
处理鼠标移动消息
| evt | 参数 |
| void Viewer.OnMouseUp | ( | InputEvent | evt | ) |
处理鼠标松开消息
| evt | 参数 |
| 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对象 |
| FloatList Viewer.ReadDepthBuffer | ( | long | posX, |
| long | posY, | ||
| long | width, | ||
| long | height ) |
内部方法
| posX<br> | |
| posY<br> | |
| width<br> | |
| height<br> |
| EnumRedrawResult Viewer.Redraw | ( | float | timeTick | ) |
绘制画面
| timeTick | 时间间隔 |
| EnumRedrawResult Viewer.Redraw | ( | float | timeTick, |
| boolean | force ) |
绘制画面
| timeTick | 时间间隔 |
| void Viewer.RequestUpdate | ( | EnumUpdateFlags | flag | ) |
请求更新视图
| flag | 更新标记 |
| void Viewer.ResizeWindow | ( | long | width, |
| long | height ) |
设置窗口大小
| width | 宽度 |
| height | 高度 |
| 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.SetDocument | ( | Document | doc | ) |
设置关联的文档
| doc | 文档对象 |
| void Viewer.SetStandardView | ( | EnumStandardView | view | ) |
设置相机方向。
| view | 标准方向 |
| void Viewer.SetStandardView | ( | EnumStandardView | view, |
| boolean | bAnimation ) |
设置相机方向。
| view | 标准方向 |
| bAnimation | 是否动画 |
| void Viewer.SetViewId | ( | ObjectId | viewId | ) |
设置View的Id
| viewId | ID |
| void Viewer.SetWorkingPlane | ( | GAx2 | ax | ) |
设置工作平面坐标系
| ax | 坐标系 |
| void Viewer.ShowCoordinateGrid | ( | boolean | bShow | ) |
设置轴网可见性
| bShow |
| Ray Viewer.WindowPointToRay | ( | long | x, |
| long | y ) |
窗口的坐标转换成射线。
| x | X坐标 |
| y | Y坐标 |
| boolean Viewer.WndProc | ( | long | hWnd, |
| int | msg, | ||
| java.math.BigInteger | wparam, | ||
| long | lparam ) |
内部方法
| hWnd<br> | |
| msg<br> | |
| wparam<br> | |
| lparam<br> |
| void Viewer.ZoomToBox | ( | AABox | bbox | ) |
缩放到指定的包围盒
| bbox | 包围盒 |
| void Viewer.ZoomToBox | ( | AABox | bbox, |
| float | ratio ) |
缩放到指定的包围盒
| bbox | 包围盒 |
| ratio | 比例。1.2为默认比例 |
| void Viewer.ZoomToExtend | ( | ) |
缩放视图适应窗口
| void Viewer.ZoomToExtend | ( | float | ratio | ) |
缩放视图适应窗口