!XT (Code) Update copyright headers in Code/Sandbox.
[CRYENGINE.git] / Code / Sandbox / Plugins / EditorCommon / Gizmos / ITransformManipulator.h
blobd698cd018d72427069656c82dfce74c84685cb1c
1 // Copyright 2001-2018 Crytek GmbH / Crytek Group. All rights reserved.
3 #ifndef __ITransformManipulator_h__
4 #define __ITransformManipulator_h__
5 #pragma once
7 #include "CrySandbox/CrySignal.h"
9 //////////////////////////////////////////////////////////////////////////
10 // ITransformManipulator implementation.
11 //////////////////////////////////////////////////////////////////////////
12 struct EDITOR_COMMON_API ITransformManipulator
14 virtual Matrix34 GetTransform() const = 0;
15 virtual void SetCustomTransform(bool on, const Matrix34& m) = 0;
16 // invalidate. Manipulator will request transform from owner during next draw
17 virtual void Invalidate() = 0;
19 CCrySignal <void (IDisplayViewport*, ITransformManipulator*, const Vec2i&, int)> signalBeginDrag;
20 CCrySignal <void (IDisplayViewport*, ITransformManipulator*, const Vec2i&, const Vec3&, int)> signalDragging;
21 CCrySignal <void (IDisplayViewport*, ITransformManipulator*)> signalEndDrag;
24 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
25 // ITransform is an interface for classes that own a transform manipulator. Basically it includes callbacks so that transform manipulators
26 // can get the position and orientation of its components when it is tagged for an update
27 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
28 struct EDITOR_COMMON_API ITransformManipulatorOwner
30 // called at update time if reference coordinate system is local or parent. Return true if there's a valid matrix else
31 // world orientation (identity matrix) is used instead
32 virtual bool GetManipulatorMatrix(RefCoordSys coordSys, Matrix34& tm) { return false; }
33 // called at update time when the transform manipulator is tagged as invalid
34 virtual void GetManipulatorPosition(Vec3& position) = 0;
35 // called during display and hit test of manipulator. This way owners can deactivate their manipulator under some circumstances
36 virtual bool IsManipulatorVisible() { return true; };
38 #endif // __ITransformManipulator_h__