12enum class SnapMode : uint8_t
24struct TransformSnapAccum
26 glm::vec3 mRawTranslate = {};
27 glm::vec3 mAppliedTranslate = {};
28 glm::vec2 mRawTranslate2D = {};
29 glm::vec2 mRawSize2D = {};
30 float mRawAngle = 0.0f;
31 float mAppliedAngle = 0.0f;
32 float mRawScale = 0.0f;
33 float mAppliedScale = 0.0f;
34 bool mWasActive =
false;
36 void Reset() { *
this = TransformSnapAccum(); }
39namespace TransformSnap
48 float GetModalSpeedMultiplier();
50 float GetGizmoPrecisionScale();
52 float GetTranslateIncrement();
53 float GetRotateIncrement();
54 float GetScaleIncrement();
55 float GetWidgetIncrement();
58 float SnapValue(
float value,
float increment);
59 glm::vec2 SnapValue(glm::vec2 value,
float increment);
60 glm::vec3 SnapValue(glm::vec3 value,
float increment);
68 bool SnapToSurface(
Camera3D* camera,
const std::vector<Node*>& excluded, glm::vec3 rawPos, glm::vec3& outPos);