1#include <Gui/TransformEditor/TransformEditor.hpp>
3#include <Engine/Scene/Component.hpp>
4#include <Engine/Scene/Entity.hpp>
8void TransformEditor::setEditable(
const Engine::Scene::ItemEntry& ent ) {
13void TransformEditor::getTransform() {
16 m_transform = m_currentEdit.
m_entity->getTransform();
24bool TransformEditor::canEdit()
const {
30void TransformEditor::setTransform(
const Ra::Core::Transform& tr ) {
37Core::Transform TransformEditor::getWorldTransform()
const {
38 return m_currentEdit.
isEntityNode() ? Ra::Core::Transform::Identity()
39 : m_currentEdit.m_entity->getTransform();
42TransformEditor::~TransformEditor() {
43 setEditable( Engine::Scene::ItemEntry() );
virtual void setTransform(const Core::Utils::Index &, const Core::Transform &)
Set the new transform associated with the RO index key.
virtual Core::Transform getTransform(const Core::Utils::Index &) const
Get the transform associated with the given RO index key.
virtual bool canEdit(const Core::Utils::Index &) const
Returns true if a transform can be edited with the render object index given as a key.
hepler function to manage enum as underlying types in VariableSet
Ra::Core::Utils::Index m_roIndex
RO index of the represented object.
bool isValid() const
Returns true if the item represents any valid object.
bool isSelectable() const
Returns true if the item can be selected.
bool isComponentNode() const
Returns true if the item represents a component.
Entity * m_entity
The entity represented by the item, or owning the object represented.
bool isEntityNode() const
Returns true if the item represents an entity.
bool isRoNode() const
Returns true if the item represents a render object.