realXtend / tundra

realXtend Tundra SDK, a 3D virtual world application platform.
www.realxtend.org
Apache License 2.0
84 stars 70 forks source link

CompositeScene #701

Closed antont closed 11 years ago

antont commented 11 years ago

CompositeScene script, planned / testing for the Oulu city model composing but also a provided here for general purposes. Is meant as a generic basic 'subscene' or 'sceneasset' implementation, to compose a TXML from many TXMLs.

Uses a single EC_Script instance for a manager app which finds all the part-placeholder entities with a DynamicComponent called ScenePart. Figured that this is the best way for two reasons: there's only one script running, and for the modeler who creates the master scene to instantiate the parts, they only need to add one component (the DC) to make a placeholder entity instanciate a part.

There would be many things to improve in the code, in terms of adding features, such as reloading and removing parts etc. But the basic feat works ok now (for one run). Feel free to improve.

Note that support for hierarchies and possibly loading sub-txmls is planned for the scene core code later this yet (related to a project that should start any day now) but this is an interim solution for now.

A screenshot of the quite ugly but hopefully informative demo setup with two parts loaded: http://ubuntuone.com/0XWCPK4k9P2KmulgoYmaBq