SceneObject
- class compas.scene.SceneObject[source]
Bases:
object
Base class for all scene objects.
- Parameters:
- itemAny
The item which should be visualized using the created SceneObject.
- **kwargsdict
Additional keyword arguments for constructing SceneObject.
- Attributes:
- item
compas.data.Data
The item which should be visualized using the created SceneObject.
- namestr
The name of the scene object. Note that is is not the same as the name of underlying data item, since different scene objects can refer to the same data item.
- node
compas.scene.SceneObjectNode
The node in the scene tree which represents the scene object.
- guidslist[object]
The GUIDs of the items drawn in the visualization context.
- parent
compas.scene.SceneObject
The parent scene object.
- childrenlist[
compas.scene.SceneObject
] The child scene objects.
- frame
compas.geometry.Frame
The local frame of the scene object, in relation to its parent frame.
- transformation
compas.geometry.Transformation
The local transformation of the scene object in relation to its frame.
- worldtransformation
compas.geometry.Transformation
The transformation of the scene object in world coordinates.
- color
compas.colors.Color
The color of the object.
- contrastcolor
compas.colors.Color
, readon-only The contrastcolor wrt to the color. This is a 50% darket or lighter version of the color, depending on whether the color is light or dark.
- opacityfloat
The opacity of the object.
- showbool
Flag for showing or hiding the object. Default is
True
.- settingsdict
The settings including necessary attributes for reconstructing the scene object.
- item
Methods
Add a child item to the scene object.
The main clearing method.
The main drawing method.