KCamera
kds-plugin-document / Exports / KCamera
Interface: KCamera
酷大师相机 可以将酷大师画布中显示的内容,想象成从一个虚拟的照相机中看到的内容。可阅读任何计算机图形学课程资料,获取关于相机的基础知识。
The KCamera class contains methods for getting the camera information. The camera in KuDaShi is the “point of view” from which you look at the model.
Table of contents
Methods
Methods
getMode
▸ getMode(): KCameraMode
获取相机模式
Get the camera's mode.
Returns
The camera's mode.
Defined in
api.d.ts:1344
getPosition
▸ getPosition(): KPoint3d
获取相机位置
Get the camera's position.
Returns
The camera's position.
Defined in
api.d.ts:1353
getTarget
▸ getTarget(): KPoint3d
获取相机的观察点
Get the camera's target, which is the camera is pointing at.
Returns
The camera's target.
Defined in
api.d.ts:1362
getUp
▸ getUp(): KVector3d
获取相机向上方向
Get the camera's up direction.
Returns
The camera's up direction.
Defined in
api.d.ts:1371
getZoomFactor
▸ getZoomFactor(): number
获取相机缩放比例
Get the camera's zoom factor.
Returns
number
The camera's zoom factor.
Defined in
api.d.ts:1335
setPosition
▸ setPosition(position
): boolean
设置相机位置
Set the camera's position.
Parameters
Name | Type |
---|---|
position | KPoint3d |
Returns
boolean
The camera's position.
Defined in
api.d.ts:1380
setTarget
▸ setTarget(target
): boolean
设置相机的观察点
Set the camera's target, which is the camera is pointing at.
Parameters
Name | Type |
---|---|
target | KPoint3d |
Returns
boolean
The camera's target.
Defined in
api.d.ts:1389