parent_matrix is an instance variable for storing parent transformation matrix. Whenever assembly transformation matrix is changed, a parent_matrix of its parts is changed too.
local_to_scene_transform is an instance variable for storing local-to-scene transformation matrix. This matrix is used to build transformation matrix of an assembly in global coordinate space by concatenating it with the local transformation matrix of an assembly.
scene_to_local_transform is an instance variable for storing scene-to-local transformation matrix. This matrix is used to build reverse transformation matrix of an assembly in global coordinate space by concatenating it with the local reverse transformation matrix of an assembly.
copy:argument copies an instance and gives it the old name concatenated with the argument. This is done recursively so that parts of the new assembly have names obtained by concatenation of instance part names with the argument.
front=(+) sets (adds) the front instance variable and updates matrices.
geometries? reterns instance name if its class name is not assembly, but some subclass of assembly (sphere, cone, box, ...), otherwise forwards the message to its parts.
local_to_scene_transform=argument sets the instance variable local_to_scene_transform to the argument which should be a 16 elements array.
local_to_scene_transform? returns the value of local_to_scene_transform (16 elements array).
matrices! updates local transformation matrix and computes local_to_scene_transform.
matrix? returns global transformation matrix (concatenation of its local and local_to_scene_transform matrices).
orientation=(+)argument sets (adds) the orientation instance variable and updates matrices.
orientation? returns the orientation instance variable.
origin=(+)argument sets (adds) the origin instance variable and updates matrices.
origin? returns the origin instance variable.
parent_matrix=argument sets the parent_matrix of an instance and propagates it to parts.
parent_matrix? returns the parent_matrix of an instance.
parts=(+,-)argument sets (adds) parts of an instance. The argument is a list of assembly names.
parts? returns the list of part names.
position=(+)argument sets (adds) the position instance variable and updates matrices.
position? returns position instance variable.
reverse_matrix? returns the reverse_matrix of an instance.
rotate:angle rotates the instance around its axis by angle degrees and updates matrices.
rotate_wxyz:(angle,x,y,z) rotates the instance around (x,y,z) axis by angle degrees and updates matrices.
rotate_x:angle rotates the instance around x axis by angle degrees and updates matrices.
rotate_y:angle rotates the instance around y axis by angle degrees and updates matrices.
rotate_z:angle rotates the instance around z axis by angle degrees and updates matrices.
scale=(+)argument sets (adds) the value of instance variable scale.
scene_to_local_transform=argument sets the instance variable scene_to_local_transform of an instance.
scene_to_local_transform? returns the instance variable scene_to_local_transform of an instance.
up=(+)argument sets (adds) the value of up vector for an instance.
to be useful, this script should be augmented
with modeller specification for each assembly */ assembly new: top parts = (part1, part2, part3) ; assembly new: part1 parts=(part11,part12) ; assembly new: part2 parts=(part21,part22) ;
assembly new: part3 parts=(part31,part32) ;