pioneerspacesim/pioneer — pull request #2007 by Luomu (2013-01-27 00:30:30+00:00)
Title: SGModel instancing

Model::MakeInstance can be used to create a unique instance of a model, so appearance customization, attachments and animations work correctly. Users of an instance are responsible for deleting it. An instance is not necessary if only a static model is needed (see: city buildings).

What is shared:
- Geometries
- Materials
- Collision geometry
- Thrusters
- ModelNodes

What is copied per instance:
- Groups
- MatrixTransforms (because of animation and attachments)
- Animation data
- Label3Ds
- Billboards

This could be improved by detecting more static nodes in Loader, toggling a shareable/copyable hint and checking that in Node::Clone.
Future work is welcome, especially for avoiding copying of animation data :)