载入中...
搜索中...
未找到
eve::graphics::Transform类 参考
矩阵变换栈(2D/3D):旋转/缩放/平移 + push/pop。 更多...
#include <Transform.h>
类 eve::graphics::Transform 继承关系图:
Public 成员函数 | |
| Transform () | |
| virtual | ~Transform () |
| void | rotate (float r, glm::vec2 p) |
| 2D 绕点 (p) 旋转 r(弧度)。 | |
| void | scale (float all) |
| 2D 均匀/非均匀缩放。 | |
| void | scale (glm::vec2 s) |
| void | translate (glm::vec2 v) |
| 2D 平移。 | |
| void | origin () |
| 重置为单位矩阵。 | |
| void | rotate3d (float r, glm::vec3 v) |
| 3D 绕轴旋转 / 缩放 / 平移。 | |
| void | scale3d (glm::vec3 s) |
| void | translate3d (glm::vec3 v) |
| void | push () |
| 压栈 / 弹栈 / 取栈顶矩阵。 | |
| void | pop () |
| glm::mat4 | top () |
Protected 属性 | |
| std::stack< glm::mat4 > | matrix |
详细描述
矩阵变换栈(2D/3D):旋转/缩放/平移 + push/pop。
在文件 Transform.h 第 10 行定义.
构造及析构函数说明
◆ Transform()
| eve::graphics::Transform::Transform | ( | ) |
在文件 Transform.cpp 第 7 行定义.
引用了 origin().
◆ ~Transform()
|
inlinevirtual |
在文件 Transform.h 第 13 行定义.
成员函数说明
◆ origin()
| void eve::graphics::Transform::origin | ( | ) |
◆ pop()
| void eve::graphics::Transform::pop | ( | ) |
在文件 Transform.cpp 第 57 行定义.
引用了 matrix.
◆ push()
| void eve::graphics::Transform::push | ( | ) |
◆ rotate()
| void eve::graphics::Transform::rotate | ( | float | r, |
| glm::vec2 | p | ||
| ) |
2D 绕点 (p) 旋转 r(弧度)。
在文件 Transform.cpp 第 11 行定义.
◆ rotate3d()
| void eve::graphics::Transform::rotate3d | ( | float | r, |
| glm::vec3 | v | ||
| ) |
3D 绕轴旋转 / 缩放 / 平移。
在文件 Transform.cpp 第 32 行定义.
◆ scale() [1/2]
| void eve::graphics::Transform::scale | ( | float | all | ) |
2D 均匀/非均匀缩放。
在文件 Transform.cpp 第 15 行定义.
◆ scale() [2/2]
| void eve::graphics::Transform::scale | ( | glm::vec2 | s | ) |
在文件 Transform.cpp 第 19 行定义.
◆ scale3d()
| void eve::graphics::Transform::scale3d | ( | glm::vec3 | s | ) |
在文件 Transform.cpp 第 36 行定义.
◆ top()
| glm::mat4 eve::graphics::Transform::top | ( | ) |
在文件 Transform.cpp 第 61 行定义.
引用了 matrix.
◆ translate()
| void eve::graphics::Transform::translate | ( | glm::vec2 | v | ) |
2D 平移。
在文件 Transform.cpp 第 23 行定义.
◆ translate3d()
| void eve::graphics::Transform::translate3d | ( | glm::vec3 | v | ) |
在文件 Transform.cpp 第 40 行定义.
类成员变量说明
◆ matrix
|
protected |
在文件 Transform.h 第 36 行定义.
该类的文档由以下文件生成:
- src/modules/graphics/Transform.h
- src/modules/graphics/Transform.cpp