Skip to content

@simversus/yjvis


@simversus/yjvis / cax / SubdivSurfaceControl

Class: SubdivSurfaceControl ​

Defined in: cax/SubdivSurfaceControl.ts:23

细分曲面的变换控制器,用于控制物体的位置、旋转、缩放

Extends ​

Constructors ​

Constructor ​

new SubdivSurfaceControl(interactor): SubdivSurfaceControl

Defined in: cax/SubdivSurfaceControl.ts:34

Parameters ​

interactor ​

Interactor

Returns ​

SubdivSurfaceControl

Overrides ​

TransformControl.constructor

Properties ​

_camera ​

protected _camera: Camera

Defined in: control/controlBase.ts:47

关联的相机

Inherited from ​

TransformControl._camera


_cameraPosition ​

protected _cameraPosition: Vec3

Defined in: cax/TransformControl.ts:225

Inherited from ​

TransformControl._cameraPosition


_cameraQuaternion ​

protected _cameraQuaternion: Quat

Defined in: cax/TransformControl.ts:243

Inherited from ​

TransformControl._cameraQuaternion


_cameraScale ​

protected _cameraScale: Vec3

Defined in: cax/TransformControl.ts:226

Inherited from ​

TransformControl._cameraScale


_curQuaternion ​

protected _curQuaternion: Quat

Defined in: cax/SubdivSurfaceControl.ts:32

记录本次Controller旋转的累加角度


_debugPlane ​

protected _debugPlane: Model

Defined in: cax/TransformControl.ts:198

Inherited from ​

TransformControl._debugPlane


_eye ​

protected _eye: Vec3

Defined in: cax/TransformControl.ts:220

Inherited from ​

TransformControl._eye


_hitModelInfo? ​

protected optional _hitModelInfo: ModelInfo

Defined in: cax/TransformControl.ts:192

Inherited from ​

TransformControl._hitModelInfo


_initPosition ​

protected _initPosition: Vec3

Defined in: cax/TransformControl.ts:230

Inherited from ​

TransformControl._initPosition


_initQuaternion ​

protected _initQuaternion: Quat

Defined in: cax/TransformControl.ts:232

Inherited from ​

TransformControl._initQuaternion


_initScale ​

protected _initScale: Vec3

Defined in: cax/TransformControl.ts:234

Inherited from ​

TransformControl._initScale


_interractorUbinds ​

protected _interractorUbinds: Function[]

Defined in: control/controlBase.ts:34

交互器事件解绑函数列表

Inherited from ​

TransformControl._interractorUbinds


_isDragging ​

protected _isDragging: boolean

Defined in: control/controlBase.ts:25

是否正在拖拽中

Inherited from ​

TransformControl._isDragging


_isDraggStart ​

protected _isDraggStart: boolean = false

Defined in: control/controlBase.ts:29

是否刚开始拖拽

Inherited from ​

TransformControl._isDraggStart


_lastHitModelInfo? ​

protected optional _lastHitModelInfo: ModelInfo

Defined in: cax/TransformControl.ts:194

Inherited from ​

TransformControl._lastHitModelInfo


_lastQuaternion ​

protected _lastQuaternion: Quat

Defined in: cax/SubdivSurfaceControl.ts:28

记录上一次Controller旋转的角度


_models ​

protected _models: ModelInfo[] = []

Defined in: cax/TransformControl.ts:190

Inherited from ​

TransformControl._models


_offset ​

protected _offset: Vec3

Defined in: cax/TransformControl.ts:219

Inherited from ​

TransformControl._offset


_originCameraControlEnabled ​

protected _originCameraControlEnabled: boolean

Defined in: control/controlBase.ts:21

相机控制器的初始启用状态

Inherited from ​

TransformControl._originCameraControlEnabled


_parentQuaternionInv ​

protected _parentQuaternionInv: Quat

Defined in: cax/TransformControl.ts:244

Inherited from ​

TransformControl._parentQuaternionInv


_perceptionPlane ​

protected _perceptionPlane: Plane

Defined in: cax/TransformControl.ts:196

Inherited from ​

TransformControl._perceptionPlane


_pointEnd ​

protected _pointEnd: Vec3

Defined in: cax/TransformControl.ts:217

Inherited from ​

TransformControl._pointEnd


_pointStart ​

protected _pointStart: Vec3

Defined in: cax/TransformControl.ts:216

Inherited from ​

TransformControl._pointStart


_positionStart ​

protected _positionStart: Vec3

Defined in: cax/TransformControl.ts:213

Inherited from ​

TransformControl._positionStart


_quaternionStart ​

protected _quaternionStart: Quat

Defined in: cax/TransformControl.ts:239

quat

Inherited from ​

TransformControl._quaternionStart


_root ​

protected _root: Transform

Defined in: cax/TransformControl.ts:184

Inherited from ​

TransformControl._root


_rotationAngle ​

protected _rotationAngle: number = 0

Defined in: cax/TransformControl.ts:200

Inherited from ​

TransformControl._rotationAngle


_rotationAxis ​

protected _rotationAxis: Vec3

Defined in: cax/TransformControl.ts:228

Inherited from ​

TransformControl._rotationAxis


_scaleNode ​

protected _scaleNode: Transform

Defined in: cax/TransformControl.ts:186

Inherited from ​

TransformControl._scaleNode


_scaleStart ​

protected _scaleStart: Vec3

Defined in: cax/TransformControl.ts:214

Inherited from ​

TransformControl._scaleStart


_visible ​

_visible: boolean = true

Defined in: core/Transform.ts:51

是否可见

Inherited from ​

TransformControl._visible


_worldPosition ​

protected _worldPosition: Vec3

Defined in: cax/TransformControl.ts:222

Inherited from ​

TransformControl._worldPosition


_worldPositionStart ​

protected _worldPositionStart: Vec3

Defined in: cax/TransformControl.ts:210

vec3

Inherited from ​

TransformControl._worldPositionStart


_worldQuaternion ​

protected _worldQuaternion: Quat

Defined in: cax/TransformControl.ts:241

Inherited from ​

TransformControl._worldQuaternion


_worldQuaternionInv ​

protected _worldQuaternionInv: Quat

Defined in: cax/TransformControl.ts:242

Inherited from ​

TransformControl._worldQuaternionInv


_worldQuaternionStart ​

protected _worldQuaternionStart: Quat

Defined in: cax/TransformControl.ts:240

Inherited from ​

TransformControl._worldQuaternionStart


_worldScale ​

protected _worldScale: Vec3

Defined in: cax/TransformControl.ts:223

Inherited from ​

TransformControl._worldScale


_worldScaleStart ​

protected _worldScaleStart: Vec3

Defined in: cax/TransformControl.ts:211

Inherited from ​

TransformControl._worldScaleStart


castShadow ​

castShadow: boolean = false

Defined in: core/Transform.ts:27

是否投射阴影

Inherited from ​

TransformControl.castShadow


children ​

children: Transform[] = []

Defined in: core/Transform.ts:57

子节点

Inherited from ​

TransformControl.children


classHierarchy ​

classHierarchy: ClassEnum[]

Defined in: core/baseObject.ts:19

继承链

Inherited from ​

TransformControl.classHierarchy


enabled ​

enabled: boolean = true

Defined in: control/controlBase.ts:13

是否启用控制器

Inherited from ​

TransformControl.enabled


id ​

readonly id: number

Defined in: core/Transform.ts:40

唯一序号

Inherited from ​

TransformControl.id


interactor ​

interactor: Interactor

Defined in: control/controlBase.ts:83

交互器实例,用于处理输入事件

Inherited from ​

TransformControl.interactor


isLocalCoordiante ​

protected isLocalCoordiante: boolean = false

Defined in: cax/TransformControl.ts:205

是否开启局部坐标系 ==> 用于细分建模中局部坐标系

Inherited from ​

TransformControl.isLocalCoordiante


isLocalSpace ​

isLocalSpace: boolean = true

Defined in: cax/TransformControl.ts:141

是否在本地空间下进行变换

Inherited from ​

TransformControl.isLocalSpace


label? ​

optional label: string

Defined in: core/baseObject.ts:27

自定义标识

Inherited from ​

TransformControl.label


layerMask ​

layerMask: number = 0

Defined in: core/Transform.ts:139

层级掩码,用于控制不同层级对象的可见性或交互

Inherited from ​

TransformControl.layerMask


localArrow ​

localArrow: Model

Defined in: cax/SubdivSurfaceControl.ts:24


matrix ​

matrix: Mat4

Defined in: core/Transform.ts:71

本地变换矩阵 (相对于父节点)

Inherited from ​

TransformControl.matrix


modelViewMatrix ​

modelViewMatrix: Mat4

Defined in: core/Transform.ts:82

模型视图矩阵 (ModelMatrix * ViewMatrix) 用于着色器计算

Inherited from ​

TransformControl.modelViewMatrix


normalMatrix ​

normalMatrix: Mat3

Defined in: core/Transform.ts:88

法线矩阵 (模型视图矩阵的逆转置矩阵的左上3x3部分) 用于变换法向量

Inherited from ​

TransformControl.normalMatrix


occlusionTest ​

occlusionTest: boolean = false

Defined in: core/Transform.ts:35

是否进行遮挡查询测试

Inherited from ​

TransformControl.occlusionTest


onAfterRender()? ​

optional onAfterRender: (node) => void

Defined in: core/Transform.ts:134

渲染后的回调

Parameters ​

node ​

Transform

Returns ​

void

Inherited from ​

TransformControl.onAfterRender


onBeforeRender()? ​

optional onBeforeRender: (node, scene?, camera?, geometry?, material?, group?) => void

Defined in: core/Transform.ts:122

渲染前的回调

Parameters ​

node ​

any

scene? ​

Scene

camera? ​

Camera

geometry? ​

BufferGeometry

material? ​

NodeMaterial

group? ​

any

Returns ​

void

Inherited from ​

TransformControl.onBeforeRender


onControlUpdate? ​

optional onControlUpdate: Function

Defined in: control/controlBase.ts:17

控制器更新时的回调函数,通常用于触发重绘

Inherited from ​

TransformControl.onControlUpdate


parent? ​

optional parent: Transform

Defined in: core/Transform.ts:63

父节点

Inherited from ​

TransformControl.parent


position ​

position: Vec3

Defined in: core/Transform.ts:100

位置

Inherited from ​

TransformControl.position


quaternion ​

quaternion: Quat

Defined in: core/Transform.ts:112

旋转

Inherited from ​

TransformControl.quaternion


ratioInViewMinSize ​

ratioInViewMinSize: number = 0.3

Defined in: cax/TransformControl.ts:182

设置控制器的显示大小,跟视图最小边的比例

Inherited from ​

TransformControl.ratioInViewMinSize


receiveShadow ​

receiveShadow: boolean = false

Defined in: core/Transform.ts:31

是否接收阴影

Inherited from ​

TransformControl.receiveShadow


renderOrder ​

renderOrder: number = 0

Defined in: core/Transform.ts:45

渲染顺序

Inherited from ​

TransformControl.renderOrder


rotation ​

rotation: Euler

Defined in: core/Transform.ts:117

旋转信息的欧拉表达

Inherited from ​

TransformControl.rotation


rotationAbility ​

rotationAbility: boolean = false

Defined in: cax/TransformControl.ts:145

是否可以旋转

Inherited from ​

TransformControl.rotationAbility


scaling ​

scaling: Vec3

Defined in: core/Transform.ts:106

缩放

Inherited from ​

TransformControl.scaling


scalingAbility ​

scalingAbility: boolean = false

Defined in: cax/TransformControl.ts:153

是否可以缩放

Inherited from ​

TransformControl.scalingAbility


transitionAbility ​

transitionAbility: boolean = false

Defined in: cax/TransformControl.ts:149

是否可以平移

Inherited from ​

TransformControl.transitionAbility


up ​

up: Vec3

Defined in: core/Transform.ts:94

上方向

Inherited from ​

TransformControl.up


userData ​

userData: object = {}

Defined in: core/baseObject.ts:23

用户自定义数据

Inherited from ​

TransformControl.userData


uuid ​

uuid: string

Defined in: core/baseObject.ts:15

唯一标识符

Inherited from ​

TransformControl.uuid


worldMatrix ​

worldMatrix: Mat4

Defined in: core/Transform.ts:76

世界变换矩阵 (相对于世界坐标系)

Inherited from ​

TransformControl.worldMatrix

Accessors ​

_canUpdate ​

Get Signature ​

get protected _canUpdate(): boolean

Defined in: control/controlBase.ts:73

检查是否可以更新控制器状态 通常在交互器未进行拾取操作且控制器启用时返回 true

Returns ​

boolean

Inherited from ​

ClippingGizmo._canUpdate


camera ​

Get Signature ​

get camera(): Camera

Defined in: control/controlBase.ts:65

获取关联的相机

Returns ​

Camera

Inherited from ​

TransformControl.camera


lastQuaternion ​

Get Signature ​

get lastQuaternion(): Quat

Defined in: cax/SubdivSurfaceControl.ts:263

Returns ​

Quat

Set Signature ​

set lastQuaternion(v): void

Defined in: cax/SubdivSurfaceControl.ts:258

Parameters ​
v ​

Quat

Returns ​

void


localCoordiante ​

Get Signature ​

get localCoordiante(): boolean

Defined in: cax/SubdivSurfaceControl.ts:381

Returns ​

boolean

Set Signature ​

set localCoordiante(flag): void

Defined in: cax/SubdivSurfaceControl.ts:385

Parameters ​
flag ​

boolean

Returns ​

void


models ​

Get Signature ​

get models(): ModelInfo[]

Defined in: cax/SubdivSurfaceControl.ts:267

Returns ​

ModelInfo[]


mtime ​

Get Signature ​

get mtime(): number

Defined in: core/baseObject.ts:56

获取对象的最后修改时间戳

Returns ​

number

Inherited from ​

TransformControl.mtime


object ​

Get Signature ​

get object(): Transform

Defined in: control/controlBase.ts:52

控制的对象

Returns ​

Transform

Set Signature ​

set object(node): void

Defined in: control/controlBase.ts:58

设置控制对象

Parameters ​
node ​

Transform

Returns ​

void

Inherited from ​

TransformControl.object


rayCaster ​

Get Signature ​

get rayCaster(): Raycaster

Defined in: cax/TransformControl.ts:254

Returns ​

Raycaster

Inherited from ​

TransformControl.rayCaster


visible ​

Get Signature ​

get visible(): boolean

Defined in: core/Transform.ts:170

获取可见性状态

Returns ​

boolean

Set Signature ​

set visible(value): void

Defined in: core/Transform.ts:177

设置可见性状态

Parameters ​
value ​

boolean

Returns ​

void

Inherited from ​

TransformControl.visible

Methods ​

_click() ​

protected _click(): void

Defined in: cax/TransformControl.ts:902

Returns ​

void

Inherited from ​

TransformControl._click


_dragging() ​

protected _dragging(data): void

Defined in: cax/TransformControl.ts:744

拾取到物体并拖动

Parameters ​

data ​

InteractorData

Returns ​

void

Inherited from ​

TransformControl._dragging


_end() ​

protected _end(): void

Defined in: cax/TransformControl.ts:887

Returns ​

void

Inherited from ​

TransformControl._end


_hover() ​

protected _hover(data): void

Defined in: cax/TransformControl.ts:873

Parameters ​

data ​

InteractorData

Returns ​

void

Inherited from ​

TransformControl._hover


_initMathVariable() ​

protected _initMathVariable(): void

Defined in: cax/TransformControl.ts:311

Returns ​

void

Inherited from ​

TransformControl._initMathVariable


_initModel() ​

protected _initModel(): void

Defined in: cax/SubdivSurfaceControl.ts:46

细分建模

Returns ​

void

Overrides ​

TransformControl._initModel


_removeHandlers() ​

protected _removeHandlers(): void

Defined in: cax/TransformControl.ts:301

移除所有已注册的事件处理函数

Returns ​

void

Inherited from ​

TransformControl._removeHandlers


_start() ​

protected _start(data): void

Defined in: cax/TransformControl.ts:710

鼠标按下时,拾取,保存开始时的状态

Parameters ​

data ​

InteractorData

Returns ​

void

Inherited from ​

TransformControl._start


_updateWorldMatrixModels() ​

protected _updateWorldMatrixModels(): void

Defined in: cax/SubdivSurfaceControl.ts:399

更新control子节点模型

Returns ​

void

Overrides ​

TransformControl._updateWorldMatrixModels


add() ​

add(...nodes): void

Defined in: core/Transform.ts:358

添加子节点 会自动将子节点从原来的父节点移除

Parameters ​

nodes ​

...Transform[]

要添加的子节点列表

Returns ​

void

Inherited from ​

TransformControl.add


addEventListener() ​

addEventListener(type, cb): void

Defined in: core/baseObject.ts:105

添加事件监听器

Parameters ​

type ​

string

事件类型字符串

cb ​

Function

事件触发时的回调函数

Returns ​

void

Inherited from ​

TransformControl.addEventListener


attach() ​

attach(target, root, camera): void

Defined in: cax/TransformControl.ts:346

将转换控制器附加到目标对象

Parameters ​

target ​

Transform

目标变换对象

root ​

Transform

根节点

camera ​

Camera

相机对象

Returns ​

void

Inherited from ​

TransformControl.attach


changed() ​

changed(): void

Defined in: core/baseObject.ts:72

标记对象为已修改 更新修改时间戳并触发所有注册的变更回调

Returns ​

void

Inherited from ​

TransformControl.changed


clone() ​

clone(recursive?): SubdivSurfaceControl

Defined in: core/Transform.ts:406

克隆当前节点

Parameters ​

recursive? ​

boolean

是否递归克隆子节点,默认为 true

Returns ​

SubdivSurfaceControl

克隆后的新节点

Inherited from ​

TransformControl.clone


copy() ​

copy(source, recursive): SubdivSurfaceControl

Defined in: core/Transform.ts:417

从源节点复制属性

Parameters ​

source ​

this

源节点

recursive ​

boolean = true

是否递归复制子节点,默认为 true

Returns ​

SubdivSurfaceControl

this

Inherited from ​

TransformControl.copy


detach() ​

detach(): void

Defined in: cax/SubdivSurfaceControl.ts:369

将转换控制器从目标对象分离

Returns ​

void

Overrides ​

TransformControl.detach


dispatchEvent() ​

dispatchEvent(event): void

Defined in: core/baseObject.ts:126

分发事件 触发所有注册了该事件类型的监听器

Parameters ​

event ​

事件对象,包含 type 和可选的 data

data? ​

any

type ​

string

Returns ​

void

Inherited from ​

TransformControl.dispatchEvent


dispose() ​

dispose(): void

Defined in: core/baseObject.ts:80

销毁该对象 分发 dispose 事件,通知监听者对象即将被销毁

Returns ​

void

Inherited from ​

TransformControl.dispose


getRotation() ​

getRotation(): Number3

Defined in: core/Transform.ts:208

获取欧拉角旋转信息 (数组形式)

Returns ​

Number3

[x, y, z] 旋转角度数组

Inherited from ​

TransformControl.getRotation


getWorldDirection() ​

getWorldDirection(target): Vec3

Defined in: core/Transform.ts:343

获取节点在世界空间中的朝向

Parameters ​

target ​

Vec3 = ...

目标向量,用于存储结果

Returns ​

Vec3

朝向向量

Inherited from ​

TransformControl.getWorldDirection


is() ​

is(t): boolean

Defined in: core/baseObject.ts:65

检查对象是否属于指定的类类型

Parameters ​

t ​

ClassEnum

类类型枚举值

Returns ​

boolean

如果对象是该类型或继承自该类型,则返回 true

Inherited from ​

TransformControl.is


lookAt() ​

lookAt(target): void

Defined in: core/Transform.ts:291

使节点看向指定目标点 (改变朝向)

Parameters ​

target ​

Vec3 = ...

目标点坐标 (Vec3)

Returns ​

void

Inherited from ​

TransformControl.lookAt


lookTo() ​

lookTo(direction): void

Defined in: core/Transform.ts:304

使节点看向指定方向

Parameters ​

direction ​

Vec3

方向向量 (Vec3)

Returns ​

void

Inherited from ​

TransformControl.lookTo


onChanged() ​

onChanged(cb): () => void

Defined in: core/baseObject.ts:90

注册对象变更回调 当对象发生改变(调用 changed 方法)时触发

Parameters ​

cb ​

Function

回调函数

Returns ​

取消注册该回调的函数

(): void

Returns ​

void

Inherited from ​

TransformControl.onChanged


onChanging() ​

onChanging(type, target, axisType, diff): void

Defined in: cax/TransformControl.ts:157

移动变化回调

Parameters ​

type ​

TransformMode

target ​

Transform

axisType ​

AxisType

diff ​

number | Vec3

Returns ​

void

Inherited from ​

TransformControl.onChanging


onRelease() ​

onRelease(origin, quaternion): void

Defined in: cax/TransformControl.ts:178

释放鼠标回调

Parameters ​

origin ​

Vec3

当前坐标系原点或旋转角度

quaternion ​

Quat

旋转四元数

Returns ​

void

Inherited from ​

TransformControl.onRelease


onUpCallback() ​

onUpCallback(): void

Defined in: cax/TransformControl.ts:170

抬起回调

Returns ​

void

Inherited from ​

TransformControl.onUpCallback


release() ​

release(): void

Defined in: cax/TransformControl.ts:368

释放控制器资源 移除事件监听器并取消帧回调注册

Returns ​

void

Inherited from ​

TransformControl.release


remove() ​

remove(...nodes): void

Defined in: core/Transform.ts:372

移除子节点

Parameters ​

nodes ​

...Transform[]

要移除的子节点列表

Returns ​

void

Inherited from ​

TransformControl.remove


removeEventListener() ​

removeEventListener(type, cb): void

Defined in: core/baseObject.ts:116

移除事件监听器

Parameters ​

type ​

string

事件类型字符串

cb ​

Function

要移除的回调函数

Returns ​

void

Inherited from ​

TransformControl.removeEventListener


resetQuaternion() ​

resetQuaternion(): void

Defined in: cax/SubdivSurfaceControl.ts:438

Returns ​

void


rotate() ​

rotate(param0): void

Defined in: core/Transform.ts:270

绕本地坐标系的 X, Y, Z 轴旋转及从欧拉角选择

Parameters ​

param0 ​

包含 dx, dy, dz 的对象 (弧度)

dx? ​

number

dy? ​

number

dz? ​

number

Returns ​

void

Inherited from ​

TransformControl.rotate


rotateOnAxis() ​

rotateOnAxis(axis, radian): void

Defined in: core/Transform.ts:251

绕本地坐标系的指定轴旋转

Parameters ​

axis ​

Vec3

旋转轴 (Vec3)

radian ​

number

旋转角度 (弧度)

Returns ​

void

Inherited from ​

TransformControl.rotateOnAxis


rotateOnWorldAxis() ​

rotateOnWorldAxis(axis, radian): void

Defined in: core/Transform.ts:261

绕世界坐标系的指定轴旋转

Parameters ​

axis ​

Vec3

旋转轴 (Vec3)

radian ​

number

旋转角度 (弧度)

Returns ​

void

Inherited from ​

TransformControl.rotateOnWorldAxis


scale() ​

scale(param0): void

Defined in: core/Transform.ts:280

缩放节点 (在现有缩放基础上累乘)

Parameters ​

param0 ​

包含 dx, dy, dz 的对象

dx? ​

number

dy? ​

number

dz? ​

number

Returns ​

void

Inherited from ​

TransformControl.scale


setMatrix() ​

setMatrix(m): void

Defined in: core/Transform.ts:190

设置节点的本地变换矩阵 会自动分解出 position, quaternion, scaling

Parameters ​

m ​

Mat4

变换矩阵

Returns ​

void

Inherited from ​

TransformControl.setMatrix


setPosition() ​

setPosition(position, direction?): void

Defined in: cax/SubdivSurfaceControl.ts:284

初始化设置模型位置和朝向 设置位置之前应执行一次,detach,避免重复绑定

Parameters ​

position ​

Number3

位置

direction? ​

Vec3

面片的法向量==> 默认是[0,0,1] +z轴

Returns ​

void


setRotation() ​

setRotation(x, y, z): void

Defined in: core/Transform.ts:218

设置旋转角度 (欧拉角)

Parameters ​

x ​

number

X轴旋转角度 (弧度),也可传入 Vec3

y ​

number = x

Y轴旋转角度 (弧度)

z ​

number = x

Z轴旋转角度 (弧度)

Returns ​

void

Inherited from ​

TransformControl.setRotation


setup() ​

setup(renderer, onControlUpdate?): void

Defined in: control/controlBase.ts:96

注册帧回调和渲染函数

Parameters ​

renderer ​

Renderer

渲染器

onControlUpdate? ​

Function

控制器更新回调

Returns ​

void

Inherited from ​

TransformControl.setup


toJSON() ​

toJSON(): any

Defined in: core/Transform.ts:393

序列化为 JSON 对象

Returns ​

any

包含位置、旋转和缩放的 JSON 对象

Inherited from ​

TransformControl.toJSON


translate() ​

translate(param0): void

Defined in: core/Transform.ts:240

沿本地坐标系的 X, Y, Z 轴平移

Parameters ​

param0 ​

包含 dx, dy, dz 的对象

dx? ​

number

dy? ​

number

dz? ​

number

Returns ​

void

Inherited from ​

TransformControl.translate


translateOnAxis() ​

translateOnAxis(axis, distance): SubdivSurfaceControl

Defined in: core/Transform.ts:230

沿指定轴平移节点 轴是在本地坐标系下指定的,但移动方向受当前旋转影响

Parameters ​

axis ​

Vec3

移动轴 (Vec3)

distance ​

number

移动距离

Returns ​

SubdivSurfaceControl

this

Inherited from ​

TransformControl.translateOnAxis


traverse() ​

traverse(cb): void

Defined in: core/Transform.ts:199

遍历场景树,对当前节点及所有后代节点执行回调

Parameters ​

cb ​

(node) => void

回调函数,接收当前正在处理的节点作为参数

Returns ​

void

Inherited from ​

TransformControl.traverse


updateMatrix() ​

updateMatrix(): void

Defined in: core/Transform.ts:313

更新本地矩阵 根据当前的 position, quaternion, scaling 组合计算 matrix

Returns ​

void

Inherited from ​

TransformControl.updateMatrix


updateWorldMatrix() ​

updateWorldMatrix(updateParant, updateChildren): void

Defined in: cax/TransformControl.ts:379

更新世界矩阵,保存当前状态

Parameters ​

updateParant ​

boolean = false

updateChildren ​

boolean = true

Returns ​

void

Inherited from ​

TransformControl.updateWorldMatrix