Uranium
Application Framework
Loading...
Searching...
No Matches
UM.Operations.RotateOperation.RotateOperation Class Reference

Operation that rotates a scene node. More...

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

Public Member Functions

 __init__ (self, node, rotation, rotate_around_point=Vector(0, 0, 0))
 Initialises the operation.
 
 LOG_MATRIX (self, str_matrix_name, matrix)
 
 LOG_QUATERNION (self, str_quaternion_name, quaternion)
 
 LOG_VECTOR (self, str_vector_name, vector)
 
 undo (self)
 Undoes the rotation, rotating the node back.
 
 redo (self)
 Redoes the rotation, rotating the node again.
 
 mergeWith (self, other)
 Merges this operation with another RotateOperation.
 
 __repr__ (self)
 Returns a programmer-readable representation of this operation.
 
- Public Member Functions inherited from UM.Operations.Operation.Operation
 __init__ (self)
 
 undo (self)
 Undo the operation.
 
 redo (self)
 Redo the operation.
 
 mergeWith (self, other)
 Perform operation merging.
 
 push (self)
 Push the operation onto the stack.
 

Protected Attributes

 _node
 
 _old_transformation
 
 _rotation
 
 _rotate_around_point
 
- Protected Attributes inherited from UM.Operations.Operation.Operation
 _timestamp
 
 _always_merge
 

Detailed Description

Operation that rotates a scene node.

Constructor & Destructor Documentation

◆ __init__()

UM.Operations.RotateOperation.RotateOperation.__init__ (   self,
  node,
  rotation,
  rotate_around_point = Vector(0, 0, 0) 
)

Initialises the operation.

Parameters
nodeThe node to rotate.
rotationA transformation matrix that rotates a space. This rotation is applied on the node.
kwargsKey-word arguments, including:
  • rotate_around_point: A point around which to rotate the node.

Reimplemented from UM.Operations.Operation.Operation.

Member Function Documentation

◆ __repr__()

UM.Operations.RotateOperation.RotateOperation.__repr__ (   self)

Returns a programmer-readable representation of this operation.

Returns
A programmer-readable representation of this operation.

◆ mergeWith()

UM.Operations.RotateOperation.RotateOperation.mergeWith (   self,
  other 
)

Merges this operation with another RotateOperation.

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 RotateOperation to merge this with.
Returns
A combination of the two rotate operations.

Reimplemented from UM.Operations.Operation.Operation.

◆ redo()

UM.Operations.RotateOperation.RotateOperation.redo (   self)

Redoes the rotation, rotating the node again.

Reimplemented from UM.Operations.Operation.Operation.

◆ undo()

UM.Operations.RotateOperation.RotateOperation.undo (   self)

Undoes the rotation, rotating the node back.

Reimplemented from UM.Operations.Operation.Operation.


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