The scene is the top-level element describing a subset of DB elements to be rendered. More...
#include <iscene.h>
Public Types | |
enum | Dirty_flags { DIRTY_NONE = 0 , DIRTY_INSTANCE_TRANSFORMS = 1 << 0 , DIRTY_FORCE_32_BIT = 0xffffffffU } |
Different flags for specifying what is dirty in the scene and needs recomputing. More... | |
Public Types inherited from mi::base::Interface_declare< 0x44e2a997, ... > | |
typedef Interface_declare< id1, ... > | Self |
Own type. More... | |
typedef Uuid_t< id1, ... > | 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 Sint32 | set_rootgroup (const char *root)=0 |
Sets the root group of this scene. More... | |
virtual const IString * | get_rootgroup () const =0 |
Returns the name of the root group of this scene. More... | |
virtual Sint32 | set_options (const char *options)=0 |
Sets the options of this scene. More... | |
virtual const IString * | get_options () const =0 |
Returns the name of the options of this scene. More... | |
virtual Sint32 | set_camera_instance (const char *camera)=0 |
Sets the camera instance of this scene. More... | |
virtual const IString * | get_camera_instance () const =0 |
Returns the name of the camera instance of this scene. More... | |
virtual Bbox3_struct | get_bbox (Sint32 *errors=0)=0 |
Returns the bounding box of this scene. More... | |
virtual IRender_context * | create_render_context (ITransaction *transaction, const char *render_mode, Sint32 *errors=0)=0 |
Creates a render context suitable for rendering the scene with a given render mode. More... | |
virtual Sint32 | set_dirty (Uint32 flags=0)=0 |
Marks as dirty some parts of the scene which will be recomputed. More... | |
Public Member Functions inherited from mi::base::IInterface | |
virtual Uint32 | retain () const =0 |
Increments the reference count. More... | |
virtual Uint32 | release () const =0 |
Decrements the reference count. More... | |
virtual const IInterface * | get_interface (const Uuid &interface_id) const =0 |
Acquires a const interface from another. More... | |
template<class T> | |
const T * | get_interface () const |
Acquires a const interface from another. More... | |
virtual IInterface * | get_interface (const Uuid &interface_id)=0 |
Acquires a mutable interface from another. More... | |
template<class T> | |
T * | get_interface () |
Acquires a mutable interface from another. More... | |
virtual Uuid | get_iid () const =0 |
Returns the interface ID of the most derived interface. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from mi::base::Interface_declare< 0x44e2a997, ... > | |
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 Public Member Functions inherited from mi::base::IInterface | |
static bool | compare_iid (const Uuid &iid) |
Compares the interface ID iid against the interface ID of this interface. More... | |
The scene is the top-level element describing a subset of DB elements to be rendered.
A scene is described by three elements:
Preprocessing of scene data is deferred until it is needed. In particular, get_bbox() and create_render_context() trigger preprocessing of the scene data.
Note that editing an instance of this class stored in the DB will localize it to the scope of the current transaction. That is, calling mi::neuraylib::ITransaction::edit() on instances of mi::neuraylib::IScene will automatically invoke mi::neuraylib::ITransaction::copy() with identical names for source
and target
and mi::neuraylib::ITransaction::LOCAL_SCOPE as third argument.
Different flags for specifying what is dirty in the scene and needs recomputing.
These flags identify what is dirty in the scene and must be recomputed.
Enumerator | |
---|---|
DIRTY_NONE | No flags. |
DIRTY_INSTANCE_TRANSFORMS | Set the instance transforms as dirty. This forces an update of the camera shift offset due to instancing. |
|
pure virtual |
Creates a render context suitable for rendering the scene with a given render mode.
transaction | The transaction to be used. | |
render_mode | The render mode to be used, for example, "iray" . Possible values are documented in Section "Render mode selection" of the Iray Programmer's Manual. | |
[out] | errors | An optional pointer to an mi::Sint32 to which an error code will be written. The error codes have the following meaning:
|
NULL
in case of failure.
|
pure virtual |
Returns the bounding box of this scene.
This method is not a const
method because it might trigger loading the actual scene data.
errors | An optional pointer to an mi::Sint32 to which an error code will be written. The error codes have the following meaning:
|
|
pure virtual |
Returns the name of the camera instance of this scene.
NULL
if there is no camera instance.
|
pure virtual |
Returns the name of the options of this scene.
NULL
if there is no options object.
|
pure virtual |
Returns the name of the root group of this scene.
NULL
if there is no root group.
|
pure virtual |
Sets the camera instance of this scene.
camera | The name of the camera instance. |
NULL
pointer).Marks as dirty some parts of the scene which will be recomputed.
To force an update of the camera shift offset due to instancing it is possible to call this method with the flag that sets the instance transforms as dirty.
flags | See Dirty_flags for possible values (they can be OR'ed). |
|
pure virtual |
Sets the options of this scene.
options | The name of the options. |
NULL
pointer).
|
pure virtual |
Sets the root group of this scene.
root | The root group. |
NULL
pointer).