MDL SDK API nvidia_logo_transpbg.gif Up
mdl_generated_dag.h
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright 2024 NVIDIA Corporation. All rights reserved.
3 *****************************************************************************/
6#ifndef MDL_GENERATED_DAG_H
7#define MDL_GENERATED_DAG_H 1
8
9#include <cstring>
10#include <mi/mdl/mdl_iowned.h>
11#include <mi/mdl/mdl_generated_code.h>
12#include <mi/mdl/mdl_values.h>
13
14namespace mi {
15namespace mdl {
16
17class ICall_name_resolver;
18class IResource_modifier;
19class IValue;
20class IValue_float;
21class IValue_resource;
22class IValue_factory;
23class Messages;
24class IType_factory;
25
30class DAG_hash {
31public:
34 memset(hash, 0, sizeof(hash));
35 }
36
40 explicit DAG_hash(unsigned char const (&arr)[16])
41 {
42 memcpy(hash, arr, sizeof(hash));
43 }
44
48 bool operator==(DAG_hash const &other) const {
49 return memcmp(hash, other.hash, sizeof(hash)) == 0;
50 }
51
55 bool operator!=(DAG_hash const &other) const {
56 return memcmp(hash, other.hash, sizeof(hash)) != 0;
57 }
58
62 bool operator<(DAG_hash const &other) const {
63 return memcmp(hash, other.hash, sizeof(hash)) < 0;
64 }
65
69 bool operator<=(DAG_hash const &other) const {
70 return memcmp(hash, other.hash, sizeof(hash)) <= 0;
71 }
72
76 bool operator>(DAG_hash const &other) const {
77 return memcmp(hash, other.hash, sizeof(hash)) > 0;
78 }
79
83 bool operator>=(DAG_hash const &other) const {
84 return memcmp(hash, other.hash, sizeof(hash)) >= 0;
85 }
86
90 unsigned char operator[](size_t n) const {
91 if (n < 16)
92 return hash[n];
93 return 0;
94 }
95
99 unsigned char *data() {
100 return hash;
101 }
102
106 unsigned char const *data() const {
107 return hash;
108 }
109
111 static size_t size() { return 16; }
112
113private:
114 unsigned char hash[16];
115};
116
118class DAG_node : public Interface_owned {
119public:
121 enum Kind {
126 };
127
129 virtual Kind get_kind() const = 0;
130
132 virtual IType const *get_type() const = 0;
133
138 virtual size_t get_id() const = 0;
139};
140
144class DAG_constant : public DAG_node {
145public:
147 static Kind const s_kind = EK_CONSTANT;
148
150 virtual IValue const *get_value() const = 0;
151};
152
157class DAG_temporary : public DAG_node {
158public:
160 static Kind const s_kind = EK_TEMPORARY;
161
163 virtual int get_index() const = 0;
164
166 virtual DAG_node const *get_expr() const = 0;
167};
168
173class DAG_call : public DAG_node {
174public:
179 arg = NULL;
180 param_name = NULL;
181 }
182
188 DAG_node const *arg,
189 char const *param_name)
190 : arg(arg)
192 {}
193
194 DAG_node const *arg;
195 char const *param_name;
196 };
197
198public:
200 static Kind const s_kind = EK_CALL;
201
205 virtual char const *get_name() const = 0;
206
210 virtual int get_argument_count() const = 0;
211
216 virtual char const *get_parameter_name(int index) const = 0;
217
222 virtual DAG_node const *get_argument(int index) const = 0;
223
229 virtual DAG_node const *get_argument(char const *name) const = 0;
230
232 virtual IDefinition::Semantics get_semantic() const = 0;
233
238 virtual void set_argument(
239 int index,
240 DAG_node const *arg) = 0;
241
243 virtual size_t get_name_hash() const = 0;
244};
245
250class DAG_parameter : public DAG_node {
251public:
253 static Kind const s_kind = EK_PARAMETER;
254
256 virtual int get_index() const = 0;
257};
258
260class IResource_tagger : public Interface_owned {
261public:
265 virtual int get_resource_tag(
266 IValue_resource const *res) const = 0;
267};
268
277class IDag_builder : public
279 <0x01dbe5fb,0xa13d,0x42eb,0xbe,0x3e,0x0a,0x1d,0x2c,0x53,0x11,0xdf,
280 mi::base::IInterface>
281{
282public:
284 virtual IType_factory *get_type_factory() = 0;
285
287 virtual IValue_factory *get_value_factory() = 0;
288
293 virtual DAG_constant const *create_constant(IValue const *value) = 0;
294
303 virtual DAG_node const *create_call(
304 char const *signature,
305 IDefinition::Semantics sema,
306 DAG_call::Call_argument const call_args[],
307 int num_call_args,
308 IType const *ret_type) = 0;
309
316 IType const *type,
317 int index) = 0;
318
323 virtual bool enable_cse(bool flag) = 0;
324
329 virtual bool enable_opt(bool flag) = 0;
330
335 virtual bool enable_unsafe_math_opt(bool flag) = 0;
336};
337
347public:
353 IDefinition::Semantics sema) const = 0;
354
363 virtual IValue const *evaluate_intrinsic_function(
364 IValue_factory *value_factory,
365 IDefinition::Semantics sema,
366 IValue const * const arguments[],
367 size_t n_arguments) const = 0;
368};
369
370// forward
372
383};
384
391 mi::base::Interface_declare<0x9dbfd12e,0x8207,0x4a47,0x8c,0x1f,0x5f,0x9a,0xc4,0x9b,0x00,0xf6,
392 IGenerated_code>
393{
394public:
399 FP_USES_TEXTURES = 2,
406 };
407
411 };
412
415 {
416 public:
421 virtual DAG_constant const *create_constant(IValue const *value) = 0;
422
428 virtual DAG_temporary const *create_temporary(DAG_node const *node, int index) = 0;
429
438 virtual DAG_node const *create_call(
439 char const *signature,
440 IDefinition::Semantics sema,
441 DAG_call::Call_argument const call_args[],
442 int num_call_args,
443 IType const *ret_type) = 0;
444
450 virtual DAG_parameter const *create_parameter(IType const *type, int index) = 0;
451
456 virtual bool enable_cse(bool flag) = 0;
457
462 virtual bool enable_opt(bool flag) = 0;
463
468 virtual bool enable_unsafe_math_opt(bool flag) = 0;
469
473 virtual bool get_unsafe_math_opt() const = 0;
474
478 virtual IType_factory *get_type_factory() = 0;
479
483 virtual IValue_factory *get_value_factory() = 0;
484 };
485
486 static char const MESSAGE_CLASS = 'C';
487
489
490 // -------------------------- methods --------------------------
491
492public:
494 virtual char const *get_module_name() const = 0;
495
497 virtual char const *get_module_file_name() const = 0;
498
501 virtual size_t get_import_count() const = 0;
502
507 virtual char const *get_import(size_t index) const = 0;
508
512 virtual size_t get_function_count() const = 0;
513
518 virtual IType const *get_function_return_type(size_t function_index) const = 0;
519
524 virtual IDefinition::Semantics get_function_semantics(size_t function_index) const = 0;
525
530 virtual char const *get_function_name(size_t function_index) const = 0;
531
536 virtual char const *get_simple_function_name(size_t function_index) const = 0;
537
543 virtual char const *get_original_function_name(size_t function_index) const = 0;
544
549 virtual size_t get_function_parameter_count(size_t function_index) const = 0;
550
557 virtual IType const *get_function_parameter_type(
558 size_t function_index,
559 size_t parameter_index) const = 0;
560
567 size_t function_index,
568 size_t parameter_index) const = 0;
569
576 virtual char const *get_function_parameter_name(
577 size_t function_index,
578 size_t parameter_index) const = 0;
579
586 size_t function_index,
587 char const *parameter_name) const = 0;
588
595 size_t function_index,
596 size_t parameter_index) const = 0;
597
604 size_t function_index,
605 size_t parameter_index) const = 0;
606
614 size_t function_index,
615 size_t parameter_index,
616 size_t user_index) const = 0;
617
624 size_t function_index) const = 0;
625
629 virtual size_t get_material_count() const = 0;
630
634 virtual IType const *get_material_return_type(size_t material_index) const = 0;
635
639 virtual IDefinition::Semantics get_material_semantics(size_t material_index) const = 0;
640
645 virtual char const *get_material_name(size_t material_index) const = 0;
646
651 virtual char const *get_simple_material_name(size_t material_index) const = 0;
652
657 virtual char const *get_original_material_name(size_t material_index) const = 0;
658
663 virtual size_t get_material_parameter_count(size_t material_index) const = 0;
664
671 virtual IType const *get_material_parameter_type(
672 size_t material_index,
673 size_t parameter_index) const = 0;
674
682 size_t material_index,
683 size_t parameter_index) const = 0;
684
691 virtual char const *get_material_parameter_name(
692 size_t material_index,
693 size_t parameter_index) const = 0;
694
701 size_t material_index,
702 char const *parameter_name) const = 0;
703
710 size_t material_index,
711 size_t parameter_index) const = 0;
712
719 size_t material_index,
720 size_t parameter_index) const = 0;
721
729 size_t material_index,
730 size_t parameter_index,
731 size_t user_index) const = 0;
732
739 size_t material_index) const = 0;
740
743
749 size_t function_index) const = 0;
750
757 size_t function_index,
758 size_t annotation_index) const = 0;
759
765 size_t function_index) const = 0;
766
773 size_t function_index,
774 size_t annotation_index) const = 0;
775
783 size_t function_index,
784 size_t parameter_index) const = 0;
785
793 size_t function_index,
794 size_t parameter_index) const = 0;
795
804 size_t function_index,
805 size_t parameter_index,
806 size_t annotation_index) const = 0;
807
813 size_t function_index) const = 0;
814
821 size_t function_index,
822 size_t temporary_index) const = 0;
823
829 virtual char const *get_function_temporary_name(
830 size_t function_index,
831 size_t temporary_index) const = 0;
832
838 size_t function_index) const = 0;
839
846 size_t function_index) const = 0;
847
852 virtual bool get_function_exported(size_t function_index) const = 0;
853
860 size_t function_index,
861 Function_property fp) const = 0;
862
867 virtual size_t get_function_references_count(size_t function_index) const = 0;
868
874 virtual char const *get_function_reference(
875 size_t function_index,
876 size_t callee_index) const = 0;
877
883 virtual char const *get_cloned_function_name(
884 size_t function_index) const = 0;
885
891 size_t material_index) const = 0;
892
899 size_t material_index,
900 size_t annotation_index) const = 0;
901
909 size_t material_index,
910 size_t parameter_index) const = 0;
911
917 size_t material_index) const = 0;
918
925 size_t material_index,
926 size_t annotation_index) const = 0;
927
935 size_t material_index,
936 size_t parameter_index) const = 0;
937
946 size_t material_index,
947 size_t parameter_index,
948 size_t annotation_index) const = 0;
949
955 size_t material_index) const = 0;
956
963 size_t material_index,
964 size_t temporary_index) const = 0;
965
971 virtual char const *get_material_temporary_name(
972 size_t material_index,
973 size_t temporary_index) const = 0;
974
980 size_t material_index) const = 0;
981
987 size_t material_index) const = 0;
988
993 virtual bool get_material_exported(size_t material_index) const = 0;
994
1000 size_t material_index,
1001 Function_property fp) const = 0;
1002
1007 virtual size_t get_material_references_count(size_t material_index) const = 0;
1008
1014 virtual char const *get_material_reference(
1015 size_t material_index,
1016 size_t callee_index) const = 0;
1017
1023 virtual char const *get_cloned_material_name(
1024 size_t material_index) const = 0;
1025
1033 size_t index,
1034 Error_code *error_code = NULL) const = 0;
1035
1038 virtual size_t get_struct_category_count() const = 0;
1039
1044 virtual char const *get_struct_category_name(
1045 size_t index) const = 0;
1046
1051 virtual IStruct_category const *get_struct_category(
1052 size_t index) const = 0;
1053
1059 size_t index) const = 0;
1060
1068 size_t cat_index,
1069 size_t annotation_index) const = 0;
1070
1076 size_t index) const = 0;
1077
1079 virtual size_t get_type_count() const = 0;
1080
1085 virtual char const *get_type_name(
1086 size_t index) const = 0;
1087
1092 virtual char const *get_original_type_name(
1093 size_t index) const = 0;
1094
1099 virtual IType const *get_type(
1100 size_t index) const = 0;
1101
1106 virtual bool is_type_exported(
1107 size_t index) const = 0;
1108
1114 size_t index) const = 0;
1115
1122 size_t type_index,
1123 size_t annotation_index) const = 0;
1124
1130 size_t type_index) const = 0;
1131
1137 virtual char const *get_type_sub_entity_name(
1138 size_t type_index,
1139 size_t entity_index) const = 0;
1140
1146 virtual IType const *get_type_sub_entity_type(
1147 size_t type_index,
1148 size_t entity_index) const = 0;
1149
1157 size_t type_index,
1158 size_t entity_index) const = 0;
1159
1168 size_t type_index,
1169 size_t entity_index,
1170 size_t annotation_index) const = 0;
1171
1173 virtual size_t get_constant_count() const = 0;
1174
1179 virtual char const *get_constant_name(
1180 size_t index) const = 0;
1181
1187 size_t index) const = 0;
1188
1193 size_t index) const = 0;
1194
1201 size_t constant_index,
1202 size_t annotation_index) const = 0;
1203
1205 virtual Messages const &access_messages() const = 0;
1206
1208 virtual Messages &access_messages() = 0;
1209
1211 virtual size_t get_memory_size() const = 0;
1212
1216 virtual size_t get_module_annotation_count() const = 0;
1217
1223 size_t annotation_index) const = 0;
1224
1226 virtual char const *get_internal_space() const = 0;
1227
1231 virtual size_t get_annotation_count() const = 0;
1232
1237 virtual IDefinition::Semantics get_annotation_semantics(
1238 size_t annotation_index) const = 0;
1239
1244 virtual char const *get_annotation_name(
1245 size_t annotation_index) const = 0;
1246
1251 virtual char const *get_simple_annotation_name(
1252 size_t annotation_index) const = 0;
1253
1259 virtual char const *get_original_annotation_name(
1260 size_t annotation_index) const = 0;
1261
1267 size_t annotation_index) const = 0;
1268
1275 virtual IType const *get_annotation_parameter_type(
1276 size_t annotation_index,
1277 size_t parameter_index) const = 0;
1278
1285 size_t annotation_index,
1286 size_t parameter_index) const = 0;
1287
1295 size_t annotation_index,
1296 size_t parameter_index) const = 0;
1297
1304 size_t annotation_index,
1305 char const *parameter_name) const = 0;
1306
1314 size_t annotation_index,
1315 size_t parameter_index) const = 0;
1316
1323 size_t annotation_index,
1324 Annotation_property ap) const = 0;
1325
1331 size_t annotation_index) const = 0;
1332
1339 size_t anno_decl_index,
1340 size_t annotation_index) const = 0;
1341
1345 virtual int get_resource_tag(
1346 IValue_resource const *res) const = 0;
1347
1352 virtual void set_resource_tag(
1353 IValue_resource const *res,
1354 int tag) = 0;
1355
1357 virtual size_t get_resource_tag_map_entries_count() const = 0;
1358
1362 virtual Resource_tag_tuple const *get_resource_tag_map_entry(size_t index) const = 0;
1363
1366};
1367
1368
1381 <0x29c36255,0x7558,0x4865,0xa7,0x7e,0xaa,0x3a,0x50,0x4f,0x70,0xbc,
1382 IDag_builder>
1383{
1384public:
1385 typedef Dag_error_code Error_code;
1386
1388 enum Flags {
1406
1413
1415 enum Slot {
1417
1422
1427
1429
1434
1438
1440
1441 MS_LAST = MS_HAIR
1442 };
1443
1455 };
1456
1458 enum Opacity {
1464
1465 typedef unsigned Properties;
1466
1467public:
1468 // ----------------- from IDAG_builder -----------------
1469
1473 virtual IType_factory *get_type_factory() = 0;
1474
1478 virtual IValue_factory *get_value_factory() = 0;
1479
1486 virtual DAG_constant const *create_constant(IValue const *value) = 0;
1487
1498 virtual DAG_node const *create_call(
1499 char const *signature,
1500 IDefinition::Semantics sema,
1501 DAG_call::Call_argument const call_args[],
1502 int num_call_args,
1503 IType const *ret_type) = 0;
1504
1511 IType const *type,
1512 int index) = 0;
1513
1514 // ----------------- own methods -----------------
1515
1550 ICall_name_resolver *resolver,
1551 IResource_modifier *resource_modifier,
1552 IGenerated_code_dag const *code_dag,
1553 size_t argc,
1554 DAG_node const *argv[],
1555 bool use_temporaries,
1556 unsigned flags,
1557 ICall_evaluator *evaluator,
1558 bool fold_meters_per_scene_unit,
1559 float mdl_meters_per_scene_unit,
1560 float wavelength_min,
1561 float wavelength_max,
1562 char const * const fold_params[],
1563 size_t num_fold_params,
1564 IType const *target_type) = 0;
1565
1570 virtual DAG_call const *get_constructor() const = 0;
1571
1573 virtual size_t get_temporary_count() const = 0;
1574
1578 virtual DAG_node const *get_temporary_value(size_t index) const = 0;
1579
1583 virtual size_t get_parameter_count() const = 0;
1584
1588 virtual IValue const *get_parameter_default(size_t index) const = 0;
1589
1603 char const *path,
1604 DAG_node const *&node_result,
1605 IValue const *&value_result) const = 0;
1606
1617 virtual DAG_hash get_sub_expression_hash(char const *path) const = 0;
1618
1625 virtual DAG_hash const *get_hash() const = 0;
1626
1635 virtual DAG_hash const *get_slot_hash(Slot slot) const = 0;
1636
1640 virtual char const *get_parameter_name(size_t index) const = 0;
1641
1646 virtual bool depends_on_transform() const = 0;
1647
1652 virtual bool depends_on_object_id() const = 0;
1653
1658 virtual bool depends_on_global_distribution() const = 0;
1659
1661 virtual bool depends_on_uniform_scene_data() const = 0;
1662
1664 virtual size_t get_referenced_scene_data_count() const = 0;
1665
1669 virtual char const *get_referenced_scene_data_name(size_t index) const = 0;
1670
1672 virtual Opacity get_opacity() const = 0;
1673
1675 virtual Opacity get_surface_opacity() const = 0;
1676
1681 virtual IValue_float const *get_cutout_opacity() const = 0;
1682
1684 virtual Messages const &access_messages() const = 0;
1685
1687 virtual size_t get_memory_size() const = 0;
1688
1690 virtual Properties get_properties() const = 0;
1691
1693 virtual char const *get_internal_space() const = 0;
1694
1700 virtual void set_resource_tag(
1701 IValue_resource const *res,
1702 int tag) = 0;
1703
1705 virtual size_t get_resource_tag_map_entries_count() const = 0;
1706
1710 virtual Resource_tag_tuple const *get_resource_tag_map_entry(size_t index) const = 0;
1711
1714};
1715
1717template<typename T>
1718bool is(DAG_node const *node)
1719{
1720 return node->get_kind() == T::s_kind;
1721}
1722
1724template<typename T>
1725T *as(DAG_node *type) {
1726 return (type->get_kind() == T::s_kind) ? static_cast<T *>(type) : NULL;
1727}
1728
1730template<typename T>
1731T const *as(DAG_node const *type) {
1732 return (type->get_kind() == T::s_kind) ? static_cast<const T *>(type) : NULL;
1733}
1734
1797} // mdl
1798} // mi
1799
1800#endif
Mixin class template for deriving new interface declarations.
Definition: interface_declare.h:43
A DAG IR call.
Definition: mdl_generated_dag.h:173
virtual char const * get_name() const =0
Get the signature of the called function.
virtual size_t get_name_hash() const =0
Get the name hash.
virtual DAG_node const * get_argument(char const *name) const =0
Get the argument for parameter name.
virtual char const * get_parameter_name(int index) const =0
Get the name of the parameter corresponding to the argument at position index.
virtual int get_argument_count() const =0
Get the number of arguments.
static Kind const s_kind
The kind of this subclass.
Definition: mdl_generated_dag.h:200
virtual IDefinition::Semantics get_semantic() const =0
Get the semantic of the called function if known.
virtual void set_argument(int index, DAG_node const *arg)=0
Set the argument expression of a call.
virtual DAG_node const * get_argument(int index) const =0
Get the argument at position index.
A DAG IR constant.
Definition: mdl_generated_dag.h:144
static Kind const s_kind
The kind of this subclass.
Definition: mdl_generated_dag.h:147
virtual IValue const * get_value() const =0
Get the value of the constant.
A hash value.
Definition: mdl_generated_dag.h:30
unsigned char operator[](size_t n) const
Read hash bytes.
Definition: mdl_generated_dag.h:90
unsigned char * data()
Access raw data.
Definition: mdl_generated_dag.h:99
DAG_hash()
Default constructor.
Definition: mdl_generated_dag.h:33
bool operator<=(DAG_hash const &other) const
Compare two hashes for less-than or equal.
Definition: mdl_generated_dag.h:69
bool operator<(DAG_hash const &other) const
Compare two hashes for less-than.
Definition: mdl_generated_dag.h:62
bool operator>=(DAG_hash const &other) const
Compare two hashes for greater-than or equal.
Definition: mdl_generated_dag.h:83
bool operator==(DAG_hash const &other) const
Compare two hashes for equality.
Definition: mdl_generated_dag.h:48
DAG_hash(unsigned char const (&arr)[16])
Constructor from an array of 16 bytes.
Definition: mdl_generated_dag.h:40
bool operator!=(DAG_hash const &other) const
Compare two hashes for non-equality.
Definition: mdl_generated_dag.h:55
bool operator>(DAG_hash const &other) const
Compare two hashes for greater-than.
Definition: mdl_generated_dag.h:76
static size_t size()
Get the size of the raw data.
Definition: mdl_generated_dag.h:111
unsigned char const * data() const
Read-only access raw data.
Definition: mdl_generated_dag.h:106
A node inside the DAG Intermediate Representation.
Definition: mdl_generated_dag.h:118
virtual Kind get_kind() const =0
Get the kind of this DAG IR node.
Kind
The possible kinds of DAG IR nodes.
Definition: mdl_generated_dag.h:121
@ EK_TEMPORARY
A temporary.
Definition: mdl_generated_dag.h:123
@ EK_PARAMETER
A parameter.
Definition: mdl_generated_dag.h:125
@ EK_CONSTANT
A constant.
Definition: mdl_generated_dag.h:122
@ EK_CALL
A call.
Definition: mdl_generated_dag.h:124
virtual size_t get_id() const =0
Get the unique ID of this DAG IR node.
virtual IType const * get_type() const =0
Get the type of this DAG IR node.
A DAG IR parameter reference.
Definition: mdl_generated_dag.h:250
virtual int get_index() const =0
Get the index of the referenced parameter.
static Kind const s_kind
The kind of this subclass.
Definition: mdl_generated_dag.h:253
A DAG IR temporary reference.
Definition: mdl_generated_dag.h:157
static Kind const s_kind
The kind of this subclass.
Definition: mdl_generated_dag.h:160
virtual DAG_node const * get_expr() const =0
Get the node of the temporary.
virtual int get_index() const =0
Get the index (the "name") of the referenced temporary.
A Helper interface to do renderer specific constant folding.
Definition: mdl_generated_dag.h:346
virtual IValue const * evaluate_intrinsic_function(IValue_factory *value_factory, IDefinition::Semantics sema, IValue const *const arguments[], size_t n_arguments) const =0
Evaluate an intrinsic function.
virtual bool is_evaluate_intrinsic_function_enabled(IDefinition::Semantics sema) const =0
Check whether evaluate_intrinsic_function() should be called for an unhandled intrinsic functions wit...
A Builder for DAG graphs.
Definition: mdl_generated_dag.h:281
virtual DAG_node const * create_call(char const *signature, IDefinition::Semantics sema, DAG_call::Call_argument const call_args[], int num_call_args, IType const *ret_type)=0
Create a call.
virtual DAG_parameter const * create_parameter(IType const *type, int index)=0
Create a parameter reference.
virtual IType_factory * get_type_factory()=0
Get the type factory of this instance.
virtual bool enable_cse(bool flag)=0
Enable common subexpression elimination.
virtual IValue_factory * get_value_factory()=0
Get the value factory of this instance.
virtual DAG_constant const * create_constant(IValue const *value)=0
Create a constant.
virtual bool enable_opt(bool flag)=0
Enable optimization.
virtual bool enable_unsafe_math_opt(bool flag)=0
Enable unsafe math optimizations.
The node factory for DAG IR nodes.
Definition: mdl_generated_dag.h:415
virtual DAG_node const * create_call(char const *signature, IDefinition::Semantics sema, DAG_call::Call_argument const call_args[], int num_call_args, IType const *ret_type)=0
Create a call.
virtual bool get_unsafe_math_opt() const =0
Return unsafe math optimization setting.
virtual DAG_parameter const * create_parameter(IType const *type, int index)=0
Create a parameter reference.
virtual bool enable_opt(bool flag)=0
Enable optimization.
virtual DAG_temporary const * create_temporary(DAG_node const *node, int index)=0
Create a temporary reference.
virtual IType_factory * get_type_factory()=0
Get the type factory associated with this expression factory.
virtual IValue_factory * get_value_factory()=0
Get the value factory associated with this expression factory.
virtual DAG_constant const * create_constant(IValue const *value)=0
Create a constant.
virtual bool enable_cse(bool flag)=0
Enable common subexpression elimination.
virtual bool enable_unsafe_math_opt(bool flag)=0
Enable unsafe math optimizations.
A container of DAG representations of a module containing materials, functions, constants,...
Definition: mdl_generated_dag.h:393
virtual size_t get_import_count() const =0
Get the number of modules directly imported by the module from which this code was generated.
virtual size_t get_material_count() const =0
Get the number of materials in the generated code.
virtual char const * get_original_type_name(size_t index) const =0
Get the original name of the user defined type at index if the type is an alias.
virtual IType const * get_type(size_t index) const =0
Get the user defined type at index.
virtual DAG_node const * get_material_body(size_t material_index) const =0
Get the body expression of the material at material_index.
virtual char const * get_cloned_function_name(size_t function_index) const =0
Return the original function name of a cloned function or "" if the function is not a clone.
virtual size_t get_annotation_annotation_count(size_t annotation_index) const =0
Get the number of annotations of the annotation at annotation_index.
virtual size_t get_material_parameter_enable_if_condition_users(size_t material_index, size_t parameter_index) const =0
Get the number of parameters whose enable_if condition depends on this parameter.
virtual size_t get_type_annotation_count(size_t index) const =0
Get the number of annotations of the user defined type at index.
virtual char const * get_function_parameter_type_name(size_t function_index, size_t parameter_index) const =0
Get the parameter type name of the parameter at parameter_index of the function at function_index.
virtual DAG_node const * get_function_annotation(size_t function_index, size_t annotation_index) const =0
Get the annotation at annotation_index of the function at function_index.
virtual DAG_node const * get_annotation_annotation(size_t anno_decl_index, size_t annotation_index) const =0
Get the annotation at annotation_index of the annotation (declaration) at anno_decl_index.
virtual DAG_node const * get_struct_category_annotation(size_t cat_index, size_t annotation_index) const =0
Get the annotation at annotation_index of the user defined struct category at cat_index.
virtual char const * get_function_name(size_t function_index) const =0
Get the name of the function at function_index.
virtual char const * get_type_name(size_t index) const =0
Get the name of the user type at index.
virtual bool get_material_property(size_t material_index, Function_property fp) const =0
Get the property flag of the material at material_index.
virtual bool is_type_exported(size_t index) const =0
Returns true if the user defined type at index is exported.
virtual IDefinition::Semantics get_annotation_semantics(size_t annotation_index) const =0
Get the semantics of the annotation at annotation_index.
virtual void set_resource_tag(IValue_resource const *res, int tag)=0
Set a tag, version pair for a resource constant that might be reachable from this DAG.
virtual size_t get_annotation_parameter_index(size_t annotation_index, char const *parameter_name) const =0
Get the index of the parameter parameter_name.
virtual DAG_node const * get_function_body(size_t function_index) const =0
Get the body of the function at function_index.
virtual DAG_node const * get_material_annotation(size_t material_index, size_t annotation_index) const =0
Get the annotation at annotation_index of the material at material_index.
virtual char const * get_material_name(size_t material_index) const =0
Get the name of the material at material_index.
virtual IType const * get_type_sub_entity_type(size_t type_index, size_t entity_index) const =0
Get the type of an user defined type sub-entity (field or enum constant).
virtual size_t get_function_parameter_enable_if_condition_users(size_t function_index, size_t parameter_index) const =0
Get the number of parameters whose enable_if condition depends on this parameter.
Function_property
Properties of DAG functions.
Definition: mdl_generated_dag.h:396
@ FP_IS_NATIVE
True, if this function was declared native.
Definition: mdl_generated_dag.h:404
@ FP_CAN_THROW_BOUNDS
True, if this function can throw a out-of-bounds exception.
Definition: mdl_generated_dag.h:401
@ FP_CAN_THROW_DIVZERO
True, if this function can throw a div-by-zero exception.
Definition: mdl_generated_dag.h:402
@ FP_USES_TEXTURES
True, if this function uses the texture functions (either directly or by calling another function tha...
Definition: mdl_generated_dag.h:399
@ FP_IS_UNIFORM
True, if this function is uniform.
Definition: mdl_generated_dag.h:403
@ FP_ALLOW_INLINE
True, if it is legal to inline this function.
Definition: mdl_generated_dag.h:397
@ FP_IS_DECLARATIVE
True, if this function is declarative.
Definition: mdl_generated_dag.h:405
@ FP_IS_EXPORTED
True, if this function is exported.
Definition: mdl_generated_dag.h:398
virtual char const * get_function_parameter_name(size_t function_index, size_t parameter_index) const =0
Get the parameter name of the parameter at parameter_index of the function at function_index.
virtual DAG_node const * get_function_return_annotation(size_t function_index, size_t annotation_index) const =0
Get the annotation at annotation_index of the function return type at function_index.
virtual char const * get_original_material_name(size_t material_index) const =0
Get the original name of the material at material_index if the material name is an alias.
virtual size_t get_material_annotation_count(size_t material_index) const =0
Get the number of annotations of the material at material_index.
virtual size_t get_function_references_count(size_t function_index) const =0
Get the number of entities referenced by a function.
virtual size_t get_annotation_parameter_count(size_t annotation_index) const =0
Get the parameter count of the annotation at annotation_index.
virtual IType const * get_material_return_type(size_t material_index) const =0
Get the return type of the material at material_index.
virtual char const * get_material_parameter_type_name(size_t material_index, size_t parameter_index) const =0
Get the parameter type name of the parameter at parameter_index of the material at material_index.
virtual char const * get_struct_category_name(size_t index) const =0
Get the name of the user-defined struct category at index.
virtual DAG_node const * get_module_annotation(size_t annotation_index) const =0
Get the annotation at annotation_index of the module.
virtual char const * get_import(size_t index) const =0
Get the name of module at index imported from the module from which this code was generated.
virtual size_t get_struct_category_count() const =0
Get the number of (exported and non-exported) user defined struct categories of this compiled module.
virtual size_t get_resource_tag_map_entries_count() const =0
Get the number of resource tag map entries.
virtual DAG_node const * get_material_parameter_enable_if_condition(size_t material_index, size_t parameter_index) const =0
Get the enable_if condition for the given material parameter if one was specified.
virtual size_t get_material_references_count(size_t material_index) const =0
Get the number of entities referenced by a material.
virtual DAG_node const * get_constant_annotation(size_t constant_index, size_t annotation_index) const =0
Get the annotation at annotation_index of the constant at constant_index.
virtual size_t get_type_sub_entity_count(size_t type_index) const =0
Get the number of user defined type sub-entities (fields or enum constants).
virtual size_t get_function_parameter_count(size_t function_index) const =0
Get the parameter count of the function at function_index.
virtual char const * get_internal_space() const =0
Get the internal space.
virtual size_t get_material_return_annotation_count(size_t material_index) const =0
Get the number of annotations of the material return type at material_index.
virtual size_t get_function_return_annotation_count(size_t function_index) const =0
Get the number of annotations of the function return type at function_index.
virtual size_t get_function_parameter_enable_if_condition_user(size_t function_index, size_t parameter_index, size_t user_index) const =0
Get a parameter index whose enable_if condition depends on this parameter.
virtual IType const * get_material_parameter_type(size_t material_index, size_t parameter_index) const =0
Get the parameter type of the parameter at parameter_index of the material at material_index.
virtual DAG_constant const * get_constant_value(size_t index) const =0
Get the value of the constant at index.
virtual Resource_tag_tuple const * get_resource_tag_map_entry(size_t index) const =0
Get the i'th resource tag map entry or NULL if the index is out of bounds;.
virtual char const * get_material_temporary_name(size_t material_index, size_t temporary_index) const =0
Get the temporary name at temporary_index used by the material at material_index.
virtual size_t get_material_parameter_annotation_count(size_t material_index, size_t parameter_index) const =0
Get the number of annotations of the parameter at parameter_index of the material at material_index.
virtual char const * get_module_name() const =0
Get the absolute module name of the module from which this code was generated.
virtual DAG_node const * get_type_sub_entity_annotation(size_t type_index, size_t entity_index, size_t annotation_index) const =0
Get the annotation at annotation_index of the user defined type sub-entity at (type_index,...
virtual char const * get_module_file_name() const =0
Get the module file name of the module from which this code was generated.
virtual DAG_node const * get_annotation_parameter_default(size_t annotation_index, size_t parameter_index) const =0
Get the default initializer of the parameter at parameter_index of the annotation at annotation_index...
virtual DAG_node const * get_function_temporary(size_t function_index, size_t temporary_index) const =0
Get the temporary at temporary_index used by the function at function_index.
virtual size_t get_material_parameter_enable_if_condition_user(size_t material_index, size_t parameter_index, size_t user_index) const =0
Get a parameter index whose enable_if condition depends on this parameter.
virtual DAG_hash const * get_function_hash(size_t function_index) const =0
Get the function hash value for the given function index if available.
virtual DAG_node const * get_material_temporary(size_t material_index, size_t temporary_index) const =0
Get the temporary at temporary_index used by the material at material_index.
virtual int get_resource_tag(IValue_resource const *res) const =0
Get a tag,for a resource constant that might be reachable from this DAG.
Annotation_property
Properties of DAG annotations.
Definition: mdl_generated_dag.h:409
@ AP_IS_EXPORTED
True, if this annotation is exported.
Definition: mdl_generated_dag.h:410
virtual size_t get_function_parameter_annotation_count(size_t function_index, size_t parameter_index) const =0
Get the number of annotations of the parameter at parameter_index of the function at function_index.
virtual char const * get_annotation_parameter_name(size_t annotation_index, size_t parameter_index) const =0
Get the parameter name of the parameter at parameter_index of the annotation at annotation_index.
virtual bool is_struct_category_exported(size_t index) const =0
Returns true if the user defined struct category at index is exported.
virtual bool get_annotation_property(size_t annotation_index, Annotation_property ap) const =0
Get the property flag of the annotation at annotation_index.
virtual bool get_function_exported(size_t function_index) const =0
Get the export flags of the function at function_index.
virtual DAG_node const * get_function_parameter_default(size_t function_index, size_t parameter_index) const =0
Get the default initializer of the parameter at parameter_index of the function at function_index.
virtual size_t get_constant_count() const =0
Get the number of exported constants.
virtual DAG_node const * get_function_value(size_t function_index) const =0
Get the body of the function at function_index.
virtual IDefinition::Semantics get_function_semantics(size_t function_index) const =0
Get the semantics of the function at function_index.
virtual char const * get_original_annotation_name(size_t annotation_index) const =0
Get the original name of the annotation at annotation_index if the annotation name is an alias,...
virtual size_t get_type_count() const =0
Get the number of (exported and non-exported) user defined types of this compiled module.
virtual size_t get_module_annotation_count() const =0
Get the number of annotations of the module.
virtual DAG_node const * get_type_annotation(size_t type_index, size_t annotation_index) const =0
Get the annotation at annotation_index of the user defined type at type_index.
virtual size_t get_struct_category_annotation_count(size_t index) const =0
Get the number of annotations of the user defined struct category at index.
virtual size_t get_function_parameter_index(size_t function_index, char const *parameter_name) const =0
Get the index of the parameter parameter_name.
virtual char const * get_type_sub_entity_name(size_t type_index, size_t entity_index) const =0
Get the name of an user defined type sub-entity (field or enum constant).
virtual bool get_material_exported(size_t material_index) const =0
Get the export flags of the material at material_index.
virtual char const * get_annotation_name(size_t annotation_index) const =0
Get the name of the annotation at annotation_index.
virtual size_t get_function_count() const =0
Get the number of functions in the generated code.
virtual IStruct_category const * get_struct_category(size_t index) const =0
Get the user defined struct category at index.
virtual char const * get_original_function_name(size_t function_index) const =0
Get the original name of the function at function_index if the function name is an alias,...
virtual char const * get_simple_annotation_name(size_t annotation_index) const =0
Get the simple name of the annotation at annotation_index.
virtual Messages const & access_messages() const =0
Access messages.
virtual IMaterial_instance * create_material_instance(size_t index, Error_code *error_code=NULL) const =0
Create a new material instance.
virtual char const * get_simple_function_name(size_t function_index) const =0
Get the simple name of the function at function_index.
virtual DAG_node const * get_function_parameter_annotation(size_t function_index, size_t parameter_index, size_t annotation_index) const =0
Get the annotation at annotation_index of the parameter at parameter_index of the function at functio...
virtual Messages & access_messages()=0
Access messages (writable).
virtual char const * get_simple_material_name(size_t material_index) const =0
Get the simple name of the material at material_index.
virtual IType const * get_annotation_parameter_type(size_t annotation_index, size_t parameter_index) const =0
Get the parameter type of the parameter at parameter_index of the annotation at annotation_index.
virtual IType const * get_function_return_type(size_t function_index) const =0
Get the return type of the function at function_index.
virtual bool get_function_property(size_t function_index, Function_property fp) const =0
Get the property flag of the function at function_index.
virtual DAG_node const * get_material_parameter_annotation(size_t material_index, size_t parameter_index, size_t annotation_index) const =0
Get the annotation at annotation_index of the parameter at parameter_index of the material at materia...
virtual char const * get_annotation_parameter_type_name(size_t annotation_index, size_t parameter_index) const =0
Get the parameter type name of the parameter at parameter_index of the annotation at annotation_index...
virtual size_t get_material_temporary_count(size_t material_index) const =0
Get the number of temporaries used by the material at material_index.
virtual size_t get_memory_size() const =0
Returns the amount of used memory by this code DAG.
virtual char const * get_material_reference(size_t material_index, size_t callee_index) const =0
Get the signature of the i'th reference of a material.
virtual size_t get_constant_annotation_count(size_t index) const =0
Get the number of annotations of the constant at index.
virtual size_t get_material_parameter_count(size_t material_index) const =0
Get the parameter count of the material at material_index.
virtual DAG_node_factory * get_node_factory()=0
Get the node factory.
virtual size_t get_function_temporary_count(size_t function_index) const =0
Get the number of temporaries used by the function at function_index.
virtual char const * get_function_temporary_name(size_t function_index, size_t temporary_index) const =0
Get the temporary name at temporary_index used by the function at function_index.
virtual DAG_node const * get_material_value(size_t material_index) const =0
Get the value of the material at material_index.
virtual size_t get_annotation_count() const =0
Get the number of annotations in the generated code.
virtual DAG_node const * get_material_parameter_default(size_t material_index, size_t parameter_index) const =0
Get the default initializer of the parameter at parameter_index of the material at material_index.
virtual char const * get_cloned_material_name(size_t material_index) const =0
Return the original material name of a cloned material or "" if the material is not a clone.
virtual DAG_node const * get_material_return_annotation(size_t material_index, size_t annotation_index) const =0
Get the annotation at annotation_index of the material return type at material_index.
virtual size_t get_function_annotation_count(size_t function_index) const =0
Get the number of annotations of the function at function_index.
virtual DAG_node const * get_function_parameter_enable_if_condition(size_t function_index, size_t parameter_index) const =0
Get the enable_if condition for the given function parameter if one was specified.
virtual IResource_tagger * get_resource_tagger() const =0
Get the resource tagger for this code DAG.
virtual char const * get_material_parameter_name(size_t material_index, size_t parameter_index) const =0
Get the parameter name of the parameter at parameter_index of the material at material_index.
virtual char const * get_constant_name(size_t index) const =0
Get the name of the constant at index.
virtual size_t get_material_parameter_index(size_t material_index, char const *parameter_name) const =0
Get the index of the parameter parameter_name.
virtual DAG_hash const * get_material_hash(size_t material_index) const =0
Get the material hash value for the given material index if available.
virtual IDefinition::Semantics get_material_semantics(size_t material_index) const =0
Get the semantics of the material at material_index.
virtual IType const * get_function_parameter_type(size_t function_index, size_t parameter_index) const =0
Get the parameter type of the parameter at parameter_index of the function at function_index.
virtual size_t get_type_sub_entity_annotation_count(size_t type_index, size_t entity_index) const =0
Get the number of annotations of an user defined type sub-entity (field or enum constant) at index.
virtual char const * get_function_reference(size_t function_index, size_t callee_index) const =0
Get the signature of the i'th reference of a function.
An instantiated material.
Definition: mdl_generated_dag.h:1383
virtual DAG_node const * create_call(char const *signature, IDefinition::Semantics sema, DAG_call::Call_argument const call_args[], int num_call_args, IType const *ret_type)=0
Create a call node.
virtual DAG_parameter const * create_parameter(IType const *type, int index)=0
Create a parameter reference node.
Property
Property flags of an instance.
Definition: mdl_generated_dag.h:1445
@ IP_DEPENDS_ON_TRANSFORM
depends on object transforms
Definition: mdl_generated_dag.h:1446
@ IP_DEPENDS_ON_OBJECT_ID
depends of the object id
Definition: mdl_generated_dag.h:1447
@ IP_USES_TERNARY_OPERATOR_ON_DF
uses the ternary operator '?:' on *df
Definition: mdl_generated_dag.h:1450
@ IP_DISTILLED
was created by the distiller
Definition: mdl_generated_dag.h:1452
@ IP_USES_TERNARY_OPERATOR
uses the ternary operator '?:'
Definition: mdl_generated_dag.h:1449
@ IP_CLASS_COMPILED
was class compiled
Definition: mdl_generated_dag.h:1451
@ IP_TARGET_MATERIAL_MODEL
instance is in target material mode
Definition: mdl_generated_dag.h:1454
@ IP_DEPENDS_ON_UNIFORM_SCENE_DATA
depends on uniform scene data
Definition: mdl_generated_dag.h:1453
@ IP_DEPENDS_ON_GLOBAL_DISTRIBUTION
depends on global distribution (edf)
Definition: mdl_generated_dag.h:1448
virtual size_t get_resource_tag_map_entries_count() const =0
Get the number of resource tag map entries.
virtual IType_factory * get_type_factory()=0
Get the type factory of this instance.
virtual DAG_constant const * create_constant(IValue const *value)=0
Create a constant node.
virtual size_t get_temporary_count() const =0
Return the number of temporaries of this instance.
virtual size_t get_memory_size() const =0
Returns the amount of used memory by this code material instance.
virtual DAG_call const * get_constructor() const =0
Return the material constructor of this instance.
virtual bool depends_on_transform() const =0
Returns true if this instance depends on object transforms.
virtual IValue_factory * get_value_factory()=0
Get the value factory of this instance.
virtual IValue const * get_parameter_default(size_t index) const =0
Return the default value of a parameter of this instance.
virtual size_t get_parameter_count() const =0
Return the number of parameters of this instance.
virtual void lookup_sub_expression(char const *path, DAG_node const *&node_result, IValue const *&value_result) const =0
Return the node determined by the path, starting from the root expression of the material instance.
Flags
Instantiation flags.
Definition: mdl_generated_dag.h:1388
@ NO_ENUM_PARAMS
CLASS_COMPILATION: Do not create enum parameters.
Definition: mdl_generated_dag.h:1397
@ NO_DEAD_PARAMS
CLASS_COMPILATION: Remove dead parameters.
Definition: mdl_generated_dag.h:1394
@ NO_BOOL_PARAMS
CLASS_COMPILATION: Do not create bool parameters.
Definition: mdl_generated_dag.h:1396
@ NO_RESOURCE_SHARING
CLASS_COMPILATION: Do not share resource arguments.
Definition: mdl_generated_dag.h:1392
@ IGNORE_NOINLINE
Ignore anno::noinline() annotations.
Definition: mdl_generated_dag.h:1404
@ TARGET_MATERIAL_MODEL
Target material model mode.
Definition: mdl_generated_dag.h:1405
@ NO_STRING_PARAMS
CLASS_COMPILATION: Do not create string parameters.
Definition: mdl_generated_dag.h:1395
@ NO_TRANSPARENT_LAYERS
CLASS_COMPILATION: Do not create layering calls for transparent layers, i.e., with weight 0....
Definition: mdl_generated_dag.h:1403
@ DEFAULT_CLASS_COMPILATION
Do class compilation with default flags.
Definition: mdl_generated_dag.h:1407
@ NO_TERNARY_ON_DF
CLASS_COMPILATION: Do not allow ?: on df.
Definition: mdl_generated_dag.h:1393
@ NO_ARGUMENT_INLINE
CLASS_COMPILATION: Do not inline any arguments.
Definition: mdl_generated_dag.h:1391
@ NO_TRIVIAL_CUTOUT_OPACITY
CLASS_COMPILATION: Do not create a parameter for geometry.cutout_opacity if its value is constant 0....
Definition: mdl_generated_dag.h:1400
@ INSTANCE_COMPILATION
Do an instance compilation, default.
Definition: mdl_generated_dag.h:1389
@ CLASS_COMPILATION
Do a class compilation.
Definition: mdl_generated_dag.h:1390
virtual bool depends_on_uniform_scene_data() const =0
Returns true if this instance depends on uniform scene data.
Opacity
Opacity of an instance.
Definition: mdl_generated_dag.h:1458
@ OPACITY_OPAQUE
opaque for sure
Definition: mdl_generated_dag.h:1459
@ OPACITY_TRANSPARENT
transparent for sure
Definition: mdl_generated_dag.h:1460
@ OPACITY_UNKNOWN
opacity unknown (depends on parameter or complex user expression)
Definition: mdl_generated_dag.h:1461
virtual Messages const & access_messages() const =0
Access messages.
virtual IValue_float const * get_cutout_opacity() const =0
Returns the cutout opacity of this instance if it is constant.
virtual Properties get_properties() const =0
Get the instance properties.
virtual DAG_hash const * get_slot_hash(Slot slot) const =0
Return the hash value of one material slot of this material instance.
virtual Opacity get_opacity() const =0
Returns the opacity of this instance.
virtual Error_code initialize(ICall_name_resolver *resolver, IResource_modifier *resource_modifier, IGenerated_code_dag const *code_dag, size_t argc, DAG_node const *argv[], bool use_temporaries, unsigned flags, ICall_evaluator *evaluator, bool fold_meters_per_scene_unit, float mdl_meters_per_scene_unit, float wavelength_min, float wavelength_max, char const *const fold_params[], size_t num_fold_params, IType const *target_type)=0
Initialize this material instance.
virtual Resource_tag_tuple const * get_resource_tag_map_entry(size_t index) const =0
Get the i'th resource tag map entry or NULL if the index is out of bounds;.
virtual char const * get_internal_space() const =0
Get the internal space.
virtual DAG_node const * get_temporary_value(size_t index) const =0
Return the value of the temporary at index.
virtual DAG_hash const * get_hash() const =0
Return the hash value of this material instance.
virtual char const * get_parameter_name(size_t index) const =0
Return the canonical parameter name of the given parameter.
virtual Opacity get_surface_opacity() const =0
Returns the surface opacity of this instance.
virtual IResource_tagger * get_resource_tagger() const =0
Get the resource tagger for this material instance.
virtual size_t get_referenced_scene_data_count() const =0
Returns the number of scene data attributes referenced by this instance.
virtual bool depends_on_global_distribution() const =0
Returns true if this instance depends on the global distribution (edf).
Slot
Material slots on which hashes are calculated.
Definition: mdl_generated_dag.h:1415
@ MS_VOLUME_SCATTERING_COEFFICIENT
.volume.scattering_coefficient
Definition: mdl_generated_dag.h:1432
@ MS_GEOMETRY_NORMAL
.geometry.normal
Definition: mdl_generated_dag.h:1437
@ MS_THIN_WALLED
.thin_walled
Definition: mdl_generated_dag.h:1416
@ MS_SURFACE_EMISSION_EDF_EMISSION
.surface.emission.emission
Definition: mdl_generated_dag.h:1419
@ MS_SURFACE_BSDF_SCATTERING
.surface.scattering
Definition: mdl_generated_dag.h:1418
@ MS_VOLUME_EMISSION_INTENSITY
.volume.emission_intensity
Definition: mdl_generated_dag.h:1433
@ MS_VOLUME_VDF_SCATTERING
.volume.scattering
Definition: mdl_generated_dag.h:1430
@ MS_GEOMETRY_DISPLACEMENT
.geometry.displacement
Definition: mdl_generated_dag.h:1435
@ MS_IOR
.ior
Definition: mdl_generated_dag.h:1428
@ MS_SURFACE_EMISSION_MODE
.surface.emission.mode
Definition: mdl_generated_dag.h:1421
@ MS_BACKFACE_EMISSION_MODE
.backface.emission.mode
Definition: mdl_generated_dag.h:1426
@ MS_SURFACE_EMISSION_INTENSITY
.surface.emission.intensity
Definition: mdl_generated_dag.h:1420
@ MS_BACKFACE_EMISSION_INTENSITY
.backface.emission.intensity
Definition: mdl_generated_dag.h:1425
@ MS_BACKFACE_BSDF_SCATTERING
.backface.scattering
Definition: mdl_generated_dag.h:1423
@ MS_HAIR
.hair
Definition: mdl_generated_dag.h:1439
@ MS_BACKFACE_EMISSION_EDF_EMISSION
.backface.emission.emission
Definition: mdl_generated_dag.h:1424
@ MS_VOLUME_ABSORPTION_COEFFICIENT
.volume.absorption_coefficient
Definition: mdl_generated_dag.h:1431
@ MS_GEOMETRY_CUTOUT_OPACITY
.geometry.cutout_opacity
Definition: mdl_generated_dag.h:1436
virtual void set_resource_tag(IValue_resource const *res, int tag)=0
Set a tag, version pair for a resource constant that might be reachable from this instance.
virtual DAG_hash get_sub_expression_hash(char const *path) const =0
Calculate the hash for the node determined by the path, starting from the root expression of the mate...
virtual bool depends_on_object_id() const =0
Returns true if this instance depends on the object id.
virtual char const * get_referenced_scene_data_name(size_t index) const =0
Return the name of a scene data attribute referenced by this instance.
An interface to interrogate tag values for resource values.
Definition: mdl_generated_dag.h:260
virtual int get_resource_tag(IValue_resource const *res) const =0
Get a tag,for a resource constant that might be reachable from this DAG.
T * as(DAG_node *type)
Cast to subtype or return NULL if types do not match.
Definition: mdl_generated_dag.h:1725
bool is(DAG_node const *node)
Check if a DAG node is of a certain type.
Definition: mdl_generated_dag.h:1718
Dag_error_code
The possible error codes on DAG.
Definition: mdl_generated_dag.h:374
@ EC_INSTANTIATION_ERROR
An error occurred during instantiation.
Definition: mdl_generated_dag.h:380
@ EC_TOO_FEW_ARGUMENTS
Not enough arguments were supplied for the material.
Definition: mdl_generated_dag.h:378
@ EC_ARGUMENT_TYPE_MISMATCH
An instance argument is of wrong type.
Definition: mdl_generated_dag.h:381
@ EC_INVALID_INDEX
The given index is invalid.
Definition: mdl_generated_dag.h:376
@ EC_WRONG_TRANSMISSION_ON_THIN_WALLED
Different transmission on thin_walled material.
Definition: mdl_generated_dag.h:382
@ EC_TOO_MANY_ARGUMENTS
Too many arguments were supplied for the material.
Definition: mdl_generated_dag.h:379
@ EC_NONE
No error has occurred.
Definition: mdl_generated_dag.h:375
@ EC_MATERIAL_HAS_ERROR
The material cannot be instantiated because it has errors.
Definition: mdl_generated_dag.h:377
Common namespace for APIs of NVIDIA Advanced Rendering Center GmbH.
Definition: example_derivatives.dox:5
A simple value helper class, a pair of an argument expression and a parameter name.
Definition: mdl_generated_dag.h:176
DAG_node const * arg
The call argument expression.
Definition: mdl_generated_dag.h:194
Call_argument()
Default constructor.
Definition: mdl_generated_dag.h:178
Call_argument(DAG_node const *arg, char const *param_name)
Constructor.
Definition: mdl_generated_dag.h:187
char const * param_name
The name of the parameter.
Definition: mdl_generated_dag.h:195