NVIDIA IndeX API nvidia_logo_transpbg.gif Up
nv::index::ISession Class Referenceabstract

The session represents the entire workspace with the NVIDIA IndeX environment. More...

#include <isession.h>

Inherits mi::base::Interface_declare< 0x21638be2, ... >.

Public Member Functions

Creating a scene.
virtual mi::neuraylib::Tag_struct create_scene (mi::neuraylib::IDice_transaction *dice_transaction)=0
 Creates a new scene for the current session. More...
 
virtual mi::neuraylib::Tag_struct get_scene () const =0
 The scene is part of the session description and can be accessed. More...
 
Traversing the scene.
virtual void visit (IScene_visitor *visitor, mi::neuraylib::IDice_transaction *dice_transaction) const =0
 Visiting the scene by traversing through the entire scene description. More...
 
Creating a camera.
virtual mi::neuraylib::Tag_struct create_camera (mi::neuraylib::IDice_transaction *dice_transaction, const mi::base::Uuid &camera_type_uuid=IPerspective_camera::IID(), const char *camera_name=0) const =0
 Creates a new camera object. More...
 
Data distribution.
virtual mi::neuraylib::Tag_struct get_data_access_factory () const =0
 Returns the factory that exposes access to the distributed large-scale datasets. More...
 
virtual mi::neuraylib::Tag_struct get_distribution_layout () const =0
 Returns the object that exposes the distribution of large-scale data in the cluster environment. More...
 
Spatial subdivision.
virtual ISubdivisionget_spatial_subdivision (mi::neuraylib::IDice_transaction *dice_transaction) const =0
 Returns the spatial subdivision. More...
 
Multi-view support.
virtual IViewportcreate_viewport () const =0
 Creates a new viewport. More...
 
virtual IViewport_listcreate_viewport_list () const =0
 Creates a new viewport list. More...
 
virtual ICanvas_viewport_listcreate_canvas_viewport_list () const =0
 Creates a new list of canvas/viewport-list pairs. More...
 
Convenience interface class.
virtual IScene_convenience_manipulationget_conveniences () const =0
 The convenience interface class allows an application-writer to perform common manipulations on a scene's configuration and, thus, reduces the efforts for tinker with the hierarchical scene description. More...
 

Global configurations and states.

enum  Export_mode {
  EXPORT_FORMAT_PRJ = 0x01 ,
  EXPORT_FORMAT_JSON = 0x02 ,
  EXPORT_SYSINFO = 0x10 ,
  EXPORT_MEMORY = 0x20 ,
  EXPORT_VERBOSE = 0x40 ,
  EXPORT_DEBUG = 0x80 ,
  EXPORT_HINTS = 0x100 ,
  EXPORT_USER_DATA = 0x200 ,
  EXPORT_DEFAULT = EXPORT_FORMAT_PRJ | EXPORT_SYSINFO | EXPORT_MEMORY | EXPORT_VERBOSE | EXPORT_DEBUG
}
 Controls how the export will be performed by export_session(). More...
 
virtual mi::neuraylib::Tag_struct get_config () const =0
 Returns the configuration settings of this session. More...
 
virtual void export_session (mi::Uint32 export_mode, mi::IString *output, mi::neuraylib::IDice_transaction *dice_transaction, const IViewport_list *viewport_list=0) const =0
 Returns a textual representation of the internal state of the scene and the rendering parameters that make up this session. More...
 
virtual void export_scene_element (mi::neuraylib::Tag_struct scene_element_tag, mi::Uint32 export_mode, mi::IString *output, mi::neuraylib::IDice_transaction *dice_transaction) const =0
 Returns a textual representation of the internal state of the given scene element. More...
 

Detailed Description

The session represents the entire workspace with the NVIDIA IndeX environment.

Besides allowing the user to configure (see nv::indeX::IConfig_settings) the system, the session contains the scene (see nv::index::IScene) and gives access to the internal data distribution schemes (see nv::index::IData_distribution).

Member Enumeration Documentation

 Export_mode

Controls how the export will be performed by export_session().

Enumerator
EXPORT_FORMAT_PRJ 

.prj output format for use with the NVIDIA IndeX demo viewer

EXPORT_FORMAT_JSON 

JSON output format.

EXPORT_SYSINFO 

Show system information.

EXPORT_MEMORY 

Add memory statistics to system information.

EXPORT_VERBOSE 

Add additional comments.

EXPORT_DEBUG 

Add additional debug information as comments.

EXPORT_HINTS 

Add type and range hints to properties (for building a UI)

EXPORT_USER_DATA 

Add detailed output of user-defined data (e.g. source code and parameters from rendering kernel programs)

EXPORT_DEFAULT 

Default mode.

Member Function Documentation

 create_camera()

virtual mi::neuraylib::Tag_struct nv::index::ISession::create_camera ( mi::neuraylib::IDice_transaction *  dice_transaction,
const mi::base::Uuid &  camera_type_uuid = IPerspective_camera::IID(),
const char *  camera_name = 0 
) const
pure virtual

Creates a new camera object.

Parameters
[in]dice_transactionThe DiCE transaction to store the new camera in DiCE's distributed database.
[in]camera_type_uuidThe UUID of the requested camera to be created. By default a IPerspective_camera instance is created.
[in]camera_nameThe name for this camera. This name can be used to lookup the camera tag using IDice_transaction::name_to_tag(). When it is 0, no name is assigned.
Returns
Returns the tag that references the created instance of the ICamera interface camera. The caller takes ownership of the camera and is responsible for freeing it from the database by calling IDice_transaction::remove() when it is not needed anymore.
Deprecated:
Please use IScene::create_camera().

 create_canvas_viewport_list()

virtual ICanvas_viewport_list * nv::index::ISession::create_canvas_viewport_list ( ) const
pure virtual

Creates a new list of canvas/viewport-list pairs.

Returns
Returns the new ICanvas_viewport_list object. The caller takes ownership of the returned object and is responsible for freeing it when it is not needed anymore, i.e. by storing it in a mi::base::Handle.

 create_scene()

virtual mi::neuraylib::Tag_struct nv::index::ISession::create_scene ( mi::neuraylib::IDice_transaction *  dice_transaction)
pure virtual

Creates a new scene for the current session.

Note
Only a single scene can be created for each session.
Parameters
[in]dice_transactionThe DiCE transaction to store the scene in DiCE's distributed database.
Returns
Returns the tag that references the created instance of a IScene interface class.

 create_viewport()

virtual IViewport * nv::index::ISession::create_viewport ( ) const
pure virtual

Creates a new viewport.

Returns
Returns the new IViewport object. The caller takes ownership of the viewport object and is responsible for freeing it when it is not needed anymore, i.e. by storing it in a mi::base::Handle.

 create_viewport_list()

virtual IViewport_list * nv::index::ISession::create_viewport_list ( ) const
pure virtual

Creates a new viewport list.

Returns
Returns the new IViewport_list object. The caller takes ownership of the viewport object and is responsible for freeing it when it is not needed anymore, i.e. by storing it in a mi::base::Handle.

 export_scene_element()

virtual void nv::index::ISession::export_scene_element ( mi::neuraylib::Tag_struct  scene_element_tag,
mi::Uint32  export_mode,
mi::IString *  output,
mi::neuraylib::IDice_transaction *  dice_transaction 
) const
pure virtual

Returns a textual representation of the internal state of the given scene element.

See also
export_session()
Parameters
[in]scene_element_tagTag of the IScene_element to be exported.
[in]export_modeCombination (bitwise or) of values from Export_mode.
[in]outputString where the information should be written to.
[in]dice_transactionDiCE transaction to use.

 export_session()

virtual void nv::index::ISession::export_session ( mi::Uint32  export_mode,
mi::IString *  output,
mi::neuraylib::IDice_transaction *  dice_transaction,
const IViewport_list viewport_list = 0 
) const
pure virtual

Returns a textual representation of the internal state of the scene and the rendering parameters that make up this session.

The output format and the amount of details are controlled by the export_mode parameter.

Parameters
[in]export_modeCombination (bitwise or) of values from Export_mode.
[in]outputString where the information should be written to.
[in]dice_transactionDiCE transaction to use.
[in]viewport_listThe scene of each viewport will be export, or, if set to 0, only the scene in the global scope.
Usage example:

Consider that m_session_tag contains the tag of an ISession and m_index points to an instance of IIndex.

// Access session
mi::base::Handle<const nv::index::ISession> session(
dice_transaction->access<const nv::index::ISession>(m_session_tag));
// Create string object that should be filled with the state information
mi::base::Handle<mi::neuraylib::IFactory> factory(
m_index->get_api_component<mi::neuraylib::IFactory>());
mi::base::Handle<mi::IString> str(factory->create<mi::IString>());
// Write state to the string object
session->export_session(nv::index::ISession::EXPORT_DEFAULT, str.get(), dice_transaction.get());
std::cout << str->get_c_str() << std::endl;
The session represents the entire workspace with the NVIDIA IndeX environment.
Definition: isession.h:41
@ EXPORT_DEFAULT
Default mode.
Definition: isession.h:253

 get_config()

virtual mi::neuraylib::Tag_struct nv::index::ISession::get_config ( ) const
pure virtual

Returns the configuration settings of this session.

Returns
Tag of an IConfig_settings object

 get_conveniences()

virtual IScene_convenience_manipulation * nv::index::ISession::get_conveniences ( ) const
pure virtual

The convenience interface class allows an application-writer to perform common manipulations on a scene's configuration and, thus, reduces the efforts for tinker with the hierarchical scene description.

Nonetheless, defining the scene description explicitly and managing the scene in the application logic represents the method of choice.

Returns
Returns an instance of the interface class IScene_convenience_manipulation, which exposes means for conveniently manipulating a scene's configuration.
Deprecated:
The convenience manipulations was implemented on customer request but became superfluous over time.

 get_data_access_factory()

virtual mi::neuraylib::Tag_struct nv::index::ISession::get_data_access_factory ( ) const
pure virtual

Returns the factory that exposes access to the distributed large-scale datasets.

Returns
Returns the tag that references an instance of the IDistributed_data_access_factory interface class.

 get_distribution_layout()

virtual mi::neuraylib::Tag_struct nv::index::ISession::get_distribution_layout ( ) const
pure virtual

Returns the object that exposes the distribution of large-scale data in the cluster environment.

Returns
Returns the tag that reference an instance of the IData_distribution interface class.

 get_scene()

virtual mi::neuraylib::Tag_struct nv::index::ISession::get_scene ( ) const
pure virtual

The scene is part of the session description and can be accessed.

Returns
Returns the tag that references an IScene interface.

 get_spatial_subdivision()

virtual ISubdivision * nv::index::ISession::get_spatial_subdivision ( mi::neuraylib::IDice_transaction *  dice_transaction) const
pure virtual

Returns the spatial subdivision.

This can be used to store the subdivision generated by IndeX, and restore it by using set_affinity_information() to avoid costly internal regeneration. The returned object can be a basic ISubdivision or ISubdivision_topology. ISubdivision_topology contains the Kd-tree or Octree topology.

Parameters
[in]dice_transactionThe DiCE transaction.
Returns
New object with subdivision information (caller gets ownership), or nullptr.

 visit()

virtual void nv::index::ISession::visit ( IScene_visitor visitor,
mi::neuraylib::IDice_transaction *  dice_transaction 
) const
pure virtual

Visiting the scene by traversing through the entire scene description.

Parameters
[in]visitorThe application-side visitor traverses through the scene description and evaluates all scene elements.
[in]dice_transactionThe DiCE transaction that should be used for the traversal.

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