|
EIGEN_MAKE_ALIGNED_OPERATOR_NEW | Gizmo (Engine::Scene::Component *c, const Core::Transform &worldTo, const Core::Transform &t, Mode mode) |
|
void | show (bool on) |
|
virtual void | updateTransform (Mode mode, const Core::Transform &worldTo, const Core::Transform &t)=0 |
| Called every time the underlying transform may have changed.
|
|
virtual void | selectConstraint (int drawableIndex)=0 |
| Called when one of the drawables of the gizmo has been selected.
|
|
virtual bool | isSelected ()=0 |
| return the selection state of the gizmo: true if the gizmo is selected, false if not.
|
|
virtual void | setInitialState (const Core::Asset::Camera &cam, const Core::Vector2 &initialXY)=0 |
|
virtual Core::Transform | mouseMove (const Core::Asset::Camera &cam, const Core::Vector2 &nextXY, bool stepped=false, bool whole=false)=0 |
|
|
static bool | findPointOnAxis (const Core::Asset::Camera &cam, const Core::Vector3 &origin, const Core::Vector3 &axis, const Core::Vector2 &pix, Core::Vector3 &pointOut, std::vector< Scalar > &hits) |
| Find a mouse-designed point on a 3D axis.
|
|
static bool | findPointOnPlane (const Core::Asset::Camera &cam, const Core::Vector3 &origin, const Core::Vector3 &axis, const Core::Vector2 &pix, Core::Vector3 &pointOut, std::vector< Scalar > &hits) |
| Find a mouse-designed point on a 3D plane.
|
|
static std::shared_ptr< Engine::Rendering::RenderTechnique > | makeRenderTechnique (int color) |
|
Base class for gizmos, i.e. graphic tools to manipulate a transform.
- Todo:
- There is a lot of duplicated code shared between the different Gizmos (rotate, translate, scale). This is due to the fact that they all have Render Objects in xyz directions, and which can be selected with the same logic. An alternative would be to have an intermediate class , e.g.
XYZGizmo
which performs all the generic operations (e.g. render object coloring in selectConstraint and mouseMove).
Definition at line 41 of file Gizmo.hpp.