Uranium
Application Framework
 All Classes Namespaces Files Functions Variables Pages
UM.Operations.TranslateOperation.TranslateOperation Class Reference

An operation that moves a scene node. More...

Inheritance diagram for UM.Operations.TranslateOperation.TranslateOperation:
UM.Operations.Operation.Operation

Public Member Functions

def __init__
 Initialises this TranslateOperation. More...
 
def undo
 Undoes the translate operation, restoring the old transformation. More...
 
def redo
 Re-applies the translate operation. More...
 
def mergeWith
 Merges this operation with another translate operation. More...
 
def __repr__
 Returns a programmer-readable representation of this operation. More...
 
- Public Member Functions inherited from UM.Operations.Operation.Operation
def __init__
 
def undo
 Undo the operation. More...
 
def redo
 Redo the operation. More...
 
def mergeWith
 Perform operation merging. More...
 
def push
 Push the operation onto the stack. More...
 

Detailed Description

An operation that moves a scene node.

This has nothing to do with languages. It is a linear transformation on geometry.

Constructor & Destructor Documentation

def UM.Operations.TranslateOperation.TranslateOperation.__init__ (   self,
  node,
  translation,
  set_position = False 
)

Initialises this TranslateOperation.

Parameters
nodeThe node to translate.
translationA translation matrix to transform the node by.
set_positionWhether to change the position (True) or add the positions, making a relative move (False).

Member Function Documentation

def UM.Operations.TranslateOperation.TranslateOperation.__repr__ (   self)

Returns a programmer-readable representation of this operation.

Returns
A programmer-readable representation of this operation.
def UM.Operations.TranslateOperation.TranslateOperation.mergeWith (   self,
  other 
)

Merges this operation with another translate operation.

This prevents the user from having to undo multiple operations if they were not his operations.

You should ONLY merge this operation with an older operation. It is NOT symmetric.

Parameters
otherThe older translate operation to merge this operation with.
def UM.Operations.TranslateOperation.TranslateOperation.redo (   self)

Re-applies the translate operation.

def UM.Operations.TranslateOperation.TranslateOperation.undo (   self)

Undoes the translate operation, restoring the old transformation.


The documentation for this class was generated from the following file: