RenderMan API  23.0
RixSGGroup Class Referenceabstract

#include <RixSceneGraph.h>

Inheritance diagram for RixSGGroup:
RixSGAnalyticLight RixSGCamera RixSGClippingPlane RixSGGeometry RixSGBlobby RixSGCurves RixSGMesh RixSGNuPatch RixSGPoints RixSGProcedural RixSGQuadric RixSGVolume

Public Member Functions

virtual RixSGDagType GetDagType () const =0
 
virtual RtUString GetIdentifier () const =0
 
virtual RixSGError SetIdentifier (RtUString identifier)=0
 
virtual RixSGError SetTransform (unsigned numsamples, RtMatrix4x4 const *xforms, float const *times)=0
 
virtual RixSGError SetTransformNumSamples (unsigned numsamples)=0
 
virtual RixSGError SetTransformSample (unsigned sample, RtMatrix4x4 const &xform, float time)=0
 
RixSGError SetTransform (RtMatrix4x4 const &xform)
 
RixSGError SetIdentity ()
 
virtual RixSGError SetHidden (int state)=0
 
virtual int GetHidden () const =0
 
virtual RixSGError AddCoordinateSystem (RixSGGroup *coordsys)=0
 
virtual RixSGError RemoveCoordinateSystem (RixSGGroup *coordsys)=0
 
virtual unsigned GetNumCoordinateSystems () const =0
 
virtual RixSGGroupGetCoordinateSystem (unsigned idx) const =0
 
virtual RixSGError AddChild (RixSGGroup *child)=0
 
virtual RixSGError RemoveChild (RixSGGroup *child)=0
 
virtual unsigned GetNumChildren () const =0
 
virtual RixSGGroupGetChild (unsigned idx) const =0
 
virtual unsigned GetNumParents () const =0
 
virtual RixSGGroupGetParent (unsigned idx) const =0
 
virtual RixSGGroupFindDagNode (char const *path) const =0
 
virtual RixSGMaterialGetMaterial () const =0
 
virtual RixSGError SetMaterial (RixSGMaterial *material)=0
 
virtual RixSGError OverrideMaterial (RixSGMaterial *material, unsigned depth, RixSGGroup **path)=0
 
virtual RtParamList const & GetAttributes () const =0
 
virtual RixSGError SetAttributes (RtParamList const &attributes)=0
 
virtual RixSGError SetNested (bool state)=0
 
virtual bool GetNested () const =0
 
virtual RixSGError SetInheritTransform (bool value)=0
 
 RixSGGroup ()=default
 
virtual ~RixSGGroup ()=default
 

Detailed Description

Base class for scene graph DAG nodes

DAG (directed acyclic graph) nodes exhibit parent-child relationships with other DAG nodes to describe scene hierarchy. They are used to represent basic scene primitives such as transforms, cameras, lights, and geometry.

Definition at line 270 of file RixSceneGraph.h.

Constructor & Destructor Documentation

◆ RixSGGroup()

RixSGGroup::RixSGGroup ( )
inlinedefault

◆ ~RixSGGroup()

virtual RixSGGroup::~RixSGGroup ( )
virtualdefault

Member Function Documentation

◆ AddChild()

virtual RixSGError RixSGGroup::AddChild ( RixSGGroup child)
pure virtual

Add a child DAG node

The scene graph DAG hierarchy is constructed of parent-child relationships where children nodes inherit instance properties from parent nodes such as transformation, attribute state, and coordinate systems.. An object is considered instanced when it is reachable from the scene root via multiple DAG paths. These DAG paths are formed when a child node has multiple parents. In order to form unique DAG paths, node identifiers should be unique among children.

See also
RixSGGroup::RemoveChild
RixSGGroup::GetNumChildren
RixSGGroup::GetChild
RixSGGroup::GetNumParents
RixSGGroup::GetParent
RixSGScene::Root
Parameters
[in]childThe child DAG node
Returns
Error code

◆ AddCoordinateSystem()

virtual RixSGError RixSGGroup::AddCoordinateSystem ( RixSGGroup coordsys)
pure virtual

Add scoped coordinate system

The object-to-world transformation of coordsys nodes are inherited as a named coordinate system that may be used for shading. Transformations are resolved as the closest unique relative path between this node and the coordsys node. Ambigious instance transformations are ignored.

See also
RixSGGroup::RemoveCoordinateSystem
RixSGGroup::GetNumCoordinateSystems
RixSGGroup::GetCoordinateSystem
Parameters
[in]coordsysThe coordinate system node
Returns
Error code

◆ FindDagNode()

virtual RixSGGroup* RixSGGroup::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 this node. DAG node paths should use the same separator given to RixSGManager::CreateScene.

See also
RixSGGroup::SetIdentifier
RixSGManager::CreateScene
Parameters
[in]pathIdentifier path
Returns
The DAG node. Returns nullptr when the specified node cannot be found.

◆ GetAttributes()

virtual RtParamList const& RixSGGroup::GetAttributes ( ) const
pure virtual

Get attribute list

Parameters that are attached to scene graph DAG nodes and may vary per geometry instance are called attributes. In the scene graph, attribute state is inherited by updating parameters along DAG hierarchies to generate the instance attribute list used for rendering. Attributes define instance properties such as visibility as well as user parameters used for instance variation when shading.

See also
RixSGGroup::SetAttributes
Returns
Attribute list

◆ GetChild()

virtual RixSGGroup* RixSGGroup::GetChild ( unsigned  idx) const
pure virtual

Return a pointer to any child DAG nodes

The scene graph DAG hierarchy is constructed of parent-child relationships where children nodes inherit instance properties from parent nodes such as transformation, attribute state, and coordinate systems.. An object is considered instanced when it is reachable from the scene root via multiple DAG paths. These DAG paths are formed when a child node has multiple parents. In order to form unique DAG paths, node identifiers should be unique among children.

See also
RixSGGroup::AddChild
RixSGGroup::RemoveChild
RixSGGroup::GetNumChildren
RixSGGroup::GetNumParents
RixSGGroup::GetParent
RixSGScene::Root
Parameters
[in]idxThe child index
Returns
The child node or nullptr for invalid index

◆ GetCoordinateSystem()

virtual RixSGGroup* RixSGGroup::GetCoordinateSystem ( unsigned  idx) const
pure virtual

Get scoped coordinate system by index

The object-to-world transformation of coordsys nodes are inherited as a named coordinate system that may be used for shading. Transformations are resolved as the closest unique relative path between this node and the coordsys node. Ambigious instance transformations are ignored.

See also
RixSGGroup::AddCoordinateSystem
RixSGGroup::RemoveCoordinateSystem
RixSGGroup::GetNumCoordinateSystems
Parameters
[in]idxThe coordinate system index
Returns
Coordinate system node or nullptr for invalid index

◆ GetDagType()

virtual RixSGDagType RixSGGroup::GetDagType ( ) const
pure virtual

Get the DAG type

The DAG type describes the role of the scene graph node. For example: Group, Camera, Mesh, etc..

Returns
DAG type

◆ GetHidden()

virtual int RixSGGroup::GetHidden ( ) const
pure virtual

Get hidden state

Hidden objects are not visible in render but may still contribute as coordinate systems. The hidden state is inherited when unspecified. The default is unspecified.

See also
RixSGGroup::SetHidden
Returns
Hidden state Hidden state: -1 (unspecified), 0 (unhide), 1 (hide)

◆ GetIdentifier()

virtual RtUString RixSGGroup::GetIdentifier ( ) const
pure virtual

Return the DAG node identifier

Node identifiers are concatenated along DAG hierarchies to uniquely identify DAG paths. Node identifiers themselves do not need to be unique.

See also
RixSGGroup::SetIdentifier
Returns
The DAG node identifier

◆ GetMaterial()

virtual RixSGMaterial* RixSGGroup::GetMaterial ( ) const
pure virtual

Get material binding

Material bindings determine the active bxdf, displacement, and light and light filter shading graph assignments. Materials bindings are inherited and may vary per instance.

See also
RixSGGroup::SetMaterial
RixSGGroup::OverrideMaterial
Returns
Currently bound material container or nullptr if unbound

◆ GetNested()

virtual bool RixSGGroup::GetNested ( ) const
pure virtual

Get nesting state

Nested DAGs avoid flattening during scene transveral. This can reduce memory consumption for heavily nested structures at the cost of slower ray traversal. The default is false.

See also
RixSGGroup::SetNested
Returns
Nested state

◆ GetNumChildren()

virtual unsigned RixSGGroup::GetNumChildren ( ) const
pure virtual

Return the number of child nodes

The scene graph DAG hierarchy is constructed of parent-child relationships where children nodes inherit instance properties from parent nodes such as transformation, attribute state, and coordinate systems.. An object is considered instanced when it is reachable from the scene root via multiple DAG paths. These DAG paths are formed when a child node has multiple parents. In order to form unique DAG paths, node identifiers should be unique among children.

See also
RixSGGroup::AddChild
RixSGGroup::RemoveChild
RixSGGroup::GetChild
RixSGGroup::GetNumParents
RixSGGroup::GetParent
RixSGScene::Root
Returns
The number of children

◆ GetNumCoordinateSystems()

virtual unsigned RixSGGroup::GetNumCoordinateSystems ( ) const
pure virtual

Get the number of scoped coordinate systems

The object-to-world transformation of coordsys nodes are inherited as a named coordinate system that may be used for shading. Transformations are resolved as the closest unique relative path between this node and the coordsys node. Ambigious instance transformations are ignored.

See also
RixSGGroup::AddCoordinateSystem
RixSGGroup::RemoveCoordinateSystem
RixSGGroup::GetCoordinateSystem
Returns
The number of coordinate system nodes

◆ GetNumParents()

virtual unsigned RixSGGroup::GetNumParents ( ) const
pure virtual

Return the number of parent nodes

The scene graph DAG hierarchy is constructed of parent-child relationships where children nodes inherit instance properties from parent nodes such as transformation, attribute state, and coordinate systems.. An object is considered instanced when it is reachable from the scene root via multiple DAG paths. These DAG paths are formed when a child node has multiple parents. In order to form unique DAG paths, node identifiers should be unique among children.

See also
RixSGGroup::AddChild
RixSGGroup::RemoveChild
RixSGGroup::GetNumChildren
RixSGGroup::GetChild
RixSGGroup::GetParent
RixSGScene::Root
Returns
The number of parents

◆ GetParent()

virtual RixSGGroup* RixSGGroup::GetParent ( unsigned  idx) const
pure virtual

Return a pointer to any parent DAG nodes

The scene graph DAG hierarchy is constructed of parent-child relationships where children nodes inherit instance properties from parent nodes such as transformation, attribute state, and coordinate systems.. An object is considered instanced when it is reachable from the scene root via multiple DAG paths. These DAG paths are formed when a child node has multiple parents. In order to form unique DAG paths, node identifiers should be unique among children.

See also
RixSGGroup::AddChild
RixSGGroup::RemoveChild
RixSGGroup::GetNumChildren
RixSGGroup::GetChild
RixSGGroup::GetNumParents
RixSGScene::Root
Parameters
[in]idxThe parent index
Returns
The parent node or nullptr for invalid index

◆ OverrideMaterial()

virtual RixSGError RixSGGroup::OverrideMaterial ( RixSGMaterial material,
unsigned  depth,
RixSGGroup **  path 
)
pure virtual

Override material binding

Material bindings determine the active bxdf, displacement, and light and light filter shading graph assignments. Materials bindings are inherited and may vary per instance. Material binding may be overriden based on a relative DAG path where the terminal node should be this node.

See also
RixSGGroup::SetMaterial
RixSGGroup::GetMaterial
Parameters
[in]materialThe material container
[in]depthThe DAG path depth or zero to remove all overrides.
[in]pathThe DAG path
Returns
Error code

◆ RemoveChild()

virtual RixSGError RixSGGroup::RemoveChild ( RixSGGroup child)
pure virtual

Remove a child DAG node

The scene graph DAG hierarchy is constructed of parent-child relationships where children nodes inherit instance properties from parent nodes such as transformation, attribute state, and coordinate systems.. An object is considered instanced when it is reachable from the scene root via multiple DAG paths. These DAG paths are formed when a child node has multiple parents. In order to form unique DAG paths, node identifiers should be unique among children.

See also
RixSGGroup::AddChild
RixSGGroup::GetNumChildren
RixSGGroup::GetChild
RixSGGroup::GetNumParents
RixSGGroup::GetParent
RixSGScene::Root
Returns
Error code

◆ RemoveCoordinateSystem()

virtual RixSGError RixSGGroup::RemoveCoordinateSystem ( RixSGGroup coordsys)
pure virtual

Remove scoped coordinate system

The object-to-world transformation of coordsys nodes are inherited as a named coordinate system that may be used for shading. Transformations are resolved as the closest unique relative path between this node and the coordsys node. Ambigious instance transformations are ignored.

See also
RixSGGroup::AddCoordinateSystem
RixSGGroup::GetNumCoordinateSystems
RixSGGroup::GetCoordinateSystem
Parameters
[in]coordsysThe coordinate system node
Returns
Error code

◆ SetAttributes()

virtual RixSGError RixSGGroup::SetAttributes ( RtParamList const &  attributes)
pure virtual

Set attribute list

Parameters that are attached to scene graph DAG nodes and may vary per geometry instance are called attributes. In the scene graph, attribute state is inherited by updating parameters along DAG hierarchies to generate the instance attribute list used for rendering. Attributes define instance properties such as visibility as well as user parameters used for instance variation when shading.

See also
RixSGGroup::GetAttributes
Parameters
[in]attributesAttribute list
Returns
Error code

◆ SetHidden()

virtual RixSGError RixSGGroup::SetHidden ( int  state)
pure virtual

Set hidden state

Hidden objects are visible in render but may still contribute as coordinate systems. The hidden state is inherited when unspecified. The default is unspecified.

See also
RixSGGroup::GetHidden
Parameters
[in]stateHidden state: -1 (unspecified), 0 (unhide), 1 (hide)
Returns
Error code

◆ SetIdentifier()

virtual RixSGError RixSGGroup::SetIdentifier ( RtUString  identifier)
pure virtual

Set the DAG node identifier

Node identifiers are concatenated along DAG hierarchies to uniquely identify DAG paths. Node identifiers themselves do not need to be unique.

See also
RixSGGroup::GetIdentifier
Parameters
[in]identifierThe DAG node identifier
Returns
Error code

◆ SetIdentity()

RixSGError RixSGGroup::SetIdentity ( )
inline

Set the identity transform

Identity transforms are concatenated together along DAG hierarchies to generate the object-to-world transform.

See also
RixSGGroup::SetTransform
Returns
Error code

Definition at line 1499 of file RixSceneGraph.h.

◆ SetInheritTransform()

virtual RixSGError RixSGGroup::SetInheritTransform ( bool  value)
pure virtual

Set inherit transform

Enable or disable inheriting parent transformations when generating the object-to-world transform. The default is true.

See also
RixSGGroup::SetTransform
Parameters
[in]valueEnable/disable inherit transform
Returns
Error code

◆ SetMaterial()

virtual RixSGError RixSGGroup::SetMaterial ( RixSGMaterial material)
pure virtual

Set material binding

Material bindings determine the active bxdf, displacement, and light and light filter shading graph assignments. Materials bindings are inherited and may vary per instance.

See also
RixSGGroup::GetMaterial
RixSGGroup::OverrideMaterial
Parameters
[in]materialThe material container or nullptr to unbind
Returns
Error code

◆ SetNested()

virtual RixSGError RixSGGroup::SetNested ( bool  state)
pure virtual

Set nesting state

Nested DAGs avoid flattening during scene transveral. This can reduce memory consumption for heavily nested structures at the cost of slower ray traversal. The default is false.

See also
RixSGGroup::GetNested
Parameters
[in]stateNested state
Returns
Error code

◆ SetTransform() [1/2]

virtual RixSGError RixSGGroup::SetTransform ( unsigned  numsamples,
RtMatrix4x4 const *  xforms,
float const *  times 
)
pure virtual

Set the transform

Transforms are concatenated together along DAG hierarchies to generate the object-to-world transform. Static transforms are described by a single matrix while motion transforms contain a matrix and time value per time sample.

See also
RixSGGroup::SetIdentity
RixSGGroup::SetInheritTransform
Parameters
[in]numsamplesThe number of motion samples
[in]xformsMatrix samples
[in]timesTime samples
Returns
Error code

◆ SetTransform() [2/2]

RixSGError RixSGGroup::SetTransform ( RtMatrix4x4 const &  xform)
inline

Set a static transform

Transforms are concatenated together along DAG hierarchies to generate the object-to-world transform. Static transforms are described by a single matrix while motion transforms contain a matrix and time value per motion sample.

See also
RixSGGroup::SetTransform
Parameters
[in]xformStatic matrix
Returns
Error code

Definition at line 1494 of file RixSceneGraph.h.

◆ SetTransformNumSamples()

virtual RixSGError RixSGGroup::SetTransformNumSamples ( unsigned  numsamples)
pure virtual

Set the number of transform motion samples

Transforms are concatenated together along DAG hierarchies to generate the object-to-world transform. The motion sample count may be set independently of the actual motion sample values.

See also
RixSGGroup::SetTransform
Parameters
[in]numsamplesThe number of motion samples
Returns
Error code

◆ SetTransformSample()

virtual RixSGError RixSGGroup::SetTransformSample ( unsigned  sample,
RtMatrix4x4 const &  xform,
float  time 
)
pure virtual

Set a single transform motion sample

Transforms are concatenated together along DAG hierarchies to generate the object-to-world transform. Motion sample values may be set independently of the motion sample count.

See also
RixSGGroup::SetTransform
Parameters
[in]sampleMotion sample index
[in]xformMatrix sample
[in]timeTime sample
Returns
Error code

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