NVIDIA Iray API — software examples nvidia_logo_transpbg.gif Up
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mi::neuraylib::INeuray Class Referenceabstract

This is an object representing the Iray library. Only one object of this type will exist at a time. It is used for configuration, startup and shutdown of the Iray library. More...

#include <ineuray.h>

Inheritance diagram for mi::neuraylib::INeuray:
mi::base::Interface_declare< 0xd98a8ea3, 0x3758, 0x457c, 0xb3, 0x37, 0xfb, 0xcc, 0xee, 0x40, 0x1a, 0x99 > mi::base::IInterface

Public Types

enum  Status {
  PRE_STARTING = 0, STARTING = 1, STARTED = 2, SHUTTINGDOWN = 3,
  SHUTDOWN = 4, FAILURE = 5, FORCE_32_BIT = 0xffffffffU
}
 The operational status of the library. More...
 
- Public Types inherited from mi::base::Interface_declare< 0xd98a8ea3, 0x3758, 0x457c, 0xb3, 0x37, 0xfb, 0xcc, 0xee, 0x40, 0x1a, 0x99 >
typedef Interface_declare< id1,
id2, id3, id4, id5, id6, id7,
id8, id9, id10, id11,
IInterface
Self
 Own type. More...
 
typedef Uuid_t< id1, id2, id3,
id4, id5, id6, id7, id8, id9,
id10, id11 > 
IID
 Declares the interface ID (IID) of this interface. More...
 
- Public Types inherited from mi::base::IInterface
typedef Uuid_t< 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 > IID
 Declares the interface ID (IID) of this interface. More...
 

Public Member Functions

virtual Uint32 get_interface_version () const =0
 Returns the interface version of the Iray library. More...
 
virtual const char * get_version () const =0
 Returns the version of the Iray library. More...
 
virtual Sint32 start (bool blocking=true)=0
 Starts the operation of the Iray library. More...
 
virtual Sint32 shutdown (bool blocking=true)=0
 Shuts down the library. More...
 
virtual Status get_status () const =0
 Returns the status of the library. More...
 
virtual base::IInterfaceget_api_component (const base::Uuid &uuid) const =0
 Returns an API component from the Iray SDK API. More...
 
template<class T >
T * get_api_component () const
 Returns an API component from the Iray SDK API. More...
 
virtual Sint32 register_api_component (const base::Uuid &uuid, base::IInterface *api_component)=0
 Registers an API component with the Iray SDK API. More...
 
template<class T >
Sint32 register_api_component (T *api_component)
 Registers an API component with the Iray SDK API. More...
 
virtual Sint32 unregister_api_component (const base::Uuid &uuid)=0
 Unregisters an API component with the Iray SDK API. More...
 
template<class T >
Sint32 unregister_api_component ()
 Unregisters an API component with the Iray SDK API. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from mi::base::Interface_declare< 0xd98a8ea3, 0x3758, 0x457c, 0xb3, 0x37, 0xfb, 0xcc, 0xee, 0x40, 0x1a, 0x99 >
static bool compare_iid (const Uuid &iid)
 Compares the interface ID iid against the interface ID of this interface and of its ancestors. More...
 
- Static Protected Member Functions inherited from mi::base::Interface_declare< 0xd98a8ea3, 0x3758, 0x457c, 0xb3, 0x37, 0xfb, 0xcc, 0xee, 0x40, 0x1a, 0x99 >
static const IInterfaceget_interface_static (const IInterface *iinterface, const Uuid &interface_id)
 
static IInterfaceget_interface_static (IInterface *iinterface, const Uuid &interface_id)
 

Detailed Description

This is an object representing the Iray library. Only one object of this type will exist at a time. It is used for configuration, startup and shutdown of the Iray library.

Definition at line 42 of file ineuray.h.

Member Enumeration Documentation

The operational status of the library.

Enumerator
PRE_STARTING 

The library or the cluster has not yet been started.

STARTING 

The library or the cluster is starting.

STARTED 

The library or the cluster is ready for operation.

SHUTTINGDOWN 

The library or the cluster is shutting down.

SHUTDOWN 

The library or the cluster has been shut down.

FAILURE 

There was a failure during operation.

FORCE_32_BIT 

Definition at line 92 of file ineuray.h.

Member Function Documentation

virtual base::IInterface* mi::neuraylib::INeuray::get_api_component ( const base::Uuid uuid) const
pure virtual

Returns an API component from the Iray SDK API.

See Also
API components for a list of built-in API components.
register_api_component(), unregister_api_component()
Parameters
uuidThe UUID under which the API components was registered. For built-in API components this is the interface ID of the corresponding interface.
Returns
A pointer to the API component or NULL if the API component is not supported or currently not available.
template<class T >
T* mi::neuraylib::INeuray::get_api_component ( ) const
inline

Returns an API component from the Iray SDK API.

This template variant requires that the API component is registered under the interface ID of the corresponding interface (which is the case for built-in API components).

See Also
API components for a list of built-in API components.
register_api_component(), unregister_api_component()
Template Parameters
TThe type of the API components to be queried.
Returns
A pointer to the API component or NULL if the API component is not supported or currently not available.

Definition at line 164 of file ineuray.h.

virtual Uint32 mi::neuraylib::INeuray::get_interface_version ( ) const
pure virtual

Returns the interface version of the Iray library.

This number changes whenever the abstract interfaces of the Iray SDK API changes.

virtual Status mi::neuraylib::INeuray::get_status ( ) const
pure virtual

Returns the status of the library.

Returns
The status
virtual const char* mi::neuraylib::INeuray::get_version ( ) const
pure virtual

Returns the version of the Iray library.

This string contains the product version, build number, build date, and platform of the current library.

virtual Sint32 mi::neuraylib::INeuray::register_api_component ( const base::Uuid uuid,
base::IInterface api_component 
)
pure virtual

Registers an API component with the Iray SDK API.

API components are a way for plugins to provide access to their functionality. The registration makes the API component available for subsequent calls of get_api_component().

Parameters
uuidThe ID of the API component to register, e.g., the interface ID of the corresponding interface.
api_componentThe API component to register.
Returns
  • 0: Success.
  • -1: Invalid parameters (NULL pointer).
  • -2: There is already an API component registered under the ID uuid.
template<class T >
Sint32 mi::neuraylib::INeuray::register_api_component ( T *  api_component)
inline

Registers an API component with the Iray SDK API.

API components are a way for plugins to provide access to their functionality. The registration makes the API component available for subsequent calls of get_api_component().

This template variant registers the API component under the interface ID of the corresponding interface.

Parameters
api_componentThe API component to register.
Returns
  • 0: Success.
  • -1: Invalid parameters (NULL pointer).
  • -2: There is already an API component registered under the ID T::IID().

Definition at line 205 of file ineuray.h.

virtual Sint32 mi::neuraylib::INeuray::shutdown ( bool  blocking = true)
pure virtual

Shuts down the library.

For proper shutdown this may only be called after all transactions have been committed and all rendering is finished.

You also need to release all interface pointers related to functionality obtained after startup before calling this method. In case you use the mi::base::Handle class (or another handle class), you need to make sure that all such handles have been reset or destroyed.

Note
Starting the Iray library multiple times, i.e., calling shutdown() then calling start() again, is not yet supported. This is true even if the first call to start() fails.
Parameters
blockingIndicates whether the shutdown should be done in blocking mode. If true the method will not return before shutdown has completed. If false the method will return immediately and the shutdown is done in a separate thread. The status of the shutdown sequence can be checked via get_status().
Returns
0, in case of success, -1 in case of failure
virtual Sint32 mi::neuraylib::INeuray::start ( bool  blocking = true)
pure virtual

Starts the operation of the Iray library.

All configuration which is marked to be done before the start of the library must be done before calling this function. When calling this function the Iray SDK will start threads and start network operations etc. The Iray library may not be ready for operation after the call returned if blocking mode is not used.

Note
Starting the Iray library multiple times, i.e., calling shutdown() then calling start() again, is not yet supported. This is true even if the first call to start() fails.
Parameters
blockingIndicates whether the startup should be done in blocking mode. If true the method will not return before all initialization was done. If false the method will return immediately and the startup is done in a separate thread. The status of the startup sequence can be checked via get_status().
Returns
  • 0: Success
  • -1: Unspecified failure.
  • -2: Authentication failure (challenge-response).
  • -3: Authentication failure (SPM).
  • -4: Provided license expired.
  • -5: No professional GPU as required by the license in use was found.
  • -6: Authentication failure (FLEXlm).
  • -7: No NVIDIA VCA as required by the license in use was found.
virtual Sint32 mi::neuraylib::INeuray::unregister_api_component ( const base::Uuid uuid)
pure virtual

Unregisters an API component with the Iray SDK API.

The API component will no longer be accessible via get_api_component().

Parameters
uuidThe ID of the API component to unregister.
Returns
  • 0: Success.
  • -1: There is no API component registered under the ID uuid.
template<class T >
Sint32 mi::neuraylib::INeuray::unregister_api_component ( )
inline

Unregisters an API component with the Iray SDK API.

The API component will no longer be accessible via get_api_component().

This template variant requires that the API component was registered under the interface ID of the corresponding interface (which is the case for the template variant of register_api_component()).

Returns
  • 0: Success.
  • -1: There is no API component registered under the ID T::IID().

Definition at line 232 of file ineuray.h.


The documentation for this class was generated from the following file: