Class Info |
|---|
public final class Ray implements Parcelable 射线。 |
Qualifier and Type | Method Name and Description |
|---|---|
| 获取射线的方向向量。 | |
| 获取射线的起始位置。 | |
getPoint(float distance) 获取指定距离的点坐标。 | |
void | setDirection(Vector3 direction) 设置射线的方向向量。 |
void | 设置射线的起始位置。 |
Parameters
Name | Description |
|---|---|
origin | 射线的起始位置。 |
direction | 射线的方向向量。 |
Method |
|---|
public Vector3 getPoint(float distance) 获取指定距离的点坐标。 |
Parameters
Name | Description |
|---|---|
distance | 距离长度。 |
Returns
Type | Description |
|---|---|
目标点的坐标。 |
Method |
|---|
public void setDirection(Vector3 direction) 设置射线的方向向量。 |
Parameters
Name | Description |
|---|---|
direction | 方向向量。 |
Method |
|---|
public void setOrigin(Vector3 origin) 设置射线的起始位置。 |
Parameters
Name | Description |
|---|---|
origin | 射线的起始位置。 |