Uranium
Application Framework
|
Public Member Functions | |
def | __init__ |
def | __deepcopy__ |
def | setCenterPosition |
def | getParent (self) |
def | getMirror (self) |
def | setMirror (self, vector) |
def | getBoundingBoxMesh (self) |
def | calculateBoundingBoxMesh (self) |
def | collidesWithBbox |
def | addDecorator |
def | getDecorators (self) |
def | getDecorator |
def | removeDecorators (self) |
def | removeDecorator |
def | callDecoration |
def | hasDecoration |
def | getName (self) |
def | setName |
def | getId (self) |
def | setId |
def | getDepth (self) |
def | setParent |
def | isVisible (self) |
def | setVisible |
def | getMeshData (self) |
def | getMeshDataTransformed (self) |
def | getMeshDataTransformedVertices (self) |
def | getMeshDataTransformedNormals (self) |
def | setMeshData |
def | addChild |
def | removeChild |
def | removeAllChildren (self) |
def | getChildren (self) |
def | hasChildren (self) |
def | getAllChildren (self) |
def | getCachedNormalMatrix (self) |
def | getWorldTransformation |
def | getLocalTransformation |
def | setTransformation |
def | getOrientation (self) |
def | getWorldOrientation (self) |
def | rotate |
def | setOrientation |
def | getScale (self) |
def | getWorldScale (self) |
def | scale |
def | setScale |
def | getPosition (self) |
def | getWorldPosition (self) |
def | translate |
def | setPosition |
def | lookAt |
def | render (self, renderer) |
def | isEnabled (self) |
def | setEnabled |
def | isSelectable (self) |
def | setSelectable |
def | getBoundingBox (self) |
def | setCalculateBoundingBox |
def | getShear (self) |
def | getSetting |
def | setSetting |
def | invertNormals (self) |
def | __str__ (self) |
Public Attributes | |
metadata | |
source_mime_type | |
Static Public Attributes | |
tuple | decoratorsChanged = Signal() |
tuple | parentChanged = Signal() |
tuple | meshDataChanged = Signal() |
tuple | childrenChanged = Signal() |
tuple | transformationChanged = Signal() |
tuple | boundingBoxChanged = Signal() |
A scene node object. These objects can hold a mesh and multiple children. Each node has a transformation matrix that maps it it's parents space to the local space (it's inverse maps local space to parent). SceneNodes can be "Decorated" by adding SceneNodeDecorator objects. These decorators can add functionality to scene nodes. :sa SceneNodeDecorator :todo Add unit testing
def UM.Scene.SceneNode.SceneNode.__str__ | ( | self, | |
str | |||
) |
String output for debugging.
def UM.Scene.SceneNode.SceneNode.calculateBoundingBoxMesh | ( | self, | |
None | |||
) |
(re)Calculate the bounding box mesh.
def UM.Scene.SceneNode.SceneNode.getAllChildren | ( | self, | |
List, | |||
SceneNode | |||
) |
Get list of all children (including it's children children children etc.) :returns: list ALl children in this 'tree'
def UM.Scene.SceneNode.SceneNode.getBoundingBox | ( | self, | |
Optional, | |||
AxisAlignedBox | |||
) |
Get the bounding box of this node and its children.
def UM.Scene.SceneNode.SceneNode.getBoundingBoxMesh | ( | self, | |
Optional, | |||
MeshData | |||
) |
Get the MeshData of the bounding box :returns: :type{MeshData} Bounding box mesh.
def UM.Scene.SceneNode.SceneNode.getChildren | ( | self, | |
List, | |||
SceneNode | |||
) |
Get the list of direct children :returns: List of children
def UM.Scene.SceneNode.SceneNode.getDecorators | ( | self, | |
List, | |||
SceneNodeDecorator | |||
) |
Get all SceneNodeDecorators that decorate this SceneNode. :return: list of all SceneNodeDecorators.
def UM.Scene.SceneNode.SceneNode.getDepth | ( | self, | |
int | |||
) |
How many nodes is this node removed from the root? :return: Steps from root (0 means it -is- the root).
def UM.Scene.SceneNode.SceneNode.getLocalTransformation | ( | self, | |
copy = True , |
|||
Matrix | |||
) |
Returns the local transformation with respect to its parent. (from parent to local) :returns transformation 4x4 (homogeneous) matrix
def UM.Scene.SceneNode.SceneNode.getMeshData | ( | self, | |
Optional, | |||
MeshData | |||
) |
Get the (original) mesh data from the scene node/object. :returns: MeshData
def UM.Scene.SceneNode.SceneNode.getMeshDataTransformed | ( | self, | |
Optional, | |||
MeshData | |||
) |
Get the transformed mesh data from the scene node/object, based on the transformation of scene nodes wrt root. If this node is a group, it will recursively concatenate all child nodes/objects. :returns: MeshData
def UM.Scene.SceneNode.SceneNode.getMeshDataTransformedNormals | ( | self, | |
Optional, | |||
numpy, | |||
ndarray | |||
) |
Get the transformed normals from this scene node/object, based on the transformation of scene nodes wrt root. If this node is a group, it will recursively concatenate all child nodes/objects. :return: numpy.ndarray
def UM.Scene.SceneNode.SceneNode.getMeshDataTransformedVertices | ( | self, | |
Optional, | |||
numpy, | |||
ndarray | |||
) |
Get the transformed vertices from this scene node/object, based on the transformation of scene nodes wrt root. If this node is a group, it will recursively concatenate all child nodes/objects. :return: numpy.ndarray
def UM.Scene.SceneNode.SceneNode.getOrientation | ( | self, | |
Quaternion | |||
) |
Get the local orientation value.
def UM.Scene.SceneNode.SceneNode.getParent | ( | self, | |
Optional, | |||
SceneNode | |||
) |
Get the parent of this node. If the node has no parent, it is the root node. :returns: SceneNode if it has a parent and None if it's the root node.
def UM.Scene.SceneNode.SceneNode.getPosition | ( | self, | |
Vector | |||
) |
Get the local position.
def UM.Scene.SceneNode.SceneNode.getScale | ( | self, | |
Vector | |||
) |
Get the local scaling value.
def UM.Scene.SceneNode.SceneNode.getWorldPosition | ( | self, | |
Vector | |||
) |
Get the position of this scene node relative to the world.
def UM.Scene.SceneNode.SceneNode.getWorldTransformation | ( | self, | |
copy = True , |
|||
Matrix | |||
) |
Computes and returns the transformation from world to local space. :returns: 4x4 transformation matrix
def UM.Scene.SceneNode.SceneNode.isEnabled | ( | self, | |
bool | |||
) |
Get whether this SceneNode is enabled, that is, it can be modified in any way.
def UM.Scene.SceneNode.SceneNode.isSelectable | ( | self, | |
bool | |||
) |
Get whether this SceneNode can be selected. :note This will return false if isEnabled() returns false.
def UM.Scene.SceneNode.SceneNode.isVisible | ( | self, | |
bool | |||
) |
Get the visibility of this node. The parents visibility overrides the visibility. TODO: Let renderer actually use the visibility to decide whether to render or not.
def UM.Scene.SceneNode.SceneNode.removeAllChildren | ( | self, | |
None | |||
) |
Removes all children and its children's children.
def UM.Scene.SceneNode.SceneNode.removeDecorators | ( | self | ) |
Remove all decorators
def UM.Scene.SceneNode.SceneNode.render | ( | self, | |
renderer, | |||
bool | |||
) |
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.