Class: Box3
Properties
min
• min: Vector3
Details
盒子的下边界
max
• max: Vector3
Details
盒子的上边界
Methods
set
▸ set(min
, max
): Box3
Details
设置此盒子的上下 (x, y, z) 边界
Parameters
Name | Type | Description |
---|---|---|
min | Vector3 | 盒子的下边界 |
max | Vector3 | 盒子的上边界 |
Returns
Box3对象
boxToTransform
▸ boxToTransform(): Transform
Details
获取此盒子的Transform
Returns
Transform对象
getSize
▸ getSize(target
): Vector3
Details
将盒子宽度 高度 深度作为Vector3
Parameters
Name | Type | Description |
---|---|---|
target | Vector3 | 返回结果将对其赋值 |
Returns
盒子和宽度 高度 深度
expandByVector
▸ expandByVector(vector
): Box3
Details
用于将盒子的尺寸按照给定的向量进行扩大
Parameters
Name | Type | Description |
---|---|---|
vector | Vector3 | 一个Vector3对象,表示包围盒将要扩大的向量 |
Returns
放大后的box3对象
expandByScalar
▸ expandByScalar(scalar
): Box3
Details
对盒子进行按比例放大
Parameters
Name | Type | Description |
---|---|---|
scalar | number | 一个数字,表示将盒子的尺寸按此比例扩大。 |
Returns
放大后的box3对象