Skip to main content

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

KCameraMode

The camera's mode.

Defined in

api.d.ts:1271


getPosition

getPosition(): KPoint3d

获取相机位置

Get the camera's position.

Returns

KPoint3d

The camera's position.

Defined in

api.d.ts:1280


getTarget

getTarget(): KPoint3d

获取相机的观察点

Get the camera's target, which is the camera is pointing at.

Returns

KPoint3d

The camera's target.

Defined in

api.d.ts:1289


getUp

getUp(): KVector3d

获取相机向上方向

Get the camera's up direction.

Returns

KVector3d

The camera's up direction.

Defined in

api.d.ts:1298


getZoomFactor

getZoomFactor(): number

获取相机缩放比例

Get the camera's zoom factor.

Returns

number

The camera's zoom factor.

Defined in

api.d.ts:1262


setPosition

setPosition(position): boolean

设置相机位置

Set the camera's position.

Parameters

NameType
positionKPoint3d

Returns

boolean

The camera's position.

Defined in

api.d.ts:1307


setTarget

setTarget(target): boolean

设置相机的观察点

Set the camera's target, which is the camera is pointing at.

Parameters

NameType
targetKPoint3d

Returns

boolean

The camera's target.

Defined in

api.d.ts:1316