Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Separation of Data from Their Operations

Advantages of Separation of Data and Operations

The rigorous separation of the scenegraph's data from the operations to be performed on that data is a central NVSG design concept. This approach provides the highest flexibility for all fields of NVSG applications, such as CAD applications, Viewer applications, and clusters, to name a few.

This weak coupling also make it very easy for developers to extend NVSG to meet their needs. For example, adding a special operation doesn't require extending any of the NVSG core classes. Conversely, extending the NVSG core classes by means of overloading won't break existing operations.

What Does Separation of Data and Operations Mean?

One can think of a scenegraph as a container holding heterogeneous data - that is, scenegraph class objects. The scenegraph classes themselves encapsulate specific data, but do not know how to perform actions on that data. For example, the Triangles class encapsulates geometry data and additional topological information on how to connect the geometry data to form a geometric object. However, the Triangles class does not know how to render the encapsulated geometry.

An operation on the scenegraph data is performed by means of a traverser. A traverser serves as a link between the scenegraph and a defined operation - such as rendering - to be performed on the scenegraph. More precisely, a traverser iterates the scenegraph and performs a specific operation on each component of the scenegraph. In this way, a traverser fullfills two tasks:

Back to


Generated on Tue Mar 1 13:20:21 2005 for NVSGSDK by NVIDIA