[gs-longan](../README.md) / Wcs

# Class: Wcs

局部坐标系（单精度）

封装原点与三轴，并提供从模型坐标与局部坐标之间的变换方法。

## Table of contents

### Constructors

- [constructor](Wcs.md#constructor)

### Properties

- [local](Wcs.md#local)
- [model](Wcs.md#model)
- [origin](Wcs.md#origin)
- [x\_axis](Wcs.md#x_axis)
- [y\_axis](Wcs.md#y_axis)
- [z\_axis](Wcs.md#z_axis)

### Methods

- [toLocalPoint](Wcs.md#tolocalpoint)
- [toLocalVector](Wcs.md#tolocalvector)
- [toModelPoint](Wcs.md#tomodelpoint)
- [toModelVector](Wcs.md#tomodelvector)

## Constructors

### constructor

• **new Wcs**(`origin`, `x_axis`, `y_axis`): [`Wcs`](Wcs.md)

#### Parameters

| Name | Type |
| :------ | :------ |
| `origin` | `Float32Array` |
| `x_axis` | `Float32Array` |
| `y_axis` | `Float32Array` |

#### Returns

[`Wcs`](Wcs.md)

## Properties

### local

• **local**: `Float32Array` = `null`

局部变换矩阵（从模型到局部）

___

### model

• **model**: `Float32Array` = `null`

模型变换矩阵（从局部到模型）

___

### origin

• **origin**: `Float32Array`

原点（Float32Array，长度为3）

___

### x\_axis

• **x\_axis**: `Float32Array`

局部 X 轴（单位向量，Float32Array，长度为3）

___

### y\_axis

• **y\_axis**: `Float32Array`

局部 Y 轴（单位向量，Float32Array，长度为3）

___

### z\_axis

• **z\_axis**: `Float32Array`

局部 Z 轴（单位向量，Float32Array，长度为3）

## Methods

### toLocalPoint

▸ **toLocalPoint**(`point`): `Float32Array`

将模型空间的点转换为局部坐标

#### Parameters

| Name | Type |
| :------ | :------ |
| `point` | `Float32Array` |

#### Returns

`Float32Array`

___

### toLocalVector

▸ **toLocalVector**(`vector`): `Float32Array`

将模型空间的向量转换为局部坐标（不包含平移）

#### Parameters

| Name | Type |
| :------ | :------ |
| `vector` | `Float32Array` |

#### Returns

`Float32Array`

___

### toModelPoint

▸ **toModelPoint**(`point`): `Float32Array`

将局部坐标的点转换为模型（世界）坐标

#### Parameters

| Name | Type |
| :------ | :------ |
| `point` | `Float32Array` |

#### Returns

`Float32Array`

___

### toModelVector

▸ **toModelVector**(`vector`): `Float32Array`

将局部坐标的向量转换为模型（世界）坐标（不包含平移）

#### Parameters

| Name | Type |
| :------ | :------ |
| `vector` | `Float32Array` |

#### Returns

`Float32Array`
