v2.37
|
|
In order to better understand the API of the Renga system, it is useful to read about the basic principles of the organization and internal mechanisms of the Renga API.
In order to develop the API without breaking binary compatibility with already released plugins, interface inheritance should not be used. Therefore, to extend some basic Renga API interface with additional functionality an "additional" interface is used.
Additional interface is an interface that can be obtained from a certain base interface by type casting through Renga internal mechanisms, rather than through standard mechanisms of object-oriented language. Another words developer receives some Renga object as a basic interface and tries to receive additional interface from it. If the object supports this additional interface the cast will succeed.
Since the Renga API is built using COM technology, the standard method QueryInterface() is used to obtain "additional" interfaces. In C#, the use of this method is hidden behind the standard language casting methods.
The interface from which a particular interface can be obtained is described in the Renga API documentation.
In order to get Assembly model objects, you can get an assembly instance as a basic IEntity interface and cast it to the IModel interface.
C++
C#
In order to get Material properties, you can get a material instance as a basic IEntity interface and cast it to the IPropertyContainer interface.
C++
C#
In order to get object level settings, you can get an object instance as a basic IModelObject interface and cast it to the ILevelObject interface.
C++
C#