3D transform gizmo (Three.js TransformControls + ImGuizmo style). Owns TRS + optional local bounds; interaction via world-space rays. Host renders using getPart* descriptors — no GPU dependency. 更多...
#include <TransformGizmo.h>
Public 成员函数 | |
| TransformGizmo () | |
| void | setMode (const std::string &mode) |
| std::string | getMode () const |
| void | setSpace (const std::string &space) |
| std::string | getSpace () const |
| void | setSize (float size) |
| float | getSize () const |
| void | setPosition (float x, float y, float z) |
| float | getPositionX () const |
| float | getPositionY () const |
| float | getPositionZ () const |
| void | setRotationEuler (float x, float y, float z) |
| Euler radians, XYZ order. | |
| float | getRotationX () const |
| float | getRotationY () const |
| float | getRotationZ () const |
| void | setScale (float x, float y, float z) |
| float | getScaleX () const |
| float | getScaleY () const |
| float | getScaleZ () const |
| void | setBounds (float minX, float minY, float minZ, float maxX, float maxY, float maxZ) |
| Local AABB extents for bound mode (relative to object origin). | |
| float | getBoundsMinX () const |
| float | getBoundsMinY () const |
| float | getBoundsMinZ () const |
| float | getBoundsMaxX () const |
| float | getBoundsMaxY () const |
| float | getBoundsMaxZ () const |
| void | setSnapTranslate (float x, float y, float z) |
| void | setSnapRotate (float degrees) |
| void | setSnapScale (float s) |
| float | getSnapTranslateX () const |
| float | getSnapTranslateY () const |
| float | getSnapTranslateZ () const |
| float | getSnapRotate () const |
| float | getSnapScale () const |
| float | getMatrix (int index) const |
| Column-major matrix element 0..15 of current TRS. | |
| std::string | pick (float ox, float oy, float oz, float dx, float dy, float dz) |
| Ray pick against active mode handles. Returns axis id: "x"|"y"|"z"|"xy"|"yz"|"xz"|"xyz"|"bx"|…|"bz"|"" . | |
| bool | beginDrag (const std::string &axis, float ox, float oy, float oz, float dx, float dy, float dz) |
| bool | updateDrag (float ox, float oy, float oz, float dx, float dy, float dz) |
| void | endDrag () |
| bool | isDragging () const |
| bool | isHovered () const |
| std::string | getActiveAxis () const |
| std::string | getHoverAxis () const |
| void | rebuildParts () |
| Rebuild draw parts for current mode/space (call after TRS/mode change). | |
| int | getPartCount () const |
| std::string | getPartKind (int index) const |
| std::string | getPartAxis (int index) const |
| float | getPartColorR (int index) const |
| float | getPartColorG (int index) const |
| float | getPartColorB (int index) const |
| float | getPartColorA (int index) const |
| float | getPartOriginX (int index) const |
| float | getPartOriginY (int index) const |
| float | getPartOriginZ (int index) const |
| float | getPartDirX (int index) const |
| float | getPartDirY (int index) const |
| float | getPartDirZ (int index) const |
| float | getPartLength (int index) const |
| float | getPartRadius (int index) const |
详细描述
3D transform gizmo (Three.js TransformControls + ImGuizmo style). Owns TRS + optional local bounds; interaction via world-space rays. Host renders using getPart* descriptors — no GPU dependency.
在文件 TransformGizmo.h 第 16 行定义.
构造及析构函数说明
◆ TransformGizmo()
| eve::editor::TransformGizmo::TransformGizmo | ( | ) |
在文件 TransformGizmo.cpp 第 33 行定义.
引用了 rebuildParts().
成员函数说明
◆ beginDrag()
| bool eve::editor::TransformGizmo::beginDrag | ( | const std::string & | axis, |
| float | ox, | ||
| float | oy, | ||
| float | oz, | ||
| float | dx, | ||
| float | dy, | ||
| float | dz | ||
| ) |
在文件 TransformGizmo.cpp 第 431 行定义.
引用了 rebuildParts().
◆ endDrag()
| void eve::editor::TransformGizmo::endDrag | ( | ) |
在文件 TransformGizmo.cpp 第 571 行定义.
引用了 rebuildParts().
被这些函数引用 eve::editor::GizmoManager::detach() , 以及 eve::editor::GizmoManager::endDrag().
◆ getActiveAxis()
|
inline |
在文件 TransformGizmo.h 第 79 行定义.
◆ getBoundsMaxX()
|
inline |
在文件 TransformGizmo.h 第 50 行定义.
◆ getBoundsMaxY()
|
inline |
在文件 TransformGizmo.h 第 51 行定义.
◆ getBoundsMaxZ()
|
inline |
在文件 TransformGizmo.h 第 52 行定义.
◆ getBoundsMinX()
|
inline |
在文件 TransformGizmo.h 第 47 行定义.
◆ getBoundsMinY()
|
inline |
在文件 TransformGizmo.h 第 48 行定义.
◆ getBoundsMinZ()
|
inline |
在文件 TransformGizmo.h 第 49 行定义.
◆ getHoverAxis()
|
inline |
在文件 TransformGizmo.h 第 80 行定义.
◆ getMatrix()
| float eve::editor::TransformGizmo::getMatrix | ( | int | index | ) | const |
◆ getMode()
|
inline |
在文件 TransformGizmo.h 第 21 行定义.
◆ getPartAxis()
| std::string eve::editor::TransformGizmo::getPartAxis | ( | int | index | ) | const |
在文件 TransformGizmo.cpp 第 585 行定义.
◆ getPartColorA()
| float eve::editor::TransformGizmo::getPartColorA | ( | int | index | ) | const |
在文件 TransformGizmo.cpp 第 601 行定义.
◆ getPartColorB()
| float eve::editor::TransformGizmo::getPartColorB | ( | int | index | ) | const |
在文件 TransformGizmo.cpp 第 597 行定义.
◆ getPartColorG()
| float eve::editor::TransformGizmo::getPartColorG | ( | int | index | ) | const |
在文件 TransformGizmo.cpp 第 593 行定义.
◆ getPartColorR()
| float eve::editor::TransformGizmo::getPartColorR | ( | int | index | ) | const |
在文件 TransformGizmo.cpp 第 589 行定义.
◆ getPartCount()
|
inline |
在文件 TransformGizmo.h 第 85 行定义.
◆ getPartDirX()
| float eve::editor::TransformGizmo::getPartDirX | ( | int | index | ) | const |
在文件 TransformGizmo.cpp 第 617 行定义.
◆ getPartDirY()
| float eve::editor::TransformGizmo::getPartDirY | ( | int | index | ) | const |
在文件 TransformGizmo.cpp 第 621 行定义.
◆ getPartDirZ()
| float eve::editor::TransformGizmo::getPartDirZ | ( | int | index | ) | const |
在文件 TransformGizmo.cpp 第 625 行定义.
◆ getPartKind()
| std::string eve::editor::TransformGizmo::getPartKind | ( | int | index | ) | const |
在文件 TransformGizmo.cpp 第 581 行定义.
◆ getPartLength()
| float eve::editor::TransformGizmo::getPartLength | ( | int | index | ) | const |
在文件 TransformGizmo.cpp 第 629 行定义.
◆ getPartOriginX()
| float eve::editor::TransformGizmo::getPartOriginX | ( | int | index | ) | const |
在文件 TransformGizmo.cpp 第 605 行定义.
◆ getPartOriginY()
| float eve::editor::TransformGizmo::getPartOriginY | ( | int | index | ) | const |
在文件 TransformGizmo.cpp 第 609 行定义.
◆ getPartOriginZ()
| float eve::editor::TransformGizmo::getPartOriginZ | ( | int | index | ) | const |
在文件 TransformGizmo.cpp 第 613 行定义.
◆ getPartRadius()
| float eve::editor::TransformGizmo::getPartRadius | ( | int | index | ) | const |
在文件 TransformGizmo.cpp 第 633 行定义.
◆ getPositionX()
|
inline |
在文件 TransformGizmo.h 第 30 行定义.
◆ getPositionY()
|
inline |
在文件 TransformGizmo.h 第 31 行定义.
◆ getPositionZ()
|
inline |
在文件 TransformGizmo.h 第 32 行定义.
◆ getRotationX()
|
inline |
在文件 TransformGizmo.h 第 36 行定义.
◆ getRotationY()
|
inline |
在文件 TransformGizmo.h 第 37 行定义.
◆ getRotationZ()
|
inline |
在文件 TransformGizmo.h 第 38 行定义.
◆ getScaleX()
|
inline |
在文件 TransformGizmo.h 第 41 行定义.
◆ getScaleY()
|
inline |
在文件 TransformGizmo.h 第 42 行定义.
◆ getScaleZ()
|
inline |
在文件 TransformGizmo.h 第 43 行定义.
◆ getSize()
|
inline |
在文件 TransformGizmo.h 第 27 行定义.
◆ getSnapRotate()
|
inline |
在文件 TransformGizmo.h 第 60 行定义.
◆ getSnapScale()
|
inline |
在文件 TransformGizmo.h 第 61 行定义.
◆ getSnapTranslateX()
|
inline |
在文件 TransformGizmo.h 第 57 行定义.
◆ getSnapTranslateY()
|
inline |
在文件 TransformGizmo.h 第 58 行定义.
◆ getSnapTranslateZ()
|
inline |
在文件 TransformGizmo.h 第 59 行定义.
◆ getSpace()
|
inline |
在文件 TransformGizmo.h 第 24 行定义.
◆ isDragging()
|
inline |
在文件 TransformGizmo.h 第 77 行定义.
◆ isHovered()
|
inline |
在文件 TransformGizmo.h 第 78 行定义.
◆ pick()
| std::string eve::editor::TransformGizmo::pick | ( | float | ox, |
| float | oy, | ||
| float | oz, | ||
| float | dx, | ||
| float | dy, | ||
| float | dz | ||
| ) |
Ray pick against active mode handles. Returns axis id: "x"|"y"|"z"|"xy"|"yz"|"xz"|"xyz"|"bx"|…|"bz"|"" .
在文件 TransformGizmo.cpp 第 335 行定义.
引用了 b, c, rebuildParts() , 以及 s.
被这些函数引用 eve::editor::GizmoManager::pick().
◆ rebuildParts()
| void eve::editor::TransformGizmo::rebuildParts | ( | ) |
Rebuild draw parts for current mode/space (call after TRS/mode change).
在文件 TransformGizmo.cpp 第 137 行定义.
被这些函数引用 beginDrag(), endDrag(), pick(), setBounds(), setMode(), setPosition(), setRotationEuler(), setScale(), setSize(), setSpace(), TransformGizmo() , 以及 updateDrag().
◆ setBounds()
| void eve::editor::TransformGizmo::setBounds | ( | float | minX, |
| float | minY, | ||
| float | minZ, | ||
| float | maxX, | ||
| float | maxY, | ||
| float | maxZ | ||
| ) |
Local AABB extents for bound mode (relative to object origin).
在文件 TransformGizmo.cpp 第 72 行定义.
引用了 rebuildParts().
◆ setMode()
| void eve::editor::TransformGizmo::setMode | ( | const std::string & | mode | ) |
在文件 TransformGizmo.cpp 第 35 行定义.
引用了 rebuildParts().
被这些函数引用 eve::editor::GizmoManager::GizmoManager() , 以及 eve::editor::GizmoManager::pick().
◆ setPosition()
| void eve::editor::TransformGizmo::setPosition | ( | float | x, |
| float | y, | ||
| float | z | ||
| ) |
在文件 TransformGizmo.cpp 第 57 行定义.
引用了 rebuildParts(), x, y , 以及 z.
◆ setRotationEuler()
| void eve::editor::TransformGizmo::setRotationEuler | ( | float | x, |
| float | y, | ||
| float | z | ||
| ) |
◆ setScale()
| void eve::editor::TransformGizmo::setScale | ( | float | x, |
| float | y, | ||
| float | z | ||
| ) |
在文件 TransformGizmo.cpp 第 67 行定义.
引用了 rebuildParts(), x, y , 以及 z.
◆ setSize()
| void eve::editor::TransformGizmo::setSize | ( | float | size | ) |
在文件 TransformGizmo.cpp 第 51 行定义.
引用了 rebuildParts().
◆ setSnapRotate()
| void eve::editor::TransformGizmo::setSnapRotate | ( | float | degrees | ) |
在文件 TransformGizmo.cpp 第 81 行定义.
引用了 degrees.
◆ setSnapScale()
| void eve::editor::TransformGizmo::setSnapScale | ( | float | s | ) |
在文件 TransformGizmo.cpp 第 83 行定义.
引用了 s.
◆ setSnapTranslate()
| void eve::editor::TransformGizmo::setSnapTranslate | ( | float | x, |
| float | y, | ||
| float | z | ||
| ) |
在文件 TransformGizmo.cpp 第 79 行定义.
◆ setSpace()
| void eve::editor::TransformGizmo::setSpace | ( | const std::string & | space | ) |
在文件 TransformGizmo.cpp 第 43 行定义.
引用了 rebuildParts().
◆ updateDrag()
| bool eve::editor::TransformGizmo::updateDrag | ( | float | ox, |
| float | oy, | ||
| float | oz, | ||
| float | dx, | ||
| float | dy, | ||
| float | dz | ||
| ) |
在文件 TransformGizmo.cpp 第 488 行定义.
引用了 c, rebuildParts() , 以及 s.
该类的文档由以下文件生成:
- src/modules/editor/TransformGizmo.h
- src/modules/editor/TransformGizmo.cpp