neuray API Programmer's Manual

mi::neuraylib::IProxy Class Reference

[Scene graph structure]

Description

The Proxy is an element that can be used to represent a sub-tree of scene elements on a Bridge server without ever having to load those elements on the client. The Proxy element has no visual representation on the client and is therefore only useful for server-side renderings. The sub-scene must be stored as a Bridge snapshot in the server side cache prior to rendering a scene with a Proxy element, and the id of the snapshot must be set by calling IProxy::set_snapshot_id(). The snapshot must contain an element with the same name as the Proxy and this element will replace the Proxy on the server. Any dependencies of that element must either be part of the snapshot or be already present in the scene. The Proxy element can be a child of IGroup and IInstance elements.

Note that any attributes set on the IProxy element will be ignored. This is because it will be replaced with another element on the server, and that element will have the attributes it had when saved in the Bridge snapshot.

Public Member Functions

virtual const char* get_snapshot_id() const =0
Returns the currently set snapshot id. More...
virtual Sint32 set_snapshot_id( const char* snapshot_id) =0
Sets the snapshot id. More...

Member Functions

virtual const char* mi::​neuraylib::​IProxy::get_snapshot_id() const [pure virtual]

Returns the currently set snapshot id.

Returns

The set snapshot id.

virtual Sint32 mi::​neuraylib::​IProxy::set_snapshot_id( const char* snapshot_id) [pure virtual]

Sets the snapshot id.

Parameters

snapshot_id
The id of the snapshot that contains the data for the proxy.

Returns

  • 0: Success.
  • -1: Invalid parameters (NULL pointer).