RenderManAPI  24.0
Scene Class Referenceabstract

RixInterface for constructing and manipulating scene graphs. More...

#include <RixSceneGraph.h>

Classes

struct  ScopedEdit
 Define scoped edit block. More...
 

Public Member Functions

virtual MaterialCreateMaterial (RtUString identifier)=0
 Create scene graph material. More...
 
virtual Error DeleteMaterial (Material *material)=0
 Delete scene graph material. More...
 
virtual GroupCreateGroup (RtUString identifier)=0
 Create a group DAG node. More...
 
virtual CameraCreateCamera (RtUString identifier)=0
 Create a DAG render camera. More...
 
virtual ClippingPlaneCreateClippingPlane (RtUString identifier)=0
 Create a DAG render camera. More...
 
virtual AnalyticLightCreateAnalyticLight (RtUString identifier)=0
 Create a analytic DAG light. More...
 
virtual GeometryCreateGeometry (RtUString identifier)=0
 Create a basic geometric DAG object. More...
 
virtual QuadricCreateQuadric (RtUString identifier)=0
 Create a quadric DAG primitve. More...
 
virtual MeshCreateMesh (RtUString identifier)=0
 Create a geometric DAG mesh. More...
 
virtual PointsCreatePoints (RtUString identifier)=0
 Create a points DAG object. More...
 
virtual VolumeCreateVolume (RtUString identifier)=0
 Create a volume DAG object. More...
 
virtual BlobbyCreateBlobby (RtUString identifier)=0
 Create a blobby DAG object. More...
 
virtual CurvesCreateCurves (RtUString identifier)=0
 Create a curves DAG object. More...
 
virtual NuPatchCreateNuPatch (RtUString identifier)=0
 Create a NURBS DAG object. More...
 
virtual ProceduralCreateProcedural (RtUString identifier)=0
 Create a procedural DAG object. More...
 
virtual Error DeleteDagNode (Group *node)=0
 Delete a DAG node. More...
 
virtual GroupFindDagNode (char const *path) const =0
 Find a DAG node from a identifier path. More...
 
virtual Error Render (char const *cmd)=0
 Start a live render, batch render, or scene export. More...
 
virtual Error Stop ()=0
 Stop a live render. More...
 
virtual void EditBegin ()=0
 Start an edit block. More...
 
virtual void EditEnd ()=0
 Finish an edit block. More...
 
virtual Error Clear ()=0
 Clear the scenegraph. More...
 
virtual GroupRoot () const =0
 Return root node. More...
 
virtual Error SetIntegrator (unsigned num, Shader const *nodes)=0
 Set integrator shading graph. More...
 
virtual Error SetSampleFilter (unsigned num, Shader const *nodes)=0
 Set sample filter shading graph. More...
 
virtual Error SetDisplayFilter (unsigned num, Shader const *nodes)=0
 Set display filter shading graph. More...
 
virtual Error SetDisplayChannel (unsigned num, DisplayChannel const *nodes)=0
 Set display channels. More...
 
virtual RtParamList const & GetOptions () const =0
 Get option list. More...
 
virtual Error SetOptions (RtParamList const &options)=0
 Set option list. More...
 
virtual Error SetUpdateIdCallback (UpdateIdCallback callback, void *ctx)=0
 Optional callback to provide the object ids. More...
 
virtual Error InvalidateTexture (RtUString const name)=0
 Invalidate a texture. More...
 

Protected Member Functions

 Scene ()=default
 
virtual ~Scene ()=default
 

Detailed Description

RixInterface for constructing and manipulating scene graphs.

Constructor & Destructor Documentation

◆ Scene()

Scene::Scene ( )
protecteddefault

◆ ~Scene()

virtual Scene::~Scene ( )
protectedvirtualdefault

Member Function Documentation

◆ Clear()

virtual Error Scene::Clear ( )
pure virtual

Clear the scenegraph.

This resets the scene graph to an empty state. All associated DAG nodes and material containers are freed.

See also
Scene::DeleteMaterial
Scene::DeleteDagNode
Returns
Error code

◆ CreateAnalyticLight()

virtual AnalyticLight* Scene::CreateAnalyticLight ( RtUString  identifier)
pure virtual

Create a analytic DAG light.

See also
Group::SetIdentifier
Scene::DeleteDagNode
Parameters
[in]identifierThe DAG node identifier
Returns
Group DAG node

◆ CreateBlobby()

virtual Blobby* Scene::CreateBlobby ( RtUString  identifier)
pure virtual

Create a blobby DAG object.

See also
Group::SetIdentifier
Scene::DeleteDagNode
Parameters
[in]identifierThe DAG node identifier
Returns
Group DAG node

◆ CreateCamera()

virtual Camera* Scene::CreateCamera ( RtUString  identifier)
pure virtual

Create a DAG render camera.

See also
Group::SetIdentifier
Scene::DeleteDagNode
Parameters
[in]identifierThe DAG node identifier
Returns
Group DAG node

◆ CreateClippingPlane()

virtual ClippingPlane* Scene::CreateClippingPlane ( RtUString  identifier)
pure virtual

Create a DAG render camera.

See also
Group::SetIdentifier
Scene::DeleteDagNode
Parameters
[in]identifierThe DAG node identifier
Returns
Group DAG node

◆ CreateCurves()

virtual Curves* Scene::CreateCurves ( RtUString  identifier)
pure virtual

Create a curves DAG object.

See also
Group::SetIdentifier
Scene::DeleteDagNode
Parameters
[in]identifierThe DAG node identifier
Returns
Group DAG node

◆ CreateGeometry()

virtual Geometry* Scene::CreateGeometry ( RtUString  identifier)
pure virtual

Create a basic geometric DAG object.

See also
Group::SetIdentifier
Scene::DeleteDagNode
Parameters
[in]identifierThe DAG node identifier
Returns
Group DAG node

◆ CreateGroup()

virtual Group* Scene::CreateGroup ( RtUString  identifier)
pure virtual

Create a group DAG node.

See also
Group::SetIdentifier
Scene::DeleteDagNode
Parameters
[in]identifierThe DAG node identifier
Returns
Group DAG node

◆ CreateMaterial()

virtual Material* Scene::CreateMaterial ( RtUString  identifier)
pure virtual

Create scene graph material.

See also
Scene::DeleteMaterial
Material::SetIdentifier
Parameters
[in]identifierThe material identifier
Returns
Material node

◆ CreateMesh()

virtual Mesh* Scene::CreateMesh ( RtUString  identifier)
pure virtual

Create a geometric DAG mesh.

See also
Group::SetIdentifier
Scene::DeleteDagNode
Parameters
[in]identifierThe DAG node identifier
Returns
Group DAG node

◆ CreateNuPatch()

virtual NuPatch* Scene::CreateNuPatch ( RtUString  identifier)
pure virtual

Create a NURBS DAG object.

See also
Group::SetIdentifier
Scene::DeleteDagNode
Parameters
[in]identifierThe DAG node identifier
Returns
Group DAG node

◆ CreatePoints()

virtual Points* Scene::CreatePoints ( RtUString  identifier)
pure virtual

Create a points DAG object.

See also
Group::SetIdentifier
Scene::DeleteDagNode
Parameters
[in]identifierThe DAG node identifier
Returns
Group DAG node

◆ CreateProcedural()

virtual Procedural* Scene::CreateProcedural ( RtUString  identifier)
pure virtual

Create a procedural DAG object.

See also
Group::SetIdentifier
Scene::DeleteDagNode
Parameters
[in]identifierThe DAG node identifier
Returns
Group DAG node

◆ CreateQuadric()

virtual Quadric* Scene::CreateQuadric ( RtUString  identifier)
pure virtual

Create a quadric DAG primitve.

See also
Group::SetIdentifier
Scene::DeleteDagNode
Parameters
[in]identifierThe DAG node identifier
Returns
Group DAG node

◆ CreateVolume()

virtual Volume* Scene::CreateVolume ( RtUString  identifier)
pure virtual

Create a volume DAG object.

See also
Group::SetIdentifier
Scene::DeleteDagNode
Parameters
[in]identifierThe DAG node identifier
Returns
Group DAG node

◆ DeleteDagNode()

virtual Error Scene::DeleteDagNode ( Group node)
pure virtual

Delete a DAG node.

The DAG node is removed from the scene graph. It is invalid to dereference a DAG node once deleted.

See also
Scene::Clear
Parameters
[in]nodeDAG node.
Returns
Error code

◆ DeleteMaterial()

virtual Error Scene::DeleteMaterial ( Material material)
pure virtual

Delete scene graph material.

See also
Scene::CreateMaterial
Scene::Clear
Parameters
[in]materialMaterial node
Returns
Error code

◆ EditBegin()

virtual void Scene::EditBegin ( )
pure virtual

Start an edit block.

An edit block defines a time during which the scene graph may be safely modified without renderer synchronization. Edit blocks may be nested.

See also
Scene::ScopedEdit

Referenced by Scene::ScopedEdit::ScopedEdit().

◆ EditEnd()

virtual void Scene::EditEnd ( )
pure virtual

Finish an edit block.

An edit block defines a time during which the scene graph may be safely modified without renderer synchronization. Edit blocks may be nested.

See also
Scene::ScopedEdit

◆ FindDagNode()

virtual Group* Scene::FindDagNode ( char const *  path) const
pure virtual

Find a DAG node from a identifier path.

Returns a DAG node based on the string identifier path relative to the root node. DAG node paths should use the same separator given to Manager::CreateScene.

See also
Group::SetIdentifier
Parameters
[in]pathIdentifier path
Returns
DAG node or nullptr when path is invalid

◆ GetOptions()

virtual RtParamList const& Scene::GetOptions ( ) const
pure virtual

Get option list.

Parameters that are globally availible to all scene objects and instances are called options. Options must be set before render begins and are constant for all primitives. Options define scene properties such as searchpaths, resolution, user parameters.

See also
Scene::SetOptions
Returns
Option list

◆ InvalidateTexture()

virtual Error Scene::InvalidateTexture ( RtUString const  name)
pure virtual

Invalidate a texture.

Tell the renderer the given texture as dirty and needs to flush it from the texture cache.

Parameters
[in]namethe full path to the texture
Returns
Error code

◆ Render()

virtual Error Scene::Render ( char const *  cmd)
pure virtual

Start a live render, batch render, or scene export.

Command mode may be "prman" to render or "rib" to export RIB. Renders may be stopped by calling Scene::Stop. The render mode flags supports several flags:

Flag Description ---———
"-live" Interactive rendering supporting scene edits
"-blocking" Call blocks unitl stopped or converged

For example:

scene->Render("prman -live"); // A non-blocking live render
scene->Render("prman -blocking"); // A blocking batch render
scene->Render("rib /path/to/output.rib"); // A RIB export


See also
Scene::Stop
Parameters
[in]cmdRender command and flags
Returns
Error code

◆ Root()

virtual Group* Scene::Root ( ) const
pure virtual

Return root node.

The root node defines scene graph DAG hierarcy. All renderable objects should be decendents of the root node.

See also
Group::RemoveChild
Group::GetNumChildren
Group::GetChild
Returns
The root DAG node

◆ SetDisplayChannel()

virtual Error Scene::SetDisplayChannel ( unsigned  num,
DisplayChannel const *  nodes 
)
pure virtual

Set display channels.

You may specify one or more display channels. These are applied to all renderable cameras. The default display channels are 'Ci' and 'a' (beauty and alpha)

Parameters
[in]numThe number of channels
[in]nodesThe display channels
Returns
Error code

◆ SetDisplayFilter()

virtual Error Scene::SetDisplayFilter ( unsigned  num,
Shader const *  nodes 
)
pure virtual

Set display filter shading graph.

You may specify one or more RixDisplayFilter plug-ins that may be networked. Only the root node will be evaluated by the renderer. There is no default display filter plug-in.

Parameters
[in]numThe number of nodes
[in]nodesThe displayfilter nodes
Returns
Error code

◆ SetIntegrator()

virtual Error Scene::SetIntegrator ( unsigned  num,
Shader const *  nodes 
)
pure virtual

Set integrator shading graph.

Integrators take the camera rays from the projection and return shaded results to the renderer. Integrator shading graphs may contain a single terminal ShaderType::k_Integrator node. The default integrator is "PxrDefault".

Parameters
[in]numThe number of nodes in the shading graph
[in]nodesThe integrator nodes
Returns
Error code

◆ SetOptions()

virtual Error Scene::SetOptions ( RtParamList const &  options)
pure virtual

Set option list.

Parameters that are globally availible to all scene objects and instances are called options. Options must be set before render begins and are constant for all primitives. Options define scene properties such as searchpaths, resolution, user parameters.

See also
Scene::GetOptions
Parameters
[in]optionsOption list
Returns
Error code

◆ SetSampleFilter()

virtual Error Scene::SetSampleFilter ( unsigned  num,
Shader const *  nodes 
)
pure virtual

Set sample filter shading graph.

Sample filter shading graphs may contain zero or more ShaderType::k_SampleFilter nodes. You may specify one or more RixSampleFilter plug-ins that may be networked. Only the root node will be evaluated by the renderer. There is no default sample filter plug-in.

Parameters
[in]numThe number of nodes
[in]nodesThe samplefilter nodes
Returns
Error code

◆ SetUpdateIdCallback()

virtual Error Scene::SetUpdateIdCallback ( UpdateIdCallback  callback,
void *  ctx 
)
pure virtual

Optional callback to provide the object ids.

If this callback is set then is it queried for integer attributes "identifier:id" and "identifier:id2" values that will be rendered into the "id" channel.

Parameters
[in]callbackThe function to be called when ever an object is created/modified
[in]ctxUser context quoted back to the callback
Returns
Error code

◆ Stop()

virtual Error Scene::Stop ( )
pure virtual

Stop a live render.

This blocking call returns once the renderer has fully stopped.

See also
Scene::Render
Returns
Error code

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