目录

Box

Class Info

public final class Box implements Parcelable

包围盒。

Public Constructor Summary

Constructor Name

Box(Vector3 minVector, Vector3 maxVector)

构造方法,使用包围盒的最小值与最大值初始化Box。

Public Method Summary

Qualifier and Type

Method Name and Description

Vector3

getCentre()

获取包围盒中心坐标。

Vector3

getMax()

获取包围盒的最大值坐标。

Vector3

getMin()

获取包围盒的最小值坐标。

float

getSize()

获取包围盒的对角线长度。

void

transform(Matrix4 matrix)

移动包围盒。

Public Constructors

[h2]Box

Constructor

public Box(Vector3 minVector, Vector3 maxVector)

构造方法,使用包围盒的最小值与最大值初始化。

Parameters

Name

Description

minVector

包围盒的最小值坐标。

maxVector

包围盒的最大值坐标。

Public Method

[h2]getCentre

Method

public Vector3 getCentre()

获取包围盒中心坐标。

Returns

Type

Description

Vector3

包围盒中心坐标。

[h2]getMax

Method

public Vector3 getMax()

获取包围盒的最大值坐标。

Returns

Type

Description

Vector3

包围盒的最大值坐标。

[h2]getMin

Method

public Vector3 getMin()

获取包围盒的最小值坐标。

Returns

Type

Description

Vector3

包围盒的最小值坐标。

[h2]getSize

Method

public float getSize()

获取包围盒的对角线长度。

Returns

Type

Description

float

包围盒对角线长度。

[h2]transform

Method

public void transform(Matrix4 matrix)

移动包围盒。

Parameters

Name

Description

matrix

位移矩阵。