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

Public Member Functions

 __init__ (self, parent)
 render (self, renderer)
Public Member Functions inherited from UM.Scene.SceneNode.SceneNode
None __init__ (self, Optional["SceneNode"] parent=None, bool visible=True, str name="", str node_id="")
"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)
None setEnabled (self, bool enable)
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)

Protected Member Functions

 _onGlobalContainerStackChanged (self)
 _updateTexture (self)
 _onPlatformLoaded (self, job)
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

 _load_platform_job = None
# Failed to compile(it already adds a log entry about this then). _shader = None
 _texture = None
 _global_container_stack = None
 _onGlobalContainerStackChanged
 _onPlatformLoaded
 _updateTexture
Protected Attributes inherited from UM.Scene.SceneNode.SceneNode
list _children = []
 _mesh_data = None
 _transformation = Matrix()
 _position = Vector()
 _scale = Vector(1.0, 1.0, 1.0)
 _shear = Vector(0.0, 0.0, 0.0)
 _mirror = Vector(1.0, 1.0, 1.0)
 _orientation = Quaternion()
Matrix _world_transformation = Matrix()
 _cached_normal_matrix = Matrix()
 _derived_position = Vector()
 _derived_orientation = Quaternion()
 _derived_scale = Vector()
 _parent = parent
bool _enabled = True
bool _selectable = False
bool _calculate_aabb = True
 _aabb = None
 _bounding_box_mesh = None
 _visible = visible
 _name = name
 _id = node_id
list _decorators = []
dict _settings = {}
 _onParentChanged
 Signals.

Additional Inherited Members

Public Attributes inherited from UM.Scene.SceneNode.SceneNode
dict metadata = {}
 source_mime_type = None
Static Public Attributes inherited from UM.Scene.SceneNode.SceneNode
 decoratorsChanged = Signal()
 parentChanged = Signal()
 meshDataChanged = Signal()
 childrenChanged = Signal()
 transformationChanged = Signal()
 boundingBoxChanged = Signal()

Detailed Description

Platform is a special case of Scene node. It renders a specific model as the platform of the machine.
A specialised class is used due to the differences in how it needs to rendered and the fact that a platform
can have a Texture.
It also handles the re-loading of the mesh when the active machine is changed.

Member Function Documentation

◆ render()

UM.Scene.Platform.Platform.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.


The documentation for this class was generated from the following file:
  • UM/Scene/Platform.py