Editor API
UnigineEditor public API
Editor::SetNodeTransformAction Class Reference

This class is used to represent any user's action setting node transforms. More...

#include <Actions.h>

Inheritance diagram for Editor::SetNodeTransformAction:
Editor::Action

Public Member Functions

 SetNodeTransformAction (const Unigine::NodePtr &node, const Unigine::Math::Mat4 &transform)
 Creates a new set node transform action for the specified node. More...
 
 ~SetNodeTransformAction () override
 
void apply () override
 Applies the set node transform action. More...
 
void undo () override
 Reverts the set node transform action. More...
 
void redo () override
 Redoes the previously undone set node transform action (reverses the undo method). More...
 
bool validate () override
 This method allows action to do some internal cleanup. Return value indicates whether the action is still sane. Whenever it returns false asset system will delete invalid action for good. More...
 
Unigine::NodePtr getNode () const
 
- Public Member Functions inherited from Editor::Action
 Action ()
 
virtual ~Action ()
 
virtual bool modifiesWorld () const
 Indicates whether the action brings any changes to the scene. Actions like selection, for example, change nothing and shouldn't set world‘s "dirty state". For such actions this method would return 'false’. More...
 

Detailed Description

This class is used to represent any user's action setting node transforms.

Constructor & Destructor Documentation

◆ SetNodeTransformAction()

Editor::SetNodeTransformAction::SetNodeTransformAction ( const Unigine::NodePtr &  node,
const Unigine::Math::Mat4 &  transform 
)

Creates a new set node transform action for the specified node.

Parameters
nodeNodes affected by the set node transform action.
transformNew transformation to be set for the specified node.

◆ ~SetNodeTransformAction()

Editor::SetNodeTransformAction::~SetNodeTransformAction ( )
override

Member Function Documentation

◆ apply()

void Editor::SetNodeTransformAction::apply ( )
overridevirtual

Applies the set node transform action.

Implements Editor::Action.

◆ getNode()

Unigine::NodePtr Editor::SetNodeTransformAction::getNode ( ) const

◆ redo()

void Editor::SetNodeTransformAction::redo ( )
overridevirtual

Redoes the previously undone set node transform action (reverses the undo method).

Implements Editor::Action.

◆ undo()

void Editor::SetNodeTransformAction::undo ( )
overridevirtual

Reverts the set node transform action.

Implements Editor::Action.

◆ validate()

bool Editor::SetNodeTransformAction::validate ( )
overridevirtual

This method allows action to do some internal cleanup. Return value indicates whether the action is still sane. Whenever it returns false asset system will delete invalid action for good.

Reimplemented from Editor::Action.