Files
XCEngine/docs/api/XCEngine/Components/TransformComponent/Rotate.md

48 lines
1.1 KiB
Markdown

# TransformComponent::Rotate
公开方法,详见头文件声明。
该方法在 `XCEngine/Components/TransformComponent.h` 中提供了 2 个重载,当前页面统一汇总这些公开声明。
## 重载 1: 声明
```cpp
void Rotate(const Math::Vector3& eulers, Space relativeTo = Space::Self);
```
**参数:**
- `eulers` - 参数语义详见头文件声明。
- `relativeTo` - 参数语义详见头文件声明。
**返回:** `void` - 无返回值。
## 重载 2: 声明
```cpp
void Rotate(const Math::Vector3& axis, float angle, Space relativeTo = Space::Self);
```
**参数:**
- `axis` - 参数语义详见头文件声明。
- `angle` - 参数语义详见头文件声明。
- `relativeTo` - 参数语义详见头文件声明。
**返回:** `void` - 无返回值。
**示例:**
```cpp
#include <XCEngine/Components/TransformComponent.h>
void Example() {
XCEngine::Components::TransformComponent object;
// 根据上下文补齐参数后调用 TransformComponent::Rotate(...)。
(void)object;
}
```
## 相关文档
- [返回类总览](TransformComponent.md)
- [返回模块目录](../Components.md)