RenderMan API  23.0
RixSGScene Class Referenceabstract

#include <RixSceneGraph.h>

Classes

struct  ScopedEdit
 

Public Member Functions

virtual RixSGMaterialCreateMaterial (RtUString identifier)=0
 
virtual RixSGError DeleteMaterial (RixSGMaterial *material)=0
 
virtual RixSGGroupCreateGroup (RtUString identifier)=0
 
virtual RixSGCameraCreateCamera (RtUString identifier)=0
 
virtual RixSGClippingPlaneCreateClippingPlane (RtUString identifier)=0
 
virtual RixSGAnalyticLightCreateAnalyticLight (RtUString identifier)=0
 
virtual RixSGGeometryCreateGeometry (RtUString identifier)=0
 
virtual RixSGQuadricCreateQuadric (RtUString identifier)=0
 
virtual RixSGMeshCreateMesh (RtUString identifier)=0
 
virtual RixSGPointsCreatePoints (RtUString identifier)=0
 
virtual RixSGVolumeCreateVolume (RtUString identifier)=0
 
virtual RixSGBlobbyCreateBlobby (RtUString identifier)=0
 
virtual RixSGCurvesCreateCurves (RtUString identifier)=0
 
virtual RixSGNuPatchCreateNuPatch (RtUString identifier)=0
 
virtual RixSGProceduralCreateProcedural (RtUString identifier)=0
 
virtual RixSGError DeleteDagNode (RixSGGroup *node)=0
 
virtual RixSGGroupFindDagNode (char const *path) const =0
 
virtual RixSGError Render (char const *cmd)=0
 
virtual RixSGError Stop ()=0
 
virtual void EditBegin ()=0
 
virtual void EditEnd ()=0
 
virtual RixSGError Clear ()=0
 
virtual RixSGGroupRoot () const =0
 
virtual RixSGError SetIntegrator (unsigned num, RixSGShader const *nodes)=0
 
virtual RixSGError SetSampleFilter (unsigned num, RixSGShader const *nodes)=0
 
virtual RixSGError SetDisplayFilter (unsigned num, RixSGShader const *nodes)=0
 
virtual RixSGError SetDisplayChannel (unsigned num, RixSGDisplayChannel const *nodes)=0
 
virtual RtParamList const & GetOptions () const =0
 
virtual RixSGError SetOptions (RtParamList const &options)=0
 
virtual RixSGError SetUpdateIdCallback (RixSGUpdateIdCallback callback, void *ctx)=0
 

Protected Member Functions

 RixSGScene ()=default
 
virtual ~RixSGScene ()=default
 

Detailed Description

RixInterface for constructing and manipulating scene graphs

Definition at line 1153 of file RixSceneGraph.h.

Constructor & Destructor Documentation

◆ RixSGScene()

RixSGScene::RixSGScene ( )
protecteddefault

◆ ~RixSGScene()

virtual RixSGScene::~RixSGScene ( )
protectedvirtualdefault

Member Function Documentation

◆ Clear()

virtual RixSGError RixSGScene::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
RixSGScene::DeleteMaterial
RixSGScene::DeleteDagNode
Returns
Error code

◆ CreateAnalyticLight()

virtual RixSGAnalyticLight* RixSGScene::CreateAnalyticLight ( RtUString  identifier)
pure virtual

Create a analytic DAG light

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

◆ CreateBlobby()

virtual RixSGBlobby* RixSGScene::CreateBlobby ( RtUString  identifier)
pure virtual

Create a blobby DAG object

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

◆ CreateCamera()

virtual RixSGCamera* RixSGScene::CreateCamera ( RtUString  identifier)
pure virtual

Create a DAG render camera

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

◆ CreateClippingPlane()

virtual RixSGClippingPlane* RixSGScene::CreateClippingPlane ( RtUString  identifier)
pure virtual

Create a DAG render camera

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

◆ CreateCurves()

virtual RixSGCurves* RixSGScene::CreateCurves ( RtUString  identifier)
pure virtual

Create a curves DAG object

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

◆ CreateGeometry()

virtual RixSGGeometry* RixSGScene::CreateGeometry ( RtUString  identifier)
pure virtual

Create a basic geometric DAG object

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

◆ CreateGroup()

virtual RixSGGroup* RixSGScene::CreateGroup ( RtUString  identifier)
pure virtual

Create a group DAG node

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

◆ CreateMaterial()

virtual RixSGMaterial* RixSGScene::CreateMaterial ( RtUString  identifier)
pure virtual

Create scene graph material

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

◆ CreateMesh()

virtual RixSGMesh* RixSGScene::CreateMesh ( RtUString  identifier)
pure virtual

Create a geometric DAG mesh

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

◆ CreateNuPatch()

virtual RixSGNuPatch* RixSGScene::CreateNuPatch ( RtUString  identifier)
pure virtual

Create a NURBS DAG object

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

◆ CreatePoints()

virtual RixSGPoints* RixSGScene::CreatePoints ( RtUString  identifier)
pure virtual

Create a points DAG object

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

◆ CreateProcedural()

virtual RixSGProcedural* RixSGScene::CreateProcedural ( RtUString  identifier)
pure virtual

Create a procedural DAG object

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

◆ CreateQuadric()

virtual RixSGQuadric* RixSGScene::CreateQuadric ( RtUString  identifier)
pure virtual

Create a quadric DAG primitve

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

◆ CreateVolume()

virtual RixSGVolume* RixSGScene::CreateVolume ( RtUString  identifier)
pure virtual

Create a volume DAG object

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

◆ DeleteDagNode()

virtual RixSGError RixSGScene::DeleteDagNode ( RixSGGroup 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
RixSGScene::Clear
Parameters
[in]nodeDAG node.
Returns
Error code

◆ DeleteMaterial()

virtual RixSGError RixSGScene::DeleteMaterial ( RixSGMaterial material)
pure virtual

Delete scene graph material

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

◆ EditBegin()

virtual void RixSGScene::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
RixSGScene::ScopedEdit

◆ EditEnd()

virtual void RixSGScene::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
RixSGScene::ScopedEdit

◆ FindDagNode()

virtual RixSGGroup* RixSGScene::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 RixSGManager::CreateScene.

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

◆ GetOptions()

virtual RtParamList const& RixSGScene::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
RixSGScene::SetOptions
Returns
Option list

◆ Render()

virtual RixSGError RixSGScene::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 RixSGScene::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
RixSGScene::Stop
Parameters
[in]cmdRender command and flags
Returns
Error code

◆ Root()

virtual RixSGGroup* RixSGScene::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
RixSGGroup::RemoveChild
RixSGGroup::GetNumChildren
RixSGGroup::GetChild
Returns
The root DAG node

◆ SetDisplayChannel()

virtual RixSGError RixSGScene::SetDisplayChannel ( unsigned  num,
RixSGDisplayChannel 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 RixSGError RixSGScene::SetDisplayFilter ( unsigned  num,
RixSGShader 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 RixSGError RixSGScene::SetIntegrator ( unsigned  num,
RixSGShader 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 RixSGShaderType::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 RixSGError RixSGScene::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
RixSGScene::GetOptions
Parameters
[in]optionsOption list
Returns
Error code

◆ SetSampleFilter()

virtual RixSGError RixSGScene::SetSampleFilter ( unsigned  num,
RixSGShader const *  nodes 
)
pure virtual

Set sample filter shading graph

Sample filter shading graphs may contain zero or more RixSGShaderType::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 RixSGError RixSGScene::SetUpdateIdCallback ( RixSGUpdateIdCallback  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 RixSGError RixSGScene::Stop ( )
pure virtual

Stop a live render

This blocking call returns once the renderer has fully stopped.

See also
RixSGScene::Render
Returns
Error code

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