|
AnyCAD Rapid API 2026
Help you to create a better world!
|
相机驱动器类 更多...
Public 成员函数 | |
| CameraDriver (global::System.IntPtr cPtr, bool cMemoryOwn) | |
| 仅供内部使用 | |
| void | Dispose () |
| CameraDriver () | |
| 默认构造函数 | |
| Vector3d | GetDirection () |
| void | SetDirection (Vector3d val) |
| Vector3d | GetUp () |
| void | SetUp (Vector3d val) |
| Vector3d | GetRight () |
| 获取相机右方向向量 | |
| virtual void | ComputeCameraDirection (EnumStandardView iDir) |
| 计算标准视图方向的相机参数 | |
| virtual void | ComputeFitView (Vector3d direction, Vector3d up) |
| 计算适配视图的相机方向 | |
| virtual EnumStandardView | GetStandardView (Vector3d direction) |
| 根据方向获取对应的标准视图类型 | |
相机驱动器类
负责计算相机的方向和位置,提供标准视图方向的快速设置。 将抽象的视图方向(如“前视图”、“顶视图”)转换为具体的相机参数。 支持自定义视图方向的计算和适配。
|
virtual |
计算标准视图方向的相机参数
| iDir | 标准视图类型(如前视图、顶视图等) |
根据标准视图枚举值设置 Direction 和 Up 属性。 子类可以重写此方法以自定义标准视图的定义。
|
virtual |
计算适配视图的相机方向
| direction | 期望的观察方向 |
| up | 期望的上方向 |
根据给定的方向和上方向调整相机参数,确保视图正确显示
| Vector3d AnyCAD.Foundation.CameraDriver.GetRight | ( | ) |
获取相机右方向向量
根据当前方向和上方向计算右手坐标系的右向量
|
virtual |
根据方向获取对应的标准视图类型
| direction | 观察方向向量 |
通过比较方向向量的夹角,找到匹配的标准视图