Uranium
Application Framework
Loading...
Searching...
No Matches
UM.Operations.RotateOperation.RotateOperation Class Reference
Inheritance diagram for UM.Operations.RotateOperation.RotateOperation:
UM.Operations.Operation.Operation

Public Member Functions

None __init__ (self, SceneNode node, "Quaternion" rotation, Optional[Vector] rotate_around_point=None)
 
None undo (self)
 
None redo (self)
 
Union[bool, "RotateOperation"] mergeWith (self, "RotateOperation" other)
 
str __repr__ (self)
 
- Public Member Functions inherited from UM.Operations.Operation.Operation
None push (self)
 

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__()

None UM.Operations.RotateOperation.RotateOperation.__init__ ( self,
SceneNode node,
"Quaternion" rotation,
Optional[Vector] rotate_around_point = None )
Initialises the operation.

:param node: The node to rotate.
:param rotation: A transformation quaternion that rotates a space. This
rotation is applied on the node.
:param rotate_around_point: The point to rotate around.

Reimplemented from UM.Operations.Operation.Operation.

Member Function Documentation

◆ __repr__()

str UM.Operations.RotateOperation.RotateOperation.__repr__ ( self)
Returns a programmer-readable representation of this operation.

:return: A programmer-readable representation of this operation.

◆ mergeWith()

Union[bool, "RotateOperation"] UM.Operations.RotateOperation.RotateOperation.mergeWith ( self,
"RotateOperation" 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.

:param other: The older RotateOperation to merge this with.
:return: A combination of the two rotate operations.

Reimplemented from UM.Operations.Operation.Operation.

◆ redo()

None UM.Operations.RotateOperation.RotateOperation.redo ( self)
Redoes the rotation, rotating the node again.

Reimplemented from UM.Operations.Operation.Operation.

◆ undo()

None 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: