public sealed class MeshGizmoTargetA mesh's selected elements, as one thing the gizmo can move.
Remarks
EntityGizmoTarget's counterpart for doc 24's P2, and it is deliberately one target rather than one per position. The gizmo's arithmetic recomputes every target from where it was at mouse-down — see TransformGizmo — so a hundred selected vertices as a hundred targets would work and would rotate each of them about its own centre, which is not what rotating a face means. One target whose origin is the selection's centre is what makes rotate and scale behave.
⚠ The whole transform is applied to the covered positions, in the mesh's own space. A gizmo hands back a world position, a world rotation and a scale; what a mesh wants is where each of its corners went. So the delta is assembled here, taken into local space through the entity's inverse, and applied about the centre the drag started from.
⚠ The entity does not move, and that is the difference from dragging it. Moving a wall in face mode moves the wall's geometry inside the entity; the entity's transform is what object mode drags. Confusing the two is how a designer ends up with a corridor whose pivot is nowhere near it.
Fields and properties (7)
public IReadOnlyList<int> PositionsWhich positions this drag is moving, and where each of them started.
public IReadOnlyList<Vector3> BeforeWhere each of them was when the drag began.
public Vector3 PositionWhere it is, in world space.
public Quaternion Rotationpublic Vector3 ScaleHow big it is, in its parent's space.
public Matrix4x4 ParentToWorldpublic bool IsEmptyWhether there is anything to move.
Methods (2)
public MeshGizmoTarget(SceneDocument document, MeshEdit editing)Views the selected elements of the mesh being edited as a gizmo target.
public GizmoEdit? Record(in GizmoDrag drag)
Used by (2)
- EditorApplicationVixen.Editor.App
- MeshEditTestsVixen.Editor.SceneView.Tests