Encapsulated models

Encapsulated models

Virtual worlds can quickly become very complex as there are often many hierarchically structured objects that send events to each other and to external programs. However, objects sometimes have common features that can be abstracted, creating generalised models in order to handle complexity.

An encapsulated model is a self-contained, customisable, reusable, component. By encapsulating the geometry and behaviour of complete components into modules, the complexity of virtual environments can be efficiently managed and there is potential to reuse components within and across projects.

Encapsulation techniques make the creation of complex virtual worlds easier since sophisticated components can be created and tested individually and then be interfaced to each other in the complete virtual world.

Since multiple instances can be made of components, encapsulation techniques also reduce code redundancy and overall file sizes, making the resulting files more efficient to maintain and distribute.

It is not necessary to create complete self-contained models with both geometry and behaviour predefined. In some cases, it is the behaviour of a specific type of object that we want to encapsulate. In such cases, the geometry that we want to give a specific behaviour can be passed as one of the attributes of the encapsulated model (i.e. the geometry can be a customisable component of the encapsulated model).

Encapsulated models can be used for practically anything, from a complete animated model of a small machine (with predefined geometry) to a fractal trees (where the geometry is generated procedurally) to bouncing objects (where the geometry and data about the object are supplied as attributes). Virtual humans and avatars are typically created as encapsulated objects so that both their behaviour and geometry can easily be reused.

In summary, encapsulation can be used to create reusable components that can be used to manage the complexity of a virtual environment.




Michael Louka, October 23, 2001