RenderManAPI  24.0
RixSceneGraph.h
Go to the documentation of this file.
1 /*
2 # ------------------------------------------------------------------------------
3 #
4 # Copyright (c) 2020 Pixar. All rights reserved.
5 #
6 # The information in this file (the "Software") is provided for the exclusive
7 # use of the software licensees of Pixar ("Licensees"). Licensees have the
8 # right to incorporate the Software into other products for use by other
9 # authorized software licensees of Pixar, without fee. Except as expressly
10 # permitted herein, the Software may not be disclosed to third parties, copied
11 # or duplicated in any form, in whole or in part, without the prior written
12 # permission of Pixar.
13 #
14 # The copyright notices in the Software and this entire statement, including the
15 # above license grant, this restriction and the following disclaimer, must be
16 # included in all copies of the Software, in whole or in part, and all permitted
17 # derivative works of the Software, unless such copies or derivative works are
18 # solely in the form of machine-executable object code generated by a source
19 # language processor.
20 #
21 # PIXAR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
22 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL PIXAR BE
23 # LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
24 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
25 # OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
26 # CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. IN NO CASE WILL
27 # PIXAR'S TOTAL LIABILITY FOR ALL DAMAGES ARISING OUT OF OR IN CONNECTION WITH
28 # THE USE OR PERFORMANCE OF THIS SOFTWARE EXCEED $50.
29 #
30 # Pixar
31 # 1200 Park Ave
32 # Emeryville CA 94608
33 #
34 # ------------------------------------------------------------------------------
35 */
36 
37 /*
38  * Version 3
39  *
40  * This is a preview release and is not supported. This API will change substantially
41  * in the next release of RenderMan. Names, namespaces, methods, parameters, types,
42  * enums, and the structure of the interface are expected to change.
43  *
44  */
45 
46 #ifndef RixSceneGraph_h
47 #define RixSceneGraph_h
48 
49 #include "RiTypesHelper.h" // RtUString, RtPoint3, RtMatrix4x4, etc.
50 #include "RixInterfaces.h" // RixInterface
51 
52 namespace stats
53 {
54 class Session;
55 }
56 
57 #define k_RixSGManagerVersion 3
58 #define RMAN_SCENEGRAPH_NAMESPACE scenegraph
59 #define RMAN_SCENEGRAPH_NAMESPACE_OPEN_SCOPE \
60  namespace RMAN_SCENEGRAPH_NAMESPACE \
61  {
62 #define RMAN_SCENEGRAPH_NAMESPACE_CLOSE_SCOPE }
63 
66 
67 class Camera;
68 class Curves;
69 class Geometry;
70 class Group;
71 class AnalyticLight;
72 class Material;
73 class Mesh;
74 class NuPatch;
75 class Points;
76 class Procedural;
77 class Quadric;
78 class Scene;
79 class Volume;
80 class Blobby;
81 struct DisplayChannel;
82 struct Shader;
83 
85 typedef uint64_t (*UpdateIdCallback)(void* ctx, Group const* node, RtUString const& path);
86 
89 enum class Error
90 {
91  k_Success,
94 };
95 
98 enum class DagType
99 {
100  k_Group,
101  k_Camera,
104  k_Geometry,
105  k_Quadric,
106  k_Mesh,
107  k_NuPatch,
108  k_Curves,
109  k_Points,
110  k_Blobby,
111  k_Volume,
112  k_Procedural,
113 };
114 
117 enum class ShaderType
118 {
119  k_Invalid,
120  k_Pattern,
121  k_Bxdf,
122  k_Integrator,
123  k_Light,
124  k_LightFilter,
125  k_Projection,
129  k_Display,
130 };
131 
137 {
139  DisplayChannel();
140 
143 
145  DisplayChannel(DisplayChannel const&) = default;
146 
148  DisplayChannel& operator=(DisplayChannel const&) = default;
149 
152 
155 
158 };
159 
163 struct Shader
164 {
166  Shader();
167 
170 
172  Shader(Shader const&) = default;
173 
175  Shader& operator=(Shader const&) = default;
176 
179 
182 
185 
188 };
189 
194 class Material
195 {
196 public:
204  virtual RtUString GetIdentifier() const = 0;
205 
214  virtual Error SetIdentifier(RtUString identifier) = 0;
215 
225  virtual Error SetBxdf(unsigned num, Shader const* nodes) = 0;
226 
237  virtual Error SetLight(unsigned num, Shader const* nodes) = 0;
238 
249  virtual Error SetLightFilter(unsigned num, Shader const* nodes) = 0;
250 
260  virtual Error SetDisplace(unsigned num, Shader const* nodes) = 0;
261 
262  inline Material() = default;
263  virtual ~Material() = default;
264 };
265 
271 class Group
272 {
273 public:
280  virtual DagType GetDagType() const = 0;
281 
289  virtual RtUString GetIdentifier() const = 0;
290 
299  virtual Error SetIdentifier(RtUString identifier) = 0;
300 
316  virtual Error SetTransform(unsigned numsamples, RtMatrix4x4 const* xforms,
317  float const* times) = 0;
318 
330  virtual Error SetTransformNumSamples(unsigned numsamples) = 0;
331 
344  virtual Error SetTransformSample(unsigned sample, RtMatrix4x4 const& xform, float time) = 0;
345 
355  Error SetTransform(RtMatrix4x4 const& xform);
356 
364  Error SetIdentity();
365 
374  virtual unsigned GetTransformNumSamples() const = 0;
375 
387  virtual Error GetTransformSample(unsigned sample, RtMatrix4x4& xform, float& time) const = 0;
388 
397  virtual Error SetHidden(int state) = 0;
398 
406  virtual int GetHidden() const = 0;
407 
421  virtual Error AddCoordinateSystem(Group* coordsys) = 0;
422 
436  virtual Error RemoveCoordinateSystem(Group* coordsys) = 0;
437 
450  virtual Error RemoveAllCoordinateSystems() = 0;
451 
464  virtual unsigned GetNumCoordinateSystems() const = 0;
465 
479  virtual Group* GetCoordinateSystem(unsigned idx) const = 0;
480 
499  virtual Error AddChild(Group* child) = 0;
500 
519  virtual Error RemoveChild(Group* child) = 0;
520 
538  virtual Error RemoveAllChildren() = 0;
539 
557  virtual unsigned GetNumChildren() const = 0;
558 
577  virtual Group* GetChild(unsigned idx) const = 0;
578 
596  virtual unsigned GetNumParents() const = 0;
597 
616  virtual Group* GetParent(unsigned idx) const = 0;
617 
627  virtual Group* FindDagNode(char const* path) const = 0;
628 
637  virtual Material* GetMaterial() const = 0;
638 
648  virtual Error SetMaterial(Material* material) = 0;
649 
663  virtual Error OverrideMaterial(Material* material, unsigned depth, Group** path) = 0;
664 
675  virtual RtParamList const& GetAttributes() const = 0;
676 
688  virtual Error SetAttributes(RtParamList const& attributes) = 0;
689 
698  virtual Error SetNested(bool state) = 0;
699 
707  virtual bool GetNested() const = 0;
708 
718  virtual Error SetInheritTransform(bool value) = 0;
719 
727  virtual bool GetInheritTransform() const = 0;
728 
730  Group(Group const&) = delete;
731  Group const& operator=(Group const&) = delete;
733 
734  inline Group() = default;
735  virtual ~Group() = default;
736 };
737 
740 class Camera : public virtual Group
741 {
742 public:
751  virtual Error SetRenderable(int renderable) = 0;
752 
761  virtual Error SetProjection(unsigned num, Shader const* nodes) = 0;
762 
772  virtual Error SetDisplay(unsigned num, Shader const* nodes) = 0;
773 
782  virtual Error SetOrientTransform(RtMatrix4x4 const& localxform) = 0;
783 
791  virtual RtParamList const& GetProperties() const = 0;
792 
801  virtual Error SetProperties(RtParamList const& prop) = 0;
802 
803 protected:
804  inline Camera() = default;
805  ~Camera() override = default;
806 };
807 
810 class ClippingPlane : public virtual Group
811 {
812 public:
820  virtual Error SetActive(bool active) = 0;
821 
830  virtual Error SetOrientTransform(RtMatrix4x4 const& localxform) = 0;
831 
832 protected:
833  inline ClippingPlane() = default;
834  ~ClippingPlane() override = default;
835 };
836 
839 class AnalyticLight : public virtual Group
840 {
841 public:
852  virtual Error SetLight(unsigned num, Shader const* nodes) = 0;
853 
863  virtual Error SetLightFilter(unsigned num, Shader const* nodes) = 0;
864 
873  virtual Error SetOrientTransform(RtMatrix4x4 const& localxform) = 0;
874 
881  virtual RtParamList const& GetProperties() const = 0;
882 
890  virtual Error SetProperties(RtParamList const& prop) = 0;
891 
892 protected:
893  inline AnalyticLight() = default;
894  ~AnalyticLight() override = default;
895 };
896 
898 class Geometry : public virtual Group
899 {
900 public:
902  virtual RtUString GetGeometry() const = 0;
903 
918  virtual Error SetGeometry(RtUString type) = 0;
919 
932  virtual RtPrimVarList const& GetPrimVars() const = 0;
933 
947  virtual Error SetPrimVars(RtPrimVarList const& primvars) = 0;
948 
949 protected:
950  inline Geometry() = default;
951  ~Geometry() override = default;
952 };
953 
956 class Quadric : public virtual Geometry
957 {
958 public:
976  virtual Error SetGeometry(RtUString type) = 0;
977 
978 protected:
979  inline Quadric() = default;
980  ~Quadric() override = default;
981 };
982 
985 class Mesh : public virtual Geometry
986 {
987 public:
1007  virtual Error Define(int32_t npolys, int32_t npoints, int32_t nverts) = 0;
1008 
1015  virtual Error SetScheme(RtUString scheme) = 0;
1016 
1017 protected:
1018  inline Mesh() = default;
1019  ~Mesh() override = default;
1020 };
1021 
1024 class Points : public virtual Geometry
1025 {
1026 public:
1041  virtual Error Define(int32_t npoints) = 0;
1042 
1043 protected:
1044  inline Points() = default;
1045  ~Points() override = default;
1046 };
1047 
1049 class Volume : public virtual Geometry
1050 {
1051 public:
1070  virtual Error Define(int32_t nx, int32_t ny, int32_t nz) = 0;
1071 
1072 protected:
1073  inline Volume() = default;
1074  ~Volume() override = default;
1075 };
1076 
1079 class Blobby : public virtual Geometry
1080 {
1081 public:
1100  virtual Error Define(int32_t nleaf) = 0;
1101 
1102 protected:
1103  inline Blobby() = default;
1104  ~Blobby() override = default;
1105 };
1106 
1109 class Curves : public virtual Geometry
1110 {
1111 public:
1163  virtual Error Define(RtUString type, RtUString wrap, RtUString basis, int32_t ncurves,
1164  int32_t npoints) = 0;
1165 
1166 protected:
1167  inline Curves() = default;
1168  ~Curves() override = default;
1169 };
1170 
1172 class NuPatch : public virtual Geometry
1173 {
1174 public:
1212  virtual Error Define(int32_t nu, int32_t uorder, int32_t nv, int32_t vorder) = 0;
1213 
1214 protected:
1215  inline NuPatch() = default;
1216  ~NuPatch() override = default;
1217 };
1218 
1221 class Procedural : public virtual Geometry
1222 {
1223 public:
1238  virtual Error Define(RtUString subdivfunction, RtUString boundfunction) = 0;
1239 
1240 protected:
1241  inline Procedural() = default;
1242  ~Procedural() override = default;
1243 };
1244 
1247 class Scene
1248 {
1249 public:
1256  virtual Material* CreateMaterial(RtUString identifier) = 0;
1257 
1264  virtual Error DeleteMaterial(Material* material) = 0;
1265 
1272  virtual Group* CreateGroup(RtUString identifier) = 0;
1273 
1280  virtual Camera* CreateCamera(RtUString identifier) = 0;
1281 
1288  virtual ClippingPlane* CreateClippingPlane(RtUString identifier) = 0;
1289 
1296  virtual AnalyticLight* CreateAnalyticLight(RtUString identifier) = 0;
1297 
1304  virtual Geometry* CreateGeometry(RtUString identifier) = 0;
1305 
1312  virtual Quadric* CreateQuadric(RtUString identifier) = 0;
1313 
1320  virtual Mesh* CreateMesh(RtUString identifier) = 0;
1321 
1328  virtual Points* CreatePoints(RtUString identifier) = 0;
1329 
1336  virtual Volume* CreateVolume(RtUString identifier) = 0;
1337 
1344  virtual Blobby* CreateBlobby(RtUString identifier) = 0;
1345 
1352  virtual Curves* CreateCurves(RtUString identifier) = 0;
1353 
1360  virtual NuPatch* CreateNuPatch(RtUString identifier) = 0;
1361 
1368  virtual Procedural* CreateProcedural(RtUString identifier) = 0;
1369 
1378  virtual Error DeleteDagNode(Group* node) = 0;
1379 
1388  virtual Group* FindDagNode(char const* path) const = 0;
1389 
1401 
1406  virtual Error Render(char const* cmd) = 0;
1411 
1418  virtual Error Stop() = 0;
1419 
1426  struct ScopedEdit
1427  {
1428  ScopedEdit(Scene* scene);
1429  ~ScopedEdit();
1430  Scene* const sg;
1431  };
1432 
1439  virtual void EditBegin() = 0;
1440 
1447  virtual void EditEnd() = 0;
1448 
1457  virtual Error Clear() = 0;
1458 
1468  virtual Group* Root() const = 0;
1469 
1479  virtual Error SetIntegrator(unsigned num, Shader const* nodes) = 0;
1480 
1491  virtual Error SetSampleFilter(unsigned num, Shader const* nodes) = 0;
1492 
1502  virtual Error SetDisplayFilter(unsigned num, Shader const* nodes) = 0;
1503 
1512  virtual Error SetDisplayChannel(unsigned num, DisplayChannel const* nodes) = 0;
1513 
1522  virtual RtParamList const& GetOptions() const = 0;
1523 
1533  virtual Error SetOptions(RtParamList const& options) = 0;
1534 
1543  virtual Error SetUpdateIdCallback(UpdateIdCallback callback, void* ctx) = 0;
1544 
1546  //
1551  virtual Error InvalidateTexture(RtUString const name) = 0;
1552 
1553 protected:
1554  Scene() = default;
1555  virtual ~Scene() = default;
1556 };
1557 
1558 /* inlined */
1559 
1560 inline DisplayChannel::DisplayChannel() : type(RtDataType::k_float), handle(US_NULL)
1561 {}
1562 
1563 inline DisplayChannel::DisplayChannel(RtDataType t, RtUString h) : type(t), handle(h)
1564 {}
1565 
1566 inline Shader::Shader() : type(ShaderType::k_Invalid), name(US_NULL), handle(US_NULL)
1567 {}
1568 
1569 inline Shader::Shader(ShaderType t, RtUString n, RtUString h) : type(t), name(n), handle(h)
1570 {}
1571 
1573 {
1574  return SetTransform(1, &xform, nullptr);
1575 }
1576 
1578 {
1579  return SetTransformNumSamples(0);
1580 }
1581 
1582 inline Scene::ScopedEdit::ScopedEdit(Scene* scene) : sg(scene)
1583 {
1584  sg->EditBegin();
1585 }
1586 
1588 {
1589  sg->EditEnd();
1590 }
1591 
1593 
1595 
1596 // Backward compatability
1597 typedef RMAN_NAMESPACE::RMAN_SCENEGRAPH_NAMESPACE::AnalyticLight RixSGAnalyticLight;
1598 typedef RMAN_NAMESPACE::RMAN_SCENEGRAPH_NAMESPACE::Blobby RixSGBlobby;
1599 typedef RMAN_NAMESPACE::RMAN_SCENEGRAPH_NAMESPACE::Camera RixSGCamera;
1600 typedef RMAN_NAMESPACE::RMAN_SCENEGRAPH_NAMESPACE::ClippingPlane RixSGClippingPlane;
1601 typedef RMAN_NAMESPACE::RMAN_SCENEGRAPH_NAMESPACE::Curves RixSGCurves;
1603 typedef RMAN_NAMESPACE::RMAN_SCENEGRAPH_NAMESPACE::DisplayChannel RixSGDisplayChannel;
1605 typedef RMAN_NAMESPACE::RMAN_SCENEGRAPH_NAMESPACE::Geometry RixSGGeometry;
1606 typedef RMAN_NAMESPACE::RMAN_SCENEGRAPH_NAMESPACE::Group RixSGGroup;
1607 typedef RMAN_NAMESPACE::RMAN_SCENEGRAPH_NAMESPACE::Material RixSGMaterial;
1608 typedef RMAN_NAMESPACE::RMAN_SCENEGRAPH_NAMESPACE::Mesh RixSGMesh;
1609 typedef RMAN_NAMESPACE::RMAN_SCENEGRAPH_NAMESPACE::NuPatch RixSGNuPatch;
1610 typedef RMAN_NAMESPACE::RMAN_SCENEGRAPH_NAMESPACE::Points RixSGPoints;
1611 typedef RMAN_NAMESPACE::RMAN_SCENEGRAPH_NAMESPACE::Procedural RixSGProcedural;
1612 typedef RMAN_NAMESPACE::RMAN_SCENEGRAPH_NAMESPACE::Quadric RixSGQuadric;
1613 typedef RMAN_NAMESPACE::RMAN_SCENEGRAPH_NAMESPACE::Scene RixSGScene;
1614 typedef RMAN_NAMESPACE::RMAN_SCENEGRAPH_NAMESPACE::Shader RixSGShader;
1617 typedef RMAN_NAMESPACE::RMAN_SCENEGRAPH_NAMESPACE::Volume RixSGVolume;
1618 
1621 {
1622 public:
1629  virtual RixSGScene* CreateScene(RtParamList const& config, RtParamList const& renderConfig, stats::Session& statsSession) = 0;
1630 
1635  virtual RixSGError DeleteScene(RixSGScene* scene) = 0;
1636 
1637 protected:
1639  {}
1640  ~RixSGManager() override = default;
1641 };
1642 
1643 #endif // RixSceneGraph_h
#define US_NULL
Definition: RiTypesHelper.h:683
virtual ~Group()=default
Custom proceudral geometry.
RMAN_NAMESPACE::RMAN_SCENEGRAPH_NAMESPACE::DagType RixSGDagType
Definition: RixSceneGraph.h:1602
Analytic light DAG node support RixLight plug-ins.
Definition: RixSceneGraph.h:839
virtual AnalyticLight * CreateAnalyticLight(RtUString identifier)=0
Create a analytic DAG light.
RtUString name
Shading node name, e.g. PxrDiffuse.
Definition: RixSceneGraph.h:181
Output display driver.
RtUString handle
Display channel name, e.g. "Ci".
Definition: RixSceneGraph.h:154
Primary sample filter.
virtual Error SetTransform(unsigned numsamples, RtMatrix4x4 const *xforms, float const *times)=0
Set the transform.
Define scoped edit block.
Definition: RixSceneGraph.h:1426
RMAN_NAMESPACE::RMAN_SCENEGRAPH_NAMESPACE::Volume RixSGVolume
Definition: RixSceneGraph.h:1617
virtual Group * FindDagNode(char const *path) const =0
Find a DAG node from a identifier path.
virtual unsigned GetTransformNumSamples() const =0
Return the number of transform motion samples.
Scene *const sg
Definition: RixSceneGraph.h:1430
virtual Error InvalidateTexture(RtUString const name)=0
Invalidate a texture.
virtual Error SetGeometry(RtUString type)=0
Define special geometry.
virtual Error RemoveCoordinateSystem(Group *coordsys)=0
Remove scoped coordinate system.
virtual Error SetTransformNumSamples(unsigned numsamples)=0
Set the number of transform motion samples.
Invalid shading node.
~Geometry() override=default
RixSGManager()
Definition: RixSceneGraph.h:1638
virtual void EditBegin()=0
Start an edit block.
RMAN_NAMESPACE::RMAN_SCENEGRAPH_NAMESPACE::Scene RixSGScene
Definition: RixSceneGraph.h:1613
RMAN_NAMESPACE::RMAN_SCENEGRAPH_NAMESPACE::Group RixSGGroup
Definition: RixSceneGraph.h:1606
virtual unsigned GetNumChildren() const =0
Return the number of child nodes.
Implicit surface geometry.
Nurbs patches.
Shader & operator=(Shader const &)=default
Default assign operator.
Scene graph display channel description.
Definition: RixSceneGraph.h:136
virtual bool GetNested() const =0
Get nesting state.
~ClippingPlane() override=default
virtual Error SetMaterial(Material *material)=0
Set material binding.
virtual RtUString GetGeometry() const =0
Return geometry type.
virtual Error SetAttributes(RtParamList const &attributes)=0
Set attribute list.
uint64_t(* UpdateIdCallback)(void *ctx, Group const *node, RtUString const &path)
Callback type used to optionally set object ids.
Definition: RixSceneGraph.h:85
virtual Error Define(int32_t npolys, int32_t npoints, int32_t nverts)=0
Define a polygon or subdivision mesh.
#define RMAN_SCENEGRAPH_NAMESPACE_OPEN_SCOPE
Definition: RixSceneGraph.h:59
Base class for all Rix interfaces.
Definition: RixInterfaces.h:133
#define RMAN_SCENEGRAPH_NAMESPACE_CLOSE_SCOPE
Definition: RixSceneGraph.h:62
pxrcore::ParamList RtParamList
Definition: RiTypesHelper.h:687
virtual Error Clear()=0
Clear the scenegraph.
virtual Error SetLightFilter(unsigned num, Shader const *nodes)=0
Set geometric light filter shading graph.
virtual Error RemoveAllCoordinateSystems()=0
Remove all scoped coordinate systems.
Volume()=default
virtual Curves * CreateCurves(RtUString identifier)=0
Create a curves DAG object.
virtual NuPatch * CreateNuPatch(RtUString identifier)=0
Create a NURBS DAG object.
virtual RtPrimVarList const & GetPrimVars() const =0
Get primitive variable list.
RMAN_SCENEGRAPH_NAMESPACE_CLOSE_SCOPE RMAN_NAMESPACE_CLOSE_SCOPE typedef RMAN_NAMESPACE::RMAN_SCENEGRAPH_NAMESPACE::AnalyticLight RixSGAnalyticLight
Definition: RixSceneGraph.h:1597
Quadric geometry, e.g. spheres.
Polygon or subdivision mesh.
Definition: RixSceneGraph.h:985
virtual ~Material()=default
virtual unsigned GetNumCoordinateSystems() const =0
Get the number of scoped coordinate systems.
virtual Group * Root() const =0
Return root node.
virtual Error DeleteDagNode(Group *node)=0
Delete a DAG node.
virtual Error SetDisplace(unsigned num, Shader const *nodes)=0
Set displace shading graph.
virtual Error SetBxdf(unsigned num, Shader const *nodes)=0
Set bxdf shading graph.
virtual ClippingPlane * CreateClippingPlane(RtUString identifier)=0
Create a DAG render camera.
Error
Scene graph error codes.
Definition: RixSceneGraph.h:89
virtual Error SetLightFilter(unsigned num, Shader const *nodes)=0
Set analytic light filter shading graph.
Operation not permitted in current state.
Shader()
Default constructor of invalid type.
Definition: RixSceneGraph.h:1566
virtual Error Stop()=0
Stop a live render.
Polygon and subdivision meshes.
virtual bool GetInheritTransform() const =0
Return inherit transform.
RMAN_NAMESPACE::RMAN_SCENEGRAPH_NAMESPACE::Shader RixSGShader
Definition: RixSceneGraph.h:1614
virtual Group * GetChild(unsigned idx) const =0
Return a pointer to any child DAG nodes.
virtual Error SetRenderable(int renderable)=0
Set renderable mode.
virtual Material * CreateMaterial(RtUString identifier)=0
Create scene graph material.
RMAN_NAMESPACE::RMAN_SCENEGRAPH_NAMESPACE::Blobby RixSGBlobby
Definition: RixSceneGraph.h:1598
virtual Error DeleteMaterial(Material *material)=0
Delete scene graph material.
virtual Error SetGeometry(RtUString type)=0
Define quadric geometry.
virtual Error Define(int32_t nleaf)=0
Define blobby implicit surfaces.
~NuPatch() override=default
virtual Error SetScheme(RtUString scheme)=0
Set subdivision scheme.
virtual Error SetOptions(RtParamList const &options)=0
Set option list.
virtual Procedural * CreateProcedural(RtUString identifier)=0
Create a procedural DAG object.
virtual unsigned GetNumParents() const =0
Return the number of parent nodes.
RMAN_NAMESPACE::RMAN_SCENEGRAPH_NAMESPACE::Error RixSGError
Definition: RixSceneGraph.h:1604
RMAN_NAMESPACE::RMAN_SCENEGRAPH_NAMESPACE::Quadric RixSGQuadric
Definition: RixSceneGraph.h:1612
virtual Points * CreatePoints(RtUString identifier)=0
Create a points DAG object.
DisplayChannel()
Default constructor of float type.
Definition: RixSceneGraph.h:1560
virtual DagType GetDagType() const =0
Get the DAG type.
pxrcore::DataType RtDataType
Definition: RiTypesHelper.h:685
virtual Error RemoveChild(Group *child)=0
Remove a child DAG node.
#define k_RixSGManagerVersion
Definition: RixSceneGraph.h:57
virtual Error SetInheritTransform(bool value)=0
Set inherit transform.
ShaderType
Scene graph shading node types.
Definition: RixSceneGraph.h:117
Operation input is invalid.
Special geometry DAG node.
Definition: RixSceneGraph.h:898
Blobby()=default
RMAN_NAMESPACE::RMAN_SCENEGRAPH_NAMESPACE::Camera RixSGCamera
Definition: RixSceneGraph.h:1599
virtual Error SetIntegrator(unsigned num, Shader const *nodes)=0
Set integrator shading graph.
virtual Error RemoveAllChildren()=0
Remove all child DAG nodes.
virtual Error SetPrimVars(RtPrimVarList const &primvars)=0
Set primitive variable list.
virtual RtUString GetIdentifier() const =0
Return the DAG node identifier.
DisplayChannel & operator=(DisplayChannel const &)=default
Default assign operator.
#define RMAN_NAMESPACE_OPEN_SCOPE
Definition: prmanapi.h:73
virtual Camera * CreateCamera(RtUString identifier)=0
Create a DAG render camera.
RtUString handle
User specified identifier, e.g. "diffuse1".
Definition: RixSceneGraph.h:184
virtual int GetHidden() const =0
Get hidden state.
Hair, ribbion, and curve geometry.
virtual RtUString GetIdentifier() const =0
Get material identifier.
Points()=default
virtual Geometry * CreateGeometry(RtUString identifier)=0
Create a basic geometric DAG object.
Textural pattern.
virtual Group * GetParent(unsigned idx) const =0
Return a pointer to any parent DAG nodes.
virtual Group * GetCoordinateSystem(unsigned idx) const =0
Get scoped coordinate system by index.
virtual Error Define(int32_t nx, int32_t ny, int32_t nz)=0
Define volume geometry.
virtual Error SetProjection(unsigned num, Shader const *nodes)=0
Set projection shading graph.
pxrcore::PrimVarList RtPrimVarList
Definition: RiTypesHelper.h:688
Curves.
Definition: RixSceneGraph.h:1109
virtual Volume * CreateVolume(RtUString identifier)=0
Create a volume DAG object.
RMAN_NAMESPACE::RMAN_SCENEGRAPH_NAMESPACE::Procedural RixSGProcedural
Definition: RixSceneGraph.h:1611
#define RMAN_NAMESPACE_CLOSE_SCOPE
Definition: prmanapi.h:74
virtual Error SetTransformSample(unsigned sample, RtMatrix4x4 const &xform, float time)=0
Set a single transform motion sample.
virtual Group * FindDagNode(char const *path) const =0
Find a DAG node from a identifier path.
virtual Error SetIdentifier(RtUString identifier)=0
Set the DAG node identifier.
virtual Error SetProperties(RtParamList const &prop)=0
Set light properties.
RMAN_NAMESPACE::RMAN_SCENEGRAPH_NAMESPACE::NuPatch RixSGNuPatch
Definition: RixSceneGraph.h:1609
virtual Error SetDisplayChannel(unsigned num, DisplayChannel const *nodes)=0
Set display channels.
virtual Error SetOrientTransform(RtMatrix4x4 const &localxform)=0
Set orientation transform.
Scene()=default
Camera projection.
Volume geometry.
~Volume() override=default
virtual Blobby * CreateBlobby(RtUString identifier)=0
Create a blobby DAG object.
RMAN_NAMESPACE::RMAN_SCENEGRAPH_NAMESPACE::Curves RixSGCurves
Definition: RixSceneGraph.h:1601
RMAN_NAMESPACE::RMAN_SCENEGRAPH_NAMESPACE::DisplayChannel RixSGDisplayChannel
Definition: RixSceneGraph.h:1603
virtual Group * CreateGroup(RtUString identifier)=0
Create a group DAG node.
RMAN_NAMESPACE::RMAN_SCENEGRAPH_NAMESPACE::ShaderType RixSGShaderType
Definition: RixSceneGraph.h:1615
virtual Error AddCoordinateSystem(Group *coordsys)=0
Add scoped coordinate system.
Quadric()=default
virtual Error Define(RtUString type, RtUString wrap, RtUString basis, int32_t ncurves, int32_t npoints)=0
Define curves geometry.
virtual Error SetUpdateIdCallback(UpdateIdCallback callback, void *ctx)=0
Optional callback to provide the object ids.
virtual Material * GetMaterial() const =0
Get material binding.
Scene graph shader node descriptions.
Definition: RixSceneGraph.h:163
virtual RtParamList const & GetProperties() const =0
Get camera properties.
Scene graph material description.
Definition: RixSceneGraph.h:194
Procedural primitive.
Definition: RixSceneGraph.h:1221
Clipping plane DAG node with arbitrary orientation.
Definition: RixSceneGraph.h:810
AnalyticLight()=default
virtual RtParamList const & GetOptions() const =0
Get option list.
Points DAG node.
Definition: RixSceneGraph.h:1024
Volume geometry.
Definition: RixSceneGraph.h:1049
Procedural()=default
~AnalyticLight() override=default
virtual Error SetLight(unsigned num, Shader const *nodes)=0
Set analytic light shading graph.
Definition: RixSceneGraph.h:52
virtual ~Scene()=default
~Quadric() override=default
Mesh()=default
virtual Error SetDisplay(unsigned num, Shader const *nodes)=0
Set display drivers.
~Camera() override=default
virtual Quadric * CreateQuadric(RtUString identifier)=0
Create a quadric DAG primitve.
RMAN_NAMESPACE::RMAN_SCENEGRAPH_NAMESPACE::Material RixSGMaterial
Definition: RixSceneGraph.h:1607
Point particle and disk geometry.
virtual Error SetOrientTransform(RtMatrix4x4 const &localxform)=0
Set orientation transform.
ShaderType type
Shading node type, e.g., pattern, bxdf, etc.
Definition: RixSceneGraph.h:178
virtual Error SetDisplayFilter(unsigned num, Shader const *nodes)=0
Set display filter shading graph.
virtual Error Define(int32_t npoints)=0
Define points geometry.
Light emission filter.
~Blobby() override=default
~Mesh() override=default
Group()=default
RixInterface for constructing and manipulating scene graphs.
Definition: RixSceneGraph.h:1247
virtual Error GetTransformSample(unsigned sample, RtMatrix4x4 &xform, float &time) const =0
Get a single transform motion sample.
Analytic lights.
NuPatch()=default
~Procedural() override=default
virtual Error SetProperties(RtParamList const &prop)=0
Set camera properties.
pxrcore::Matrix4x4 RtMatrix4x4
Definition: RiTypesHelper.h:74
Curves()=default
RtParamList params
Display channel parameters.
Definition: RixSceneGraph.h:157
virtual RtParamList const & GetProperties() const =0
Get light properties.
Blobby Implicit Surfaces.
Definition: RixSceneGraph.h:1079
virtual Error Define(int32_t nu, int32_t uorder, int32_t nv, int32_t vorder)=0
Define NURBS geometry.
RMAN_NAMESPACE::RMAN_SCENEGRAPH_NAMESPACE::UpdateIdCallback RixSGUpdateIdCallback
Definition: RixSceneGraph.h:1616
Grouping and transformations.
virtual Error SetActive(bool active)=0
Enable clipping plane.
virtual Mesh * CreateMesh(RtUString identifier)=0
Create a geometric DAG mesh.
virtual Error Render(char const *cmd)=0
Start a live render, batch render, or scene export.
pxrcore::UString RtUString
Definition: RiTypesHelper.h:682
NuPatch.
Definition: RixSceneGraph.h:1172
~Points() override=default
virtual Error SetIdentifier(RtUString identifier)=0
Set material identifier.
virtual Error SetLight(unsigned num, Shader const *nodes)=0
Set geometry light shading graph.
RMAN_NAMESPACE::RMAN_SCENEGRAPH_NAMESPACE::Mesh RixSGMesh
Definition: RixSceneGraph.h:1608
Quadric geometry DAG node.
Definition: RixSceneGraph.h:956
RtDataType type
Display channel type, e.g. color.
Definition: RixSceneGraph.h:151
Camera DAG node used for rendering and texture projections.
Definition: RixSceneGraph.h:740
Special geometry.
virtual void EditEnd()=0
Finish an edit block.
Error SetIdentity()
Set the identity transform.
Definition: RixSceneGraph.h:1577
ClippingPlane()=default
DagType
Scene graph DAG node types.
Definition: RixSceneGraph.h:98
Surface displacement.
virtual Error AddChild(Group *child)=0
Add a child DAG node.
RtParamList params
Shading node parameters.
Definition: RixSceneGraph.h:187
RMAN_NAMESPACE::RMAN_SCENEGRAPH_NAMESPACE::Geometry RixSGGeometry
Definition: RixSceneGraph.h:1605
virtual Error SetOrientTransform(RtMatrix4x4 const &localxform)=0
Set orientation transform.
Camera()=default
Surface, subsurface, volumetric scattering.
Entry point for constructing and manipulating scene graphs.
Definition: RixSceneGraph.h:1620
virtual Error SetHidden(int state)=0
Set hidden state.
virtual Error Define(RtUString subdivfunction, RtUString boundfunction)=0
Define procedural.
virtual RtParamList const & GetAttributes() const =0
Get attribute list.
Geometry()=default
RMAN_NAMESPACE::RMAN_SCENEGRAPH_NAMESPACE::ClippingPlane RixSGClippingPlane
Definition: RixSceneGraph.h:1600
virtual Error SetSampleFilter(unsigned num, Shader const *nodes)=0
Set sample filter shading graph.
Base class for scene graph DAG nodes.
Definition: RixSceneGraph.h:271
ScopedEdit(Scene *scene)
Definition: RixSceneGraph.h:1582
RMAN_NAMESPACE::RMAN_SCENEGRAPH_NAMESPACE::Points RixSGPoints
Definition: RixSceneGraph.h:1610
Analytic and geometric light emission.
~ScopedEdit()
Definition: RixSceneGraph.h:1587
virtual Error SetNested(bool state)=0
Set nesting state.
Clipping planes.
~Curves() override=default
Material()=default
virtual Error OverrideMaterial(Material *material, unsigned depth, Group **path)=0
Override material binding.