| name = "object",
transform = None, pos = None, rot = None, scale = None, pivot = None, offsetTransform = None, parent = None, mass = None, material = None, visible = True, auto_insert = True) |
name is the name of the object which can be used to identify the object.
transform is the initial transformation that should be applied to the object. Alternatively, you can specify the individual components pos, rot and scale.
pivot is the pivot point of the object. This is the 4th column of the offset transformation. You can also specify the entire offset transformation using the offsetTransform argument.
parent is the parent world object and determines at which position
in the scene graph the new object is added. If parent is None
the object will become a child of the world root. The parent argument
is only used if auto_insert is True.
mass is the mass of this object (this does not include the children objects).
material describes the appearance of the object. It can be either a single Material object or a sequence of Material objects.
visible is a flag that determines whether the object is visible or not. This only affects the geometry of this WorldObject, it is not inherited by children objects.
The object will be inserted into the scene automatically if
auto_insert is set to True.
A WorldObject always has the following slots:
| Slot | Type | Access | Description |
|---|---|---|---|
angularvel_slot |
vec3 | rw | Angular velocity |
cog_slot |
vec3 | r | Center of gravity |
inertiatensor_slot |
mat3 | r | Inertia tensor |
linearvel_slot |
vec3 | rw | Linear velocity |
mass_slot |
float | rw | Mass of the local geometry |
pos_slot |
vec3 | rw | Position |
rot_slot |
mat3 | rw | Orientation |
scale_slot |
vec3 | rw | Scaling |
totalmass_slot |
float | r | Total mass (including the children) |
transform_slot |
mat4 | rw | Object transformation |
visible_slot |
bool | rw | Visibility flag |
worldtransform_slot |
mat4 | rw | World transformation |
None if there is no
visible geometry. Geometry objects can be shared between different
world objects. This value can be read and written.
None. You can
only read this attribute.
Note: Note that in contrast to the transform slot, the worldtransform is not influenced by the offset transformation.
| ) |
| ) |
| ) |
| P) |
| ) |
| num) |
| idx=0) |
None if the given index
is out of range or there is no material stored at that position.
| mat, idx=0) |
| ) |
| ) |
| name) |
| name) |
| child) |
| child) |
| name) |