载入中...
搜索中...
未找到
eve::editor::TransformGizmo类 参考

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 ()
 Transform gizmo.
 
void setMode (const std::string &mode)
 Sets the mode.
 
std::string getMode () const
 Returns the mode.
 
void setSpace (const std::string &space)
 Sets the space.
 
std::string getSpace () const
 Returns the space.
 
void setSize (float size)
 Sets the size.
 
float getSize () const
 Returns the size.
 
void setPosition (float x, float y, float z)
 Sets the position.
 
float getPositionX () const
 Returns the position x.
 
float getPositionY () const
 Returns the position y.
 
float getPositionZ () const
 Returns the position z.
 
void setRotationEuler (float x, float y, float z)
 Euler radians, XYZ order.
 
float getRotationX () const
 Returns the rotation x.
 
float getRotationY () const
 Returns the rotation y.
 
float getRotationZ () const
 Returns the rotation z.
 
void setScale (float x, float y, float z)
 Sets the scale.
 
float getScaleX () const
 Returns the scale x.
 
float getScaleY () const
 Returns the scale y.
 
float getScaleZ () const
 Returns the scale z.
 
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
 Returns the bounds min x.
 
float getBoundsMinY () const
 Returns the bounds min y.
 
float getBoundsMinZ () const
 Returns the bounds min z.
 
float getBoundsMaxX () const
 Returns the bounds max x.
 
float getBoundsMaxY () const
 Returns the bounds max y.
 
float getBoundsMaxZ () const
 Returns the bounds max z.
 
void setSnapTranslate (float x, float y, float z)
 Sets the snap translate.
 
void setSnapRotate (float degrees)
 Sets the snap rotate.
 
void setSnapScale (float s)
 Sets the snap scale.
 
float getSnapTranslateX () const
 Returns the snap translate x.
 
float getSnapTranslateY () const
 Returns the snap translate y.
 
float getSnapTranslateZ () const
 Returns the snap translate z.
 
float getSnapRotate () const
 Returns the snap rotate.
 
float getSnapScale () const
 Returns the snap scale.
 
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)
 Begins drag.
 
bool updateDrag (float ox, float oy, float oz, float dx, float dy, float dz)
 Updates drag.
 
void endDrag ()
 Ends drag.
 
bool isDragging () const
 True when dragging.
 
bool isHovered () const
 True when hovered.
 
std::string getActiveAxis () const
 Returns the active axis.
 
std::string getHoverAxis () const
 Returns the hover axis.
 
void rebuildParts ()
 Rebuild draw parts for current mode/space (call after TRS/mode change).
 
int getPartCount () const
 Returns the part count.
 
std::string getPartKind (int index) const
 Returns the part kind.
 
std::string getPartAxis (int index) const
 Returns the part axis.
 
float getPartColorR (int index) const
 Returns the part color r.
 
float getPartColorG (int index) const
 Returns the part color g.
 
float getPartColorB (int index) const
 Returns the part color b.
 
float getPartColorA (int index) const
 Returns the part color a.
 
float getPartOriginX (int index) const
 Returns the part origin x.
 
float getPartOriginY (int index) const
 Returns the part origin y.
 
float getPartOriginZ (int index) const
 Returns the part origin z.
 
float getPartDirX (int index) const
 Returns the part dir x.
 
float getPartDirY (int index) const
 Returns the part dir y.
 
float getPartDirZ (int index) const
 Returns the part dir z.
 
float getPartLength (int index) const
 Returns the part length.
 
float getPartRadius (int index) const
 Returns the part radius.
 

详细描述

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 第 18 行定义.

构造及析构函数说明

◆ TransformGizmo()

eve::editor::TransformGizmo::TransformGizmo ( )

Transform gizmo.

在文件 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 
)

Begins drag.

在文件 TransformGizmo.cpp 第 423 行定义.

引用了 dx, dy, dz, ox, oy, rebuildParts(), side, t , 以及 up.

被这些函数引用 eve::editor::GizmoManager::beginDrag().

◆ endDrag()

void eve::editor::TransformGizmo::endDrag ( )

Ends drag.

在文件 TransformGizmo.cpp 第 571 行定义.

引用了 rebuildParts().

被这些函数引用 eve::editor::GizmoManager::detach() , 以及 eve::editor::GizmoManager::endDrag().

◆ getActiveAxis()

std::string eve::editor::TransformGizmo::getActiveAxis ( ) const
inline

Returns the active axis.

在文件 TransformGizmo.h 第 119 行定义.

◆ getBoundsMaxX()

float eve::editor::TransformGizmo::getBoundsMaxX ( ) const
inline

Returns the bounds max x.

在文件 TransformGizmo.h 第 74 行定义.

◆ getBoundsMaxY()

float eve::editor::TransformGizmo::getBoundsMaxY ( ) const
inline

Returns the bounds max y.

在文件 TransformGizmo.h 第 76 行定义.

◆ getBoundsMaxZ()

float eve::editor::TransformGizmo::getBoundsMaxZ ( ) const
inline

Returns the bounds max z.

在文件 TransformGizmo.h 第 78 行定义.

◆ getBoundsMinX()

float eve::editor::TransformGizmo::getBoundsMinX ( ) const
inline

Returns the bounds min x.

在文件 TransformGizmo.h 第 68 行定义.

◆ getBoundsMinY()

float eve::editor::TransformGizmo::getBoundsMinY ( ) const
inline

Returns the bounds min y.

在文件 TransformGizmo.h 第 70 行定义.

◆ getBoundsMinZ()

float eve::editor::TransformGizmo::getBoundsMinZ ( ) const
inline

Returns the bounds min z.

在文件 TransformGizmo.h 第 72 行定义.

◆ getHoverAxis()

std::string eve::editor::TransformGizmo::getHoverAxis ( ) const
inline

Returns the hover axis.

在文件 TransformGizmo.h 第 121 行定义.

◆ getMatrix()

float eve::editor::TransformGizmo::getMatrix ( int  index) const

Column-major matrix element 0..15 of current TRS.

在文件 TransformGizmo.cpp 第 85 行定义.

引用了 index, m , 以及 p.

◆ getMode()

std::string eve::editor::TransformGizmo::getMode ( ) const
inline

Returns the mode.

在文件 TransformGizmo.h 第 26 行定义.

◆ getPartAxis()

std::string eve::editor::TransformGizmo::getPartAxis ( int  index) const

Returns the part axis.

在文件 TransformGizmo.cpp 第 585 行定义.

引用了 index.

◆ getPartColorA()

float eve::editor::TransformGizmo::getPartColorA ( int  index) const

Returns the part color a.

在文件 TransformGizmo.cpp 第 601 行定义.

引用了 index.

◆ getPartColorB()

float eve::editor::TransformGizmo::getPartColorB ( int  index) const

Returns the part color b.

在文件 TransformGizmo.cpp 第 597 行定义.

引用了 index.

◆ getPartColorG()

float eve::editor::TransformGizmo::getPartColorG ( int  index) const

Returns the part color g.

在文件 TransformGizmo.cpp 第 593 行定义.

引用了 index.

◆ getPartColorR()

float eve::editor::TransformGizmo::getPartColorR ( int  index) const

Returns the part color r.

在文件 TransformGizmo.cpp 第 589 行定义.

引用了 index.

◆ getPartCount()

int eve::editor::TransformGizmo::getPartCount ( ) const
inline

Returns the part count.

在文件 TransformGizmo.h 第 127 行定义.

◆ getPartDirX()

float eve::editor::TransformGizmo::getPartDirX ( int  index) const

Returns the part dir x.

在文件 TransformGizmo.cpp 第 617 行定义.

引用了 index.

◆ getPartDirY()

float eve::editor::TransformGizmo::getPartDirY ( int  index) const

Returns the part dir y.

在文件 TransformGizmo.cpp 第 621 行定义.

引用了 index.

◆ getPartDirZ()

float eve::editor::TransformGizmo::getPartDirZ ( int  index) const

Returns the part dir z.

在文件 TransformGizmo.cpp 第 625 行定义.

引用了 index.

◆ getPartKind()

std::string eve::editor::TransformGizmo::getPartKind ( int  index) const

Returns the part kind.

在文件 TransformGizmo.cpp 第 581 行定义.

引用了 index.

◆ getPartLength()

float eve::editor::TransformGizmo::getPartLength ( int  index) const

Returns the part length.

在文件 TransformGizmo.cpp 第 629 行定义.

引用了 index.

◆ getPartOriginX()

float eve::editor::TransformGizmo::getPartOriginX ( int  index) const

Returns the part origin x.

在文件 TransformGizmo.cpp 第 605 行定义.

引用了 index.

◆ getPartOriginY()

float eve::editor::TransformGizmo::getPartOriginY ( int  index) const

Returns the part origin y.

在文件 TransformGizmo.cpp 第 609 行定义.

引用了 index.

◆ getPartOriginZ()

float eve::editor::TransformGizmo::getPartOriginZ ( int  index) const

Returns the part origin z.

在文件 TransformGizmo.cpp 第 613 行定义.

引用了 index.

◆ getPartRadius()

float eve::editor::TransformGizmo::getPartRadius ( int  index) const

Returns the part radius.

在文件 TransformGizmo.cpp 第 633 行定义.

引用了 index.

◆ getPositionX()

float eve::editor::TransformGizmo::getPositionX ( ) const
inline

Returns the position x.

在文件 TransformGizmo.h 第 41 行定义.

◆ getPositionY()

float eve::editor::TransformGizmo::getPositionY ( ) const
inline

Returns the position y.

在文件 TransformGizmo.h 第 43 行定义.

◆ getPositionZ()

float eve::editor::TransformGizmo::getPositionZ ( ) const
inline

Returns the position z.

在文件 TransformGizmo.h 第 45 行定义.

◆ getRotationX()

float eve::editor::TransformGizmo::getRotationX ( ) const
inline

Returns the rotation x.

在文件 TransformGizmo.h 第 50 行定义.

◆ getRotationY()

float eve::editor::TransformGizmo::getRotationY ( ) const
inline

Returns the rotation y.

在文件 TransformGizmo.h 第 52 行定义.

◆ getRotationZ()

float eve::editor::TransformGizmo::getRotationZ ( ) const
inline

Returns the rotation z.

在文件 TransformGizmo.h 第 54 行定义.

◆ getScaleX()

float eve::editor::TransformGizmo::getScaleX ( ) const
inline

Returns the scale x.

在文件 TransformGizmo.h 第 59 行定义.

◆ getScaleY()

float eve::editor::TransformGizmo::getScaleY ( ) const
inline

Returns the scale y.

在文件 TransformGizmo.h 第 61 行定义.

◆ getScaleZ()

float eve::editor::TransformGizmo::getScaleZ ( ) const
inline

Returns the scale z.

在文件 TransformGizmo.h 第 63 行定义.

◆ getSize()

float eve::editor::TransformGizmo::getSize ( ) const
inline

Returns the size.

在文件 TransformGizmo.h 第 36 行定义.

◆ getSnapRotate()

float eve::editor::TransformGizmo::getSnapRotate ( ) const
inline

Returns the snap rotate.

在文件 TransformGizmo.h 第 93 行定义.

◆ getSnapScale()

float eve::editor::TransformGizmo::getSnapScale ( ) const
inline

Returns the snap scale.

在文件 TransformGizmo.h 第 95 行定义.

◆ getSnapTranslateX()

float eve::editor::TransformGizmo::getSnapTranslateX ( ) const
inline

Returns the snap translate x.

在文件 TransformGizmo.h 第 87 行定义.

◆ getSnapTranslateY()

float eve::editor::TransformGizmo::getSnapTranslateY ( ) const
inline

Returns the snap translate y.

在文件 TransformGizmo.h 第 89 行定义.

◆ getSnapTranslateZ()

float eve::editor::TransformGizmo::getSnapTranslateZ ( ) const
inline

Returns the snap translate z.

在文件 TransformGizmo.h 第 91 行定义.

◆ getSpace()

std::string eve::editor::TransformGizmo::getSpace ( ) const
inline

Returns the space.

在文件 TransformGizmo.h 第 31 行定义.

◆ isDragging()

bool eve::editor::TransformGizmo::isDragging ( ) const
inline

True when dragging.

在文件 TransformGizmo.h 第 115 行定义.

◆ isHovered()

bool eve::editor::TransformGizmo::isHovered ( ) const
inline

True when hovered.

在文件 TransformGizmo.h 第 117 行定义.

◆ 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 第 323 行定义.

引用了 b, best, c, dx, dy, dz, ox, oy, rebuildParts(), s, score , 以及 t.

被这些函数引用 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 行定义.

引用了 c, kind, local, origin , 以及 p.

被这些函数引用 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)

Sets the 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 
)

Sets the position.

在文件 TransformGizmo.cpp 第 57 行定义.

引用了 rebuildParts(), x, y , 以及 z.

◆ setRotationEuler()

void eve::editor::TransformGizmo::setRotationEuler ( float  x,
float  y,
float  z 
)

Euler radians, XYZ order.

在文件 TransformGizmo.cpp 第 62 行定义.

引用了 rebuildParts(), x, y , 以及 z.

◆ setScale()

void eve::editor::TransformGizmo::setScale ( float  x,
float  y,
float  z 
)

Sets the scale.

在文件 TransformGizmo.cpp 第 67 行定义.

引用了 rebuildParts(), x, y , 以及 z.

◆ setSize()

void eve::editor::TransformGizmo::setSize ( float  size)

Sets the size.

在文件 TransformGizmo.cpp 第 51 行定义.

引用了 rebuildParts() , 以及 size.

◆ setSnapRotate()

void eve::editor::TransformGizmo::setSnapRotate ( float  degrees)

Sets the snap rotate.

在文件 TransformGizmo.cpp 第 81 行定义.

引用了 degrees.

◆ setSnapScale()

void eve::editor::TransformGizmo::setSnapScale ( float  s)

Sets the snap scale.

在文件 TransformGizmo.cpp 第 83 行定义.

引用了 s.

◆ setSnapTranslate()

void eve::editor::TransformGizmo::setSnapTranslate ( float  x,
float  y,
float  z 
)

Sets the snap translate.

在文件 TransformGizmo.cpp 第 79 行定义.

引用了 x, y , 以及 z.

◆ setSpace()

void eve::editor::TransformGizmo::setSpace ( const std::string &  space)

Sets the space.

在文件 TransformGizmo.cpp 第 43 行定义.

引用了 rebuildParts().

◆ updateDrag()

bool eve::editor::TransformGizmo::updateDrag ( float  ox,
float  oy,
float  oz,
float  dx,
float  dy,
float  dz 
)

Updates drag.

在文件 TransformGizmo.cpp 第 484 行定义.

引用了 ang, c, dx, dy, dz, end, from, hit, ox, oy, rebuildParts(), start , 以及 to.

被这些函数引用 eve::editor::GizmoManager::updateDrag().


该类的文档由以下文件生成: