AnyCAD Rapid API 2024
Help you to create a better world!
|
WinForms三维控件 更多...
Public 成员函数 | |||||||
RenderControl () | |||||||
构造函数 | |||||||
RenderControl (Control parent) | |||||||
构造函数 | |||||||
void | SetToolTip (string text) | ||||||
显示Tooltip | |||||||
void | EnableAnimation (bool bEnabled) | ||||||
开启动画 | |||||||
void | DestroyRenderer () | ||||||
释放显示资源 | |||||||
Viewer | GetViewer () | ||||||
获得渲染视图 | |||||||
void | SetViewCube (EnumViewCoordinateType type) | ||||||
设置坐标轴样式 | |||||||
ViewContext | GetContext () | ||||||
获取渲染上下文 | |||||||
bool | ExecuteCommand (string name) | ||||||
执行命令 | |||||||
bool | ExecuteCommand (string name, ParameterDict parameters) | ||||||
执行命令 | |||||||
void | SetEditor (Editor editor) | ||||||
设置编辑器 | |||||||
void | ClearEditor () | ||||||
清空编辑器 | |||||||
void | SetCameraDriver (CameraDriver driver) | ||||||
设置相机驱动 | |||||||
void | ShowCoordinateGrid (bool bShow) | ||||||
显示网格 | |||||||
void | ClearPickFilters () | ||||||
清空选择过滤器 | |||||||
void | AddPickFilter (EnumShapeFilter filter) | ||||||
增加过滤条件 | |||||||
void | ResetDisplayFilters () | ||||||
重置显示过滤器 | |||||||
void | AddDisplayFilter (EnumShapeFilter filter) | ||||||
增加显示过滤条件 | |||||||
void | ClearDisplayFilter (EnumShapeFilter filter) | ||||||
情况显示过滤器 | |||||||
void | SetBackgroundColor (float r, float g, float b, float a) | ||||||
设置背景色 | |||||||
void | SetStandardView (EnumStandardView view, bool annimation=true) | ||||||
设置标准视图 | |||||||
Scene | GetScene () | ||||||
获取场景 | |||||||
Scene | GetScene2D () | ||||||
获取2D场景 | |||||||
Camera | GetCamera () | ||||||
获取主相机 | |||||||
void | SetBeforeSelectCallback (ViewerListener.BeforeSelectHandler callback) | ||||||
设置选择前回调函数 | |||||||
void | SetSelectCallback (ViewerListener.AfterSelectHandler callback) | ||||||
设置选择回调函数 | |||||||
void | SetHilightingCallback (ViewerListener.BeforeSelectHandler callback) | ||||||
设置高亮回调函数 | |||||||
void | SetAfterRenderingCallback (ViewerListener.RenderingHandler callback) | ||||||
设置渲染回调函数 | |||||||
void | SetHilightFilterCallback (ViewerListener.HilightFilterHandler callback) | ||||||
设置高亮过滤回调函数 | |||||||
void | SetAnimationCallback (ViewerListener.AnimationHandler callback) | ||||||
设置动画回调函数 | |||||||
void | ZoomAll () | ||||||
缩放视图适应窗口. | |||||||
void | ZoomAll (float ratio) | ||||||
缩放视图适应窗口. | |||||||
void | ClearAll () | ||||||
清空场景 | |||||||
void | ClearScene () | ||||||
清空三维场景 | |||||||
void | ClearScene2D () | ||||||
清空二维场景 | |||||||
ScreenShot | CreateScreenShot () | ||||||
创建屏幕快照 | |||||||
void | ShowSceneNode (SceneNode node) | ||||||
增加对象。一个Node只能加一次。 | |||||||
void | RemoveSceneNode (uint id) | ||||||
删除显示对象 | |||||||
BrepSceneNode | ShowShape (TopoShape shape, Vector3 color) | ||||||
显示几何对象。 | |||||||
BrepSceneNode | ShowShape (TopoShape shape, MaterialInstance faceMaterial, MaterialInstance edgeMaterial) | ||||||
显示几何对象
| |||||||
void | SwitchProjectionType () | ||||||
切换相机类型:正交 – 透视 | |||||||
void | UpdateWorld () | ||||||
更新场景 | |||||||
void | ForceUpdate () | ||||||
强制更新 | |||||||
void | RequestDraw () | ||||||
模型更新后调用,通知引擎刷新场景 | |||||||
void | RequestDraw (EnumUpdateFlags flag) | ||||||
模型更新后调用,通知引擎刷新场景 | |||||||
MaterialInstance | GetMaterial (Vector3 color, float a) | ||||||
根据颜色获取材质 | |||||||
PickedItem | Snap (double x, double y) | ||||||
根据窗口的坐标Snap场景中的对象
| |||||||
void | MapMouseEvent (InputEvent evt, MouseEventArgs e, Keys keys) | ||||||
Map mouseEvents to InputEvent. | |||||||
void | OnRenderingFrame (object sender, EventArgs e) | ||||||
绘制 | |||||||
Public 属性 | |
System.Threading.Mutex | RenderMutex = new System.Threading.Mutex(true) |
渲染锁 | |
bool | AutoGarbageCollection = false |
是否启用自动垃圾回收 | |
属性 | |
Timer | AnimationTimer [get] |
获取动画计时器 | |
Viewer | Viewer [get] |
获得渲染视图 | |
SceneManager | SceneManager [get] |
获取场景管理器 | |
SelectionManager | SelectionManager [get] |
获取选择管理器 | |
ViewContext | ViewContext [get] |
获取渲染上下文 | |
Scene | Scene [get] |
得到属性 | |
Scene | Scene2D [get] |
得到属性 | |
Camera | Camera [get] |
相机 | |
bool | UseEngineCursor [get, set] |
使用引擎自绘制光标 | |
属性 继承自 AnyCAD.Foundation.IRenderView |
事件 | |
Action | ViewerReady |
渲染引擎初始化完成事件 | |
WinForms三维控件
AnyCAD.Forms.RenderControl.RenderControl | ( | Control | parent | ) |
构造函数
parent | 指定父控件 |
void AnyCAD.Forms.RenderControl.AddDisplayFilter | ( | EnumShapeFilter | filter | ) |
void AnyCAD.Forms.RenderControl.AddPickFilter | ( | EnumShapeFilter | filter | ) |
void AnyCAD.Forms.RenderControl.ClearAll | ( | ) |
清空场景
void AnyCAD.Forms.RenderControl.ClearDisplayFilter | ( | EnumShapeFilter | filter | ) |
void AnyCAD.Forms.RenderControl.ClearEditor | ( | ) |
清空编辑器
void AnyCAD.Forms.RenderControl.ClearPickFilters | ( | ) |
清空选择过滤器
void AnyCAD.Forms.RenderControl.ClearScene | ( | ) |
清空三维场景
void AnyCAD.Forms.RenderControl.ClearScene2D | ( | ) |
清空二维场景
ScreenShot AnyCAD.Forms.RenderControl.CreateScreenShot | ( | ) |
void AnyCAD.Forms.RenderControl.EnableAnimation | ( | bool | bEnabled | ) |
bool AnyCAD.Forms.RenderControl.ExecuteCommand | ( | string | name | ) |
执行命令
name | 命令名称 |
bool AnyCAD.Forms.RenderControl.ExecuteCommand | ( | string | name, |
ParameterDict | parameters ) |
void AnyCAD.Forms.RenderControl.ForceUpdate | ( | ) |
强制更新
Camera AnyCAD.Forms.RenderControl.GetCamera | ( | ) |
获取主相机
ViewContext AnyCAD.Forms.RenderControl.GetContext | ( | ) |
获取渲染上下文
MaterialInstance AnyCAD.Forms.RenderControl.GetMaterial | ( | Vector3 | color, |
float | a ) |
根据颜色获取材质
color | 颜色 |
a | 透明度 |
Scene AnyCAD.Forms.RenderControl.GetScene | ( | ) |
获取场景
Scene AnyCAD.Forms.RenderControl.GetScene2D | ( | ) |
获取2D场景
Viewer AnyCAD.Forms.RenderControl.GetViewer | ( | ) |
获得渲染视图
void AnyCAD.Forms.RenderControl.MapMouseEvent | ( | InputEvent | evt, |
MouseEventArgs | e, | ||
Keys | keys ) |
Map mouseEvents to InputEvent.
evt | |
e | |
keys |
void AnyCAD.Forms.RenderControl.OnRenderingFrame | ( | object | sender, |
EventArgs | e ) |
绘制
sender | |
e |
void AnyCAD.Forms.RenderControl.RemoveSceneNode | ( | uint | id | ) |
void AnyCAD.Forms.RenderControl.RequestDraw | ( | EnumUpdateFlags | flag | ) |
void AnyCAD.Forms.RenderControl.ResetDisplayFilters | ( | ) |
重置显示过滤器
void AnyCAD.Forms.RenderControl.SetAfterRenderingCallback | ( | ViewerListener::RenderingHandler | callback | ) |
设置渲染回调函数
callback |
void AnyCAD.Forms.RenderControl.SetAnimationCallback | ( | ViewerListener::AnimationHandler | callback | ) |
void AnyCAD.Forms.RenderControl.SetBackgroundColor | ( | float | r, |
float | g, | ||
float | b, | ||
float | a ) |
void AnyCAD.Forms.RenderControl.SetBeforeSelectCallback | ( | ViewerListener::BeforeSelectHandler | callback | ) |
void AnyCAD.Forms.RenderControl.SetCameraDriver | ( | CameraDriver | driver | ) |
void AnyCAD.Forms.RenderControl.SetEditor | ( | Editor | editor | ) |
void AnyCAD.Forms.RenderControl.SetHilightFilterCallback | ( | ViewerListener::HilightFilterHandler | callback | ) |
void AnyCAD.Forms.RenderControl.SetHilightingCallback | ( | ViewerListener::BeforeSelectHandler | callback | ) |
void AnyCAD.Forms.RenderControl.SetSelectCallback | ( | ViewerListener::AfterSelectHandler | callback | ) |
void AnyCAD.Forms.RenderControl.SetStandardView | ( | EnumStandardView | view, |
bool | annimation = true ) |
void AnyCAD.Forms.RenderControl.SetToolTip | ( | string | text | ) |
void AnyCAD.Forms.RenderControl.SetViewCube | ( | EnumViewCoordinateType | type | ) |
void AnyCAD.Forms.RenderControl.ShowCoordinateGrid | ( | bool | bShow | ) |
void AnyCAD.Forms.RenderControl.ShowSceneNode | ( | SceneNode | node | ) |
BrepSceneNode AnyCAD.Forms.RenderControl.ShowShape | ( | TopoShape | shape, |
MaterialInstance | faceMaterial, | ||
MaterialInstance | edgeMaterial ) |
显示几何对象
shape | 几何对象 |
faceMaterial | 面的材质 |
edgeMaterial | 边的材质 |
BrepSceneNode AnyCAD.Forms.RenderControl.ShowShape | ( | TopoShape | shape, |
Vector3 | color ) |
PickedItem AnyCAD.Forms.RenderControl.Snap | ( | double | x, |
double | y ) |
void AnyCAD.Forms.RenderControl.SwitchProjectionType | ( | ) |
切换相机类型:正交 – 透视
void AnyCAD.Forms.RenderControl.ZoomAll | ( | float | ratio | ) |
|
get |
相机
|
get |
得到属性
|
get |
得到属性
|
get |
获取场景管理器
|
get |
获取选择管理器
|
getset |
使用引擎自绘制光标
|
get |
|
get |