docs: rebuild Input API content

This commit is contained in:
2026-03-26 17:39:53 +08:00
parent ec4edb2689
commit ce2eee32e3
54 changed files with 1108 additions and 941 deletions

View File

@@ -6,31 +6,43 @@
**头文件**: `XCEngine/Input/InputAxis.h`
**描述**: 定义 `XCEngine/Input` 子目录中的 `InputAxis` public API
**描述**: 描述一个具名逻辑轴及其正负方向按键映射
## 概述
`InputAxis.h``XCEngine/Input` 子目录 下的 public header当前页面作为平行目录中的 canonical 总览,用于汇总该头文件暴露的主要声明。
`InputAxis``InputManager` 的配置对象,而不是完整的运行时输入通道。它保存三类信息:
## 声明概览
- 轴名
- 正方向按键
- 负方向按键
| 声明 | 类型 | 说明 |
|------|------|------|
| `InputAxis` | `class` | 头文件中的公开声明。 |
此外它还有一个独立的 `m_value` 字段,但要特别注意:当前 `InputManager::GetAxis``GetAxisRaw` 都不会读取这个值,而是每次根据按键状态重新计算结果。
## 公共方法
## 当前实现中的角色
| 方法 | 描述 |
-`InputManager::Initialize` 时,用它注册默认的 `Horizontal``Vertical``Mouse X``Mouse Y` 逻辑轴。
- 在运行时,可通过 [RegisterAxis](../InputManager/RegisterAxis.md) 注册自定义具名轴。
- 当前只支持“两键一轴”模型,不支持平滑曲线、死区、灵敏度或设备组合。
## 生命周期
- [Constructor](Constructor.md) 支持默认构造和具名按键构造。
- `InputAxis` 是值类型,通常按值传给 `InputManager`
## 公开方法
| 方法 | 说明 |
|------|------|
| [InputAxis()](Constructor.md) | 构造对象。 |
| [GetName](GetName.md) | 获取相关状态或对象。 |
| [GetPositiveKey](GetPositiveKey.md) | 获取相关状态或对象。 |
| [GetNegativeKey](GetNegativeKey.md) | 获取相关状态或对象。 |
| [SetKeys](SetKeys.md) | 设置相关状态或配置。 |
| [GetValue](GetValue.md) | 获取相关状态或对象。 |
| [SetValue](SetValue.md) | 设置相关状态或配置。 |
| [Constructor](Constructor.md) | 构造一个轴配置对象。 |
| [GetName](GetName.md) | 读取轴名。 |
| [GetPositiveKey](GetPositiveKey.md) | 读取正方向按键。 |
| [GetNegativeKey](GetNegativeKey.md) | 读取负方向按键。 |
| [SetKeys](SetKeys.md) | 修改正负方向按键。 |
| [GetValue](GetValue.md) | 读取对象自身保存的值。 |
| [SetValue](SetValue.md) | 写入对象自身保存的值。 |
## 相关文档
- [当前目录](../Input.md) - 返回 `Input` 平行目录
- [API 总索引](../../../main.md) - 返回顶层索引
- [当前模块](../Input.md)
- [InputManager](../InputManager/InputManager.md)
- [Input Flow And Frame Semantics](../../../_guides/Input/Input-Flow-and-Frame-Semantics.md)