NVIDIA Iray API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
mi::IOn_demand_mesh Class Referenceabstract

Interface representing an on-demand mesh. More...

Inheritance diagram for mi::IOn_demand_mesh:
Inheritance graph
[legend]

Public Member Functions

virtual void  set_callback (IOn_demand_mesh_callback *callback)=0
  Sets the callback that returns the actual mesh. More...
 
virtual const
IOn_demand_mesh_callback
get_callback () const =0
  Returns the stored callback. More...
 
Methods related to the bounding box
virtual void  set_bbox_min (const Float32_3_struct &bbox_min)=0
  Sets the minimal corner of the bounding box. More...
 
virtual void  set_bbox_max (const Float32_3_struct &bbox_max)=0
  Sets the maximal corner of the bounding box. More...
 
virtual const Float32_3_struct get_bbox_min () const =0
  Returns the minimal corner of the bounding box. More...
 
virtual const Float32_3_struct get_bbox_max () const =0
  Returns the maximal corner of the bounding box. More...
 
Methods related to displacement
virtual void  set_maximum_displacement (Float32 displacement)=0
  Sets the maximum displacement of the on-demand mesh. More...
 
virtual Float32  get_maximum_displacement () const =0
  Returns the maximum displacement of the on-demand mesh. More...
 

Additional Inherited Members

- Public Types inherited from mi::base::Interface_declare< 0x0c1cb14f, 0x985a, 0x426e, 0xa3, 0x79, 0xa7, 0xf5, 0x62, 0x60, 0xd6, 0x8d, IScene_element >
typedef Interface_declare< id1,
id2, id3, id4, id5, id6, id7,
id8, id9, id10, id11,
IScene_element
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...
 
- Static Public Member Functions inherited from mi::base::Interface_declare< 0x0c1cb14f, 0x985a, 0x426e, 0xa3, 0x79, 0xa7, 0xf5, 0x62, 0x60, 0xd6, 0x8d, IScene_element >
static bool  compare_iid (const Uuid &iid)
  Compares the interface ID iid against the interface ID of this interface and of its ancestors. More...
 

Detailed Description

Interface representing an on-demand mesh.

On-demand meshes are scene elements representing geometry. Basically they also describe triangle meshes (see mi::ITriangle_mesh), just in a much simpler format. In contrast to all other scene elements representing geometry, on-demand meshes do not store the geometry.

Instead, on-demand meshes use a user-specified callback to provide the geometry when needed. The geometry data might already exist in the application in a format that can be used directly (see mi::ISimple_mesh). In this case a simple adaptor exposing that data in the expected format is sufficient, and another copy of the geometry can be avoided.

Even if the geometry data does not yet exist in the application in a format that can be used directly there is no need to hold permanently a copy of that data in the desired format. Often this data is only needed temporarily while it is converted into another format or for upload to the GPU. In this case the memory used by a temporary instance of mi::ISimple_mesh holding a copy of the geometry data can be reclaimed after the conversion process.

Note
Displacement is currently not supported for on-demand meshes.
See Also
mi::IOn_demand_mesh_callback, mi::ISimple_mesh

Member Function Documentation

virtual const Float32_3_struct& mi::IOn_demand_mesh::get_bbox_max ( ) const
pure virtual

Returns the maximal corner of the bounding box.

virtual const Float32_3_struct& mi::IOn_demand_mesh::get_bbox_min ( ) const
pure virtual

Returns the minimal corner of the bounding box.

virtual const IOn_demand_mesh_callback* mi::IOn_demand_mesh::get_callback ( ) const
pure virtual

Returns the stored callback.

virtual Float32 mi::IOn_demand_mesh::get_maximum_displacement ( ) const
pure virtual

Returns the maximum displacement of the on-demand mesh.

See Also
set_maximum_displacement()
virtual void mi::IOn_demand_mesh::set_bbox_max ( const Float32_3_struct bbox_max)
pure virtual

Sets the maximal corner of the bounding box.

virtual void mi::IOn_demand_mesh::set_bbox_min ( const Float32_3_struct bbox_min)
pure virtual

Sets the minimal corner of the bounding box.

virtual void mi::IOn_demand_mesh::set_callback ( IOn_demand_mesh_callback callback)
pure virtual

Sets the callback that returns the actual mesh.

Is is feasible to pass NULL as callback. An on-demand mesh without callback is treated like an empty mesh.

virtual void mi::IOn_demand_mesh::set_maximum_displacement ( Float32  displacement)
pure virtual

Sets the maximum displacement of the on-demand mesh.

This value is the maximum absolute value that any displacement shader applied to the object will return (defaults to 0.0). The bounding box of the object will be expanded all around by this value.