Uranium
Application Framework
Loading...
Searching...
No Matches
UM.Scene.ToolHandle.ToolHandle Class Reference
Inheritance diagram for UM.Scene.ToolHandle.ToolHandle:
UM.Scene.SceneNode.SceneNode

Classes

class  ExtraWidgets
 

Public Member Functions

 __init__ (self, parent=None)
 
Optional[MeshDatagetLineMesh (self)
 
None setLineMesh (self, MeshData mesh)
 
Optional[MeshDatagetSolidMesh (self)
 
None setSolidMesh (self, MeshData mesh)
 
Optional[MeshDatagetSelectionMesh (self)
 
None setSelectionMesh (self, MeshData mesh)
 
bool render (self, renderer)
 
None setActiveAxis (self, Optional[int] axis)
 
Optional[int] getActiveAxis (self)
 
 isAxis (self, value)
 
 getExtraWidgetsColorMap (self)
 
None buildMesh (self)
 
 setEnabled (self, bool enable)
 
- Public Member Functions inherited from UM.Scene.SceneNode.SceneNode
"SceneNode" __deepcopy__ (self, Dict[int, object] memo)
 
None setCenterPosition (self, Vector center)
 
Optional["SceneNode"] getParent (self)
 
Vector getMirror (self)
 
None setMirror (self, vector)
 
Optional[MeshDatagetBoundingBoxMesh (self)
 
None calculateBoundingBoxMesh (self)
 
bool collidesWithBbox (self, AxisAlignedBox check_bbox)
 
None addDecorator (self, SceneNodeDecorator decorator)
 
List[SceneNodeDecoratorgetDecorators (self)
 
Optional[SceneNodeDecoratorgetDecorator (self, type dec_type)
 
 removeDecorators (self)
 
None removeDecorator (self, type dec_type)
 
Any callDecoration (self, str function, *args, **kwargs)
 
bool hasDecoration (self, str function)
 
str getName (self)
 
None setName (self, str name)
 
str getId (self)
 
None setId (self, str node_id)
 
int getDepth (self)
 
None setParent (self, Optional["SceneNode"] scene_node)
 
bool isVisible (self)
 
None setVisible (self, bool visible)
 
Optional[MeshDatagetMeshData (self)
 
Optional[MeshDatagetMeshDataTransformed (self)
 
Optional[numpy.ndarray] getMeshDataTransformedVertices (self)
 
Optional[numpy.ndarray] getMeshDataTransformedNormals (self)
 
None setMeshData (self, Optional[MeshData] mesh_data)
 
None addChild (self, "SceneNode" scene_node)
 
None removeChild (self, "SceneNode" child)
 
None removeAllChildren (self)
 
List["SceneNode"] getChildren (self)
 
bool hasChildren (self)
 
List["SceneNode"] getAllChildren (self)
 
Matrix getCachedNormalMatrix (self)
 
Matrix getWorldTransformation (self, copy=True)
 
Matrix getLocalTransformation (self, copy=True)
 
 setTransformation (self, Matrix transformation)
 
Quaternion getOrientation (self)
 
Quaternion getWorldOrientation (self)
 
None rotate (self, Quaternion rotation, int transform_space=TransformSpace.Local)
 
None setOrientation (self, Quaternion orientation, int transform_space=TransformSpace.Local)
 
Vector getScale (self)
 
Vector getWorldScale (self)
 
None scale (self, Vector scale, int transform_space=TransformSpace.Local)
 
None setScale (self, Vector scale, int transform_space=TransformSpace.Local)
 
Vector getPosition (self)
 
Vector getWorldPosition (self)
 
None translate (self, Vector translation, int transform_space=TransformSpace.Local)
 
None setPosition (self, Vector position, int transform_space=TransformSpace.Local)
 
None lookAt (self, Vector target, Vector up=Vector.Unit_Y)
 
bool isEnabled (self)
 
bool isSelectable (self)
 
None setSelectable (self, bool select)
 
Optional[AxisAlignedBoxgetBoundingBox (self)
 
None setCalculateBoundingBox (self, bool calculate)
 
Vector getShear (self)
 
Any getSetting (self, str key, Any default_value=None)
 
None setSetting (self, str key, Any value)
 
None invertNormals (self)
 
str __str__ (self)
 

Static Public Attributes

int NoAxis = 1
 
int XAxis = 2
 
int YAxis = 3
 
int ZAxis = 4
 
int AllAxis = 5
 
 DisabledSelectionColor = Color(0.5, 0.5, 0.5, 1.0)
 
 XAxisSelectionColor = Color(1.0, 0.0, 0.0, 1.0)
 
 YAxisSelectionColor = Color(0.0, 0.0, 1.0, 1.0)
 
 ZAxisSelectionColor = Color(0.0, 1.0, 0.0, 1.0)
 
 AllAxisSelectionColor = Color(1.0, 1.0, 1.0, 1.0)
 
- Static Public Attributes inherited from UM.Scene.SceneNode.SceneNode
 decoratorsChanged = Signal()
 
 parentChanged = Signal()
 
 meshDataChanged = Signal()
 
 childrenChanged = Signal()
 
 transformationChanged = Signal()
 
 boundingBoxChanged = Signal()
 

Protected Member Functions

None _onSelectionCenterChanged (self)
 
None _onEngineCreated (self)
 
 _getUnusedColor (self)
 
- Protected Member Functions inherited from UM.Scene.SceneNode.SceneNode
None _onParentChanged (self, Optional["SceneNode"] node)
 
None _onMeshDataChanged (self)
 
None _updateCachedNormalMatrix (self)
 
None _transformChanged (self)
 
None _updateLocalTransformation (self)
 
None _updateWorldTransformation (self)
 
None _updateTransformation (self)
 
None _resetAABB (self)
 
None _calculateAABB (self)
 

Protected Attributes

 _disabled_axis_color
 
 _x_axis_color
 
 _y_axis_color
 
 _z_axis_color
 
 _all_axis_color
 
 _axis_color_map
 
 _extra_widgets_color_map
 
 _scene
 
 _solid_mesh
 
 _line_mesh
 
 _selection_mesh
 
 _shader
 
 _active_axis
 
 _auto_scale
 
 _enabled
 
 _onSelectionCenterChanged
 
 _onEngineCreated
 
- Protected Attributes inherited from UM.Scene.SceneNode.SceneNode
 _children
 
 _mesh_data
 
 _transformation
 
 _position
 
 _scale
 
 _shear
 
 _mirror
 
 _orientation
 
 _world_transformation
 
 _cached_normal_matrix
 
 _derived_position
 
 _derived_orientation
 
 _derived_scale
 
 _parent
 
 _enabled
 
 _selectable
 
 _calculate_aabb
 
 _aabb
 
 _bounding_box_mesh
 
 _visible
 
 _name
 
 _id
 
 _decorators
 
 _settings
 
 _onParentChanged
 Signals.
 

Additional Inherited Members

- Public Attributes inherited from UM.Scene.SceneNode.SceneNode
 metadata
 
 source_mime_type
 

Detailed Description

A tool handle is a object in the scene that gives queues for what the tool it is
'paired' with can do. ToolHandles are, for example, used for translation, rotation & scale handles.
They can also be used as actual objects to interact with (in the case of translation,
pressing one arrow of the toolhandle locks the translation in that direction)

Constructor & Destructor Documentation

◆ __init__()

UM.Scene.ToolHandle.ToolHandle.__init__ ( self,
parent = None )
Construct a scene node.

:param parent: The parent of this node (if any). Only a root node should have None as a parent.
:param visible: Is the SceneNode (and thus, all its children) visible?
:param name: Name of the SceneNode.

Reimplemented from UM.Scene.SceneNode.SceneNode.

Member Function Documentation

◆ render()

bool UM.Scene.ToolHandle.ToolHandle.render ( self,
renderer )
Can be overridden by child nodes if they need to perform special rendering.
If you need to handle rendering in a special way, for example for tool handles,
you can override this method and render the node. Return True to prevent the
view from rendering any attached mesh data.

:param renderer: The renderer object to use for rendering.

:return: False if the view should render this node, True if we handle our own rendering.

Reimplemented from UM.Scene.SceneNode.SceneNode.

◆ setEnabled()

UM.Scene.ToolHandle.ToolHandle.setEnabled ( self,
bool enable )
Set whether this SceneNode is enabled.

:param enable: True if this object should be enabled, False if not.
:sa isEnabled

Reimplemented from UM.Scene.SceneNode.SceneNode.


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