2
0

domProfile_COMMON.h 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728
  1. /*
  2. * Copyright 2006 Sony Computer Entertainment Inc.
  3. *
  4. * Licensed under the SCEA Shared Source License, Version 1.0 (the "License"); you may not use this
  5. * file except in compliance with the License. You may obtain a copy of the License at:
  6. * http://research.scea.com/scea_shared_source_license.html
  7. *
  8. * Unless required by applicable law or agreed to in writing, software distributed under the License
  9. * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
  10. * implied. See the License for the specific language governing permissions and limitations under the
  11. * License.
  12. */
  13. #ifndef __domProfile_COMMON_h__
  14. #define __domProfile_COMMON_h__
  15. #include <dae/daeDocument.h>
  16. #include <dom/domTypes.h>
  17. #include <dom/domElements.h>
  18. #include <dom/domFx_profile_abstract.h>
  19. #include <dom/domAsset.h>
  20. #include <dom/domImage.h>
  21. #include <dom/domExtra.h>
  22. #include <dom/domCommon_newparam_type.h>
  23. #include <dom/domCommon_color_or_texture_type.h>
  24. #include <dom/domCommon_float_or_param_type.h>
  25. #include <dom/domCommon_transparent_type.h>
  26. class DAE;
  27. /**
  28. * Opens a block of COMMON platform-specific data types and technique declarations.
  29. */
  30. class domProfile_COMMON : public domFx_profile_abstract
  31. {
  32. public:
  33. virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::PROFILE_COMMON; }
  34. static daeInt ID() { return 740; }
  35. virtual daeInt typeID() const { return ID(); }
  36. public:
  37. class domTechnique;
  38. typedef daeSmartRef<domTechnique> domTechniqueRef;
  39. typedef daeTArray<domTechniqueRef> domTechnique_Array;
  40. /**
  41. * Holds a description of the textures, samplers, shaders, parameters, and
  42. * passes necessary for rendering this effect using one method.
  43. */
  44. class domTechnique : public daeElement
  45. {
  46. public:
  47. virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::TECHNIQUE; }
  48. static daeInt ID() { return 741; }
  49. virtual daeInt typeID() const { return ID(); }
  50. public:
  51. class domConstant;
  52. typedef daeSmartRef<domConstant> domConstantRef;
  53. typedef daeTArray<domConstantRef> domConstant_Array;
  54. class domConstant : public daeElement
  55. {
  56. public:
  57. virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::CONSTANT; }
  58. static daeInt ID() { return 742; }
  59. virtual daeInt typeID() const { return ID(); }
  60. protected: // Elements
  61. domCommon_color_or_texture_typeRef elemEmission;
  62. domCommon_color_or_texture_typeRef elemReflective;
  63. domCommon_float_or_param_typeRef elemReflectivity;
  64. domCommon_transparent_typeRef elemTransparent;
  65. domCommon_float_or_param_typeRef elemTransparency;
  66. domCommon_float_or_param_typeRef elemIndex_of_refraction;
  67. public: //Accessors and Mutators
  68. /**
  69. * Gets the emission element.
  70. * @return a daeSmartRef to the emission element.
  71. */
  72. const domCommon_color_or_texture_typeRef getEmission() const { return elemEmission; }
  73. /**
  74. * Gets the reflective element.
  75. * @return a daeSmartRef to the reflective element.
  76. */
  77. const domCommon_color_or_texture_typeRef getReflective() const { return elemReflective; }
  78. /**
  79. * Gets the reflectivity element.
  80. * @return a daeSmartRef to the reflectivity element.
  81. */
  82. const domCommon_float_or_param_typeRef getReflectivity() const { return elemReflectivity; }
  83. /**
  84. * Gets the transparent element.
  85. * @return a daeSmartRef to the transparent element.
  86. */
  87. const domCommon_transparent_typeRef getTransparent() const { return elemTransparent; }
  88. /**
  89. * Gets the transparency element.
  90. * @return a daeSmartRef to the transparency element.
  91. */
  92. const domCommon_float_or_param_typeRef getTransparency() const { return elemTransparency; }
  93. /**
  94. * Gets the index_of_refraction element.
  95. * @return a daeSmartRef to the index_of_refraction element.
  96. */
  97. const domCommon_float_or_param_typeRef getIndex_of_refraction() const { return elemIndex_of_refraction; }
  98. protected:
  99. /**
  100. * Constructor
  101. */
  102. domConstant(DAE& dae) : daeElement(dae), elemEmission(), elemReflective(), elemReflectivity(), elemTransparent(), elemTransparency(), elemIndex_of_refraction() {}
  103. /**
  104. * Destructor
  105. */
  106. virtual ~domConstant() {}
  107. /**
  108. * Overloaded assignment operator
  109. */
  110. virtual domConstant &operator=( const domConstant &cpy ) { (void)cpy; return *this; }
  111. public: // STATIC METHODS
  112. /**
  113. * Creates an instance of this class and returns a daeElementRef referencing it.
  114. * @return a daeElementRef referencing an instance of this object.
  115. */
  116. static DLLSPEC daeElementRef create(DAE& dae);
  117. /**
  118. * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
  119. * If a daeMetaElement already exists it will return that instead of creating a new one.
  120. * @return A daeMetaElement describing this COLLADA element.
  121. */
  122. static DLLSPEC daeMetaElement* registerElement(DAE& dae);
  123. };
  124. class domLambert;
  125. typedef daeSmartRef<domLambert> domLambertRef;
  126. typedef daeTArray<domLambertRef> domLambert_Array;
  127. class domLambert : public daeElement
  128. {
  129. public:
  130. virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::LAMBERT; }
  131. static daeInt ID() { return 743; }
  132. virtual daeInt typeID() const { return ID(); }
  133. protected: // Elements
  134. domCommon_color_or_texture_typeRef elemEmission;
  135. domCommon_color_or_texture_typeRef elemAmbient;
  136. domCommon_color_or_texture_typeRef elemDiffuse;
  137. domCommon_color_or_texture_typeRef elemReflective;
  138. domCommon_float_or_param_typeRef elemReflectivity;
  139. domCommon_transparent_typeRef elemTransparent;
  140. domCommon_float_or_param_typeRef elemTransparency;
  141. domCommon_float_or_param_typeRef elemIndex_of_refraction;
  142. public: //Accessors and Mutators
  143. /**
  144. * Gets the emission element.
  145. * @return a daeSmartRef to the emission element.
  146. */
  147. const domCommon_color_or_texture_typeRef getEmission() const { return elemEmission; }
  148. /**
  149. * Gets the ambient element.
  150. * @return a daeSmartRef to the ambient element.
  151. */
  152. const domCommon_color_or_texture_typeRef getAmbient() const { return elemAmbient; }
  153. /**
  154. * Gets the diffuse element.
  155. * @return a daeSmartRef to the diffuse element.
  156. */
  157. const domCommon_color_or_texture_typeRef getDiffuse() const { return elemDiffuse; }
  158. /**
  159. * Gets the reflective element.
  160. * @return a daeSmartRef to the reflective element.
  161. */
  162. const domCommon_color_or_texture_typeRef getReflective() const { return elemReflective; }
  163. /**
  164. * Gets the reflectivity element.
  165. * @return a daeSmartRef to the reflectivity element.
  166. */
  167. const domCommon_float_or_param_typeRef getReflectivity() const { return elemReflectivity; }
  168. /**
  169. * Gets the transparent element.
  170. * @return a daeSmartRef to the transparent element.
  171. */
  172. const domCommon_transparent_typeRef getTransparent() const { return elemTransparent; }
  173. /**
  174. * Gets the transparency element.
  175. * @return a daeSmartRef to the transparency element.
  176. */
  177. const domCommon_float_or_param_typeRef getTransparency() const { return elemTransparency; }
  178. /**
  179. * Gets the index_of_refraction element.
  180. * @return a daeSmartRef to the index_of_refraction element.
  181. */
  182. const domCommon_float_or_param_typeRef getIndex_of_refraction() const { return elemIndex_of_refraction; }
  183. protected:
  184. /**
  185. * Constructor
  186. */
  187. domLambert(DAE& dae) : daeElement(dae), elemEmission(), elemAmbient(), elemDiffuse(), elemReflective(), elemReflectivity(), elemTransparent(), elemTransparency(), elemIndex_of_refraction() {}
  188. /**
  189. * Destructor
  190. */
  191. virtual ~domLambert() {}
  192. /**
  193. * Overloaded assignment operator
  194. */
  195. virtual domLambert &operator=( const domLambert &cpy ) { (void)cpy; return *this; }
  196. public: // STATIC METHODS
  197. /**
  198. * Creates an instance of this class and returns a daeElementRef referencing it.
  199. * @return a daeElementRef referencing an instance of this object.
  200. */
  201. static DLLSPEC daeElementRef create(DAE& dae);
  202. /**
  203. * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
  204. * If a daeMetaElement already exists it will return that instead of creating a new one.
  205. * @return A daeMetaElement describing this COLLADA element.
  206. */
  207. static DLLSPEC daeMetaElement* registerElement(DAE& dae);
  208. };
  209. class domPhong;
  210. typedef daeSmartRef<domPhong> domPhongRef;
  211. typedef daeTArray<domPhongRef> domPhong_Array;
  212. class domPhong : public daeElement
  213. {
  214. public:
  215. virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::PHONG; }
  216. static daeInt ID() { return 744; }
  217. virtual daeInt typeID() const { return ID(); }
  218. protected: // Elements
  219. domCommon_color_or_texture_typeRef elemEmission;
  220. domCommon_color_or_texture_typeRef elemAmbient;
  221. domCommon_color_or_texture_typeRef elemDiffuse;
  222. domCommon_color_or_texture_typeRef elemSpecular;
  223. domCommon_float_or_param_typeRef elemShininess;
  224. domCommon_color_or_texture_typeRef elemReflective;
  225. domCommon_float_or_param_typeRef elemReflectivity;
  226. domCommon_transparent_typeRef elemTransparent;
  227. domCommon_float_or_param_typeRef elemTransparency;
  228. domCommon_float_or_param_typeRef elemIndex_of_refraction;
  229. public: //Accessors and Mutators
  230. /**
  231. * Gets the emission element.
  232. * @return a daeSmartRef to the emission element.
  233. */
  234. const domCommon_color_or_texture_typeRef getEmission() const { return elemEmission; }
  235. /**
  236. * Gets the ambient element.
  237. * @return a daeSmartRef to the ambient element.
  238. */
  239. const domCommon_color_or_texture_typeRef getAmbient() const { return elemAmbient; }
  240. /**
  241. * Gets the diffuse element.
  242. * @return a daeSmartRef to the diffuse element.
  243. */
  244. const domCommon_color_or_texture_typeRef getDiffuse() const { return elemDiffuse; }
  245. /**
  246. * Gets the specular element.
  247. * @return a daeSmartRef to the specular element.
  248. */
  249. const domCommon_color_or_texture_typeRef getSpecular() const { return elemSpecular; }
  250. /**
  251. * Gets the shininess element.
  252. * @return a daeSmartRef to the shininess element.
  253. */
  254. const domCommon_float_or_param_typeRef getShininess() const { return elemShininess; }
  255. /**
  256. * Gets the reflective element.
  257. * @return a daeSmartRef to the reflective element.
  258. */
  259. const domCommon_color_or_texture_typeRef getReflective() const { return elemReflective; }
  260. /**
  261. * Gets the reflectivity element.
  262. * @return a daeSmartRef to the reflectivity element.
  263. */
  264. const domCommon_float_or_param_typeRef getReflectivity() const { return elemReflectivity; }
  265. /**
  266. * Gets the transparent element.
  267. * @return a daeSmartRef to the transparent element.
  268. */
  269. const domCommon_transparent_typeRef getTransparent() const { return elemTransparent; }
  270. /**
  271. * Gets the transparency element.
  272. * @return a daeSmartRef to the transparency element.
  273. */
  274. const domCommon_float_or_param_typeRef getTransparency() const { return elemTransparency; }
  275. /**
  276. * Gets the index_of_refraction element.
  277. * @return a daeSmartRef to the index_of_refraction element.
  278. */
  279. const domCommon_float_or_param_typeRef getIndex_of_refraction() const { return elemIndex_of_refraction; }
  280. protected:
  281. /**
  282. * Constructor
  283. */
  284. domPhong(DAE& dae) : daeElement(dae), elemEmission(), elemAmbient(), elemDiffuse(), elemSpecular(), elemShininess(), elemReflective(), elemReflectivity(), elemTransparent(), elemTransparency(), elemIndex_of_refraction() {}
  285. /**
  286. * Destructor
  287. */
  288. virtual ~domPhong() {}
  289. /**
  290. * Overloaded assignment operator
  291. */
  292. virtual domPhong &operator=( const domPhong &cpy ) { (void)cpy; return *this; }
  293. public: // STATIC METHODS
  294. /**
  295. * Creates an instance of this class and returns a daeElementRef referencing it.
  296. * @return a daeElementRef referencing an instance of this object.
  297. */
  298. static DLLSPEC daeElementRef create(DAE& dae);
  299. /**
  300. * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
  301. * If a daeMetaElement already exists it will return that instead of creating a new one.
  302. * @return A daeMetaElement describing this COLLADA element.
  303. */
  304. static DLLSPEC daeMetaElement* registerElement(DAE& dae);
  305. };
  306. class domBlinn;
  307. typedef daeSmartRef<domBlinn> domBlinnRef;
  308. typedef daeTArray<domBlinnRef> domBlinn_Array;
  309. class domBlinn : public daeElement
  310. {
  311. public:
  312. virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::BLINN; }
  313. static daeInt ID() { return 745; }
  314. virtual daeInt typeID() const { return ID(); }
  315. protected: // Elements
  316. domCommon_color_or_texture_typeRef elemEmission;
  317. domCommon_color_or_texture_typeRef elemAmbient;
  318. domCommon_color_or_texture_typeRef elemDiffuse;
  319. domCommon_color_or_texture_typeRef elemSpecular;
  320. domCommon_float_or_param_typeRef elemShininess;
  321. domCommon_color_or_texture_typeRef elemReflective;
  322. domCommon_float_or_param_typeRef elemReflectivity;
  323. domCommon_transparent_typeRef elemTransparent;
  324. domCommon_float_or_param_typeRef elemTransparency;
  325. domCommon_float_or_param_typeRef elemIndex_of_refraction;
  326. public: //Accessors and Mutators
  327. /**
  328. * Gets the emission element.
  329. * @return a daeSmartRef to the emission element.
  330. */
  331. const domCommon_color_or_texture_typeRef getEmission() const { return elemEmission; }
  332. /**
  333. * Gets the ambient element.
  334. * @return a daeSmartRef to the ambient element.
  335. */
  336. const domCommon_color_or_texture_typeRef getAmbient() const { return elemAmbient; }
  337. /**
  338. * Gets the diffuse element.
  339. * @return a daeSmartRef to the diffuse element.
  340. */
  341. const domCommon_color_or_texture_typeRef getDiffuse() const { return elemDiffuse; }
  342. /**
  343. * Gets the specular element.
  344. * @return a daeSmartRef to the specular element.
  345. */
  346. const domCommon_color_or_texture_typeRef getSpecular() const { return elemSpecular; }
  347. /**
  348. * Gets the shininess element.
  349. * @return a daeSmartRef to the shininess element.
  350. */
  351. const domCommon_float_or_param_typeRef getShininess() const { return elemShininess; }
  352. /**
  353. * Gets the reflective element.
  354. * @return a daeSmartRef to the reflective element.
  355. */
  356. const domCommon_color_or_texture_typeRef getReflective() const { return elemReflective; }
  357. /**
  358. * Gets the reflectivity element.
  359. * @return a daeSmartRef to the reflectivity element.
  360. */
  361. const domCommon_float_or_param_typeRef getReflectivity() const { return elemReflectivity; }
  362. /**
  363. * Gets the transparent element.
  364. * @return a daeSmartRef to the transparent element.
  365. */
  366. const domCommon_transparent_typeRef getTransparent() const { return elemTransparent; }
  367. /**
  368. * Gets the transparency element.
  369. * @return a daeSmartRef to the transparency element.
  370. */
  371. const domCommon_float_or_param_typeRef getTransparency() const { return elemTransparency; }
  372. /**
  373. * Gets the index_of_refraction element.
  374. * @return a daeSmartRef to the index_of_refraction element.
  375. */
  376. const domCommon_float_or_param_typeRef getIndex_of_refraction() const { return elemIndex_of_refraction; }
  377. protected:
  378. /**
  379. * Constructor
  380. */
  381. domBlinn(DAE& dae) : daeElement(dae), elemEmission(), elemAmbient(), elemDiffuse(), elemSpecular(), elemShininess(), elemReflective(), elemReflectivity(), elemTransparent(), elemTransparency(), elemIndex_of_refraction() {}
  382. /**
  383. * Destructor
  384. */
  385. virtual ~domBlinn() {}
  386. /**
  387. * Overloaded assignment operator
  388. */
  389. virtual domBlinn &operator=( const domBlinn &cpy ) { (void)cpy; return *this; }
  390. public: // STATIC METHODS
  391. /**
  392. * Creates an instance of this class and returns a daeElementRef referencing it.
  393. * @return a daeElementRef referencing an instance of this object.
  394. */
  395. static DLLSPEC daeElementRef create(DAE& dae);
  396. /**
  397. * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
  398. * If a daeMetaElement already exists it will return that instead of creating a new one.
  399. * @return A daeMetaElement describing this COLLADA element.
  400. */
  401. static DLLSPEC daeMetaElement* registerElement(DAE& dae);
  402. };
  403. protected: // Attributes
  404. /**
  405. * The id attribute is a text string containing the unique identifier of
  406. * this element. This value must be unique within the instance document.
  407. * Optional attribute.
  408. */
  409. xsID attrId;
  410. /**
  411. * The sid attribute is a text string value containing the sub-identifier
  412. * of this element. This value must be unique within the scope of the parent
  413. * element. Optional attribute.
  414. */
  415. xsNCName attrSid;
  416. protected: // Elements
  417. /**
  418. * The technique element may contain an asset element. @see domAsset
  419. */
  420. domAssetRef elemAsset;
  421. domImage_Array elemImage_array;
  422. domCommon_newparam_type_Array elemNewparam_array;
  423. domConstantRef elemConstant;
  424. domLambertRef elemLambert;
  425. domPhongRef elemPhong;
  426. domBlinnRef elemBlinn;
  427. /**
  428. * The extra element may appear any number of times. @see domExtra
  429. */
  430. domExtra_Array elemExtra_array;
  431. /**
  432. * Used to preserve order in elements that do not specify strict sequencing of sub-elements.
  433. */
  434. daeElementRefArray _contents;
  435. /**
  436. * Used to preserve order in elements that have a complex content model.
  437. */
  438. daeUIntArray _contentsOrder;
  439. /**
  440. * Used to store information needed for some content model objects.
  441. */
  442. daeTArray< daeCharArray * > _CMData;
  443. public: //Accessors and Mutators
  444. /**
  445. * Gets the id attribute.
  446. * @return Returns a xsID of the id attribute.
  447. */
  448. xsID getId() const { return attrId; }
  449. /**
  450. * Sets the id attribute.
  451. * @param atId The new value for the id attribute.
  452. */
  453. void setId( xsID atId ) { *(daeStringRef*)&attrId = atId; _validAttributeArray[0] = true;
  454. if( _document != NULL ) _document->changeElementID( this, attrId );
  455. }
  456. /**
  457. * Gets the sid attribute.
  458. * @return Returns a xsNCName of the sid attribute.
  459. */
  460. xsNCName getSid() const { return attrSid; }
  461. /**
  462. * Sets the sid attribute.
  463. * @param atSid The new value for the sid attribute.
  464. */
  465. void setSid( xsNCName atSid ) { *(daeStringRef*)&attrSid = atSid; _validAttributeArray[1] = true; }
  466. /**
  467. * Gets the asset element.
  468. * @return a daeSmartRef to the asset element.
  469. */
  470. const domAssetRef getAsset() const { return elemAsset; }
  471. /**
  472. * Gets the image element array.
  473. * @return Returns a reference to the array of image elements.
  474. */
  475. domImage_Array &getImage_array() { return elemImage_array; }
  476. /**
  477. * Gets the image element array.
  478. * @return Returns a constant reference to the array of image elements.
  479. */
  480. const domImage_Array &getImage_array() const { return elemImage_array; }
  481. /**
  482. * Gets the newparam element array.
  483. * @return Returns a reference to the array of newparam elements.
  484. */
  485. domCommon_newparam_type_Array &getNewparam_array() { return elemNewparam_array; }
  486. /**
  487. * Gets the newparam element array.
  488. * @return Returns a constant reference to the array of newparam elements.
  489. */
  490. const domCommon_newparam_type_Array &getNewparam_array() const { return elemNewparam_array; }
  491. /**
  492. * Gets the constant element.
  493. * @return a daeSmartRef to the constant element.
  494. */
  495. const domConstantRef getConstant() const { return elemConstant; }
  496. /**
  497. * Gets the lambert element.
  498. * @return a daeSmartRef to the lambert element.
  499. */
  500. const domLambertRef getLambert() const { return elemLambert; }
  501. /**
  502. * Gets the phong element.
  503. * @return a daeSmartRef to the phong element.
  504. */
  505. const domPhongRef getPhong() const { return elemPhong; }
  506. /**
  507. * Gets the blinn element.
  508. * @return a daeSmartRef to the blinn element.
  509. */
  510. const domBlinnRef getBlinn() const { return elemBlinn; }
  511. /**
  512. * Gets the extra element array.
  513. * @return Returns a reference to the array of extra elements.
  514. */
  515. domExtra_Array &getExtra_array() { return elemExtra_array; }
  516. /**
  517. * Gets the extra element array.
  518. * @return Returns a constant reference to the array of extra elements.
  519. */
  520. const domExtra_Array &getExtra_array() const { return elemExtra_array; }
  521. /**
  522. * Gets the _contents array.
  523. * @return Returns a reference to the _contents element array.
  524. */
  525. daeElementRefArray &getContents() { return _contents; }
  526. /**
  527. * Gets the _contents array.
  528. * @return Returns a constant reference to the _contents element array.
  529. */
  530. const daeElementRefArray &getContents() const { return _contents; }
  531. protected:
  532. /**
  533. * Constructor
  534. */
  535. domTechnique(DAE& dae) : daeElement(dae), attrId(), attrSid(), elemAsset(), elemImage_array(), elemNewparam_array(), elemConstant(), elemLambert(), elemPhong(), elemBlinn(), elemExtra_array() {}
  536. /**
  537. * Destructor
  538. */
  539. virtual ~domTechnique() { daeElement::deleteCMDataArray(_CMData); }
  540. /**
  541. * Overloaded assignment operator
  542. */
  543. virtual domTechnique &operator=( const domTechnique &cpy ) { (void)cpy; return *this; }
  544. public: // STATIC METHODS
  545. /**
  546. * Creates an instance of this class and returns a daeElementRef referencing it.
  547. * @return a daeElementRef referencing an instance of this object.
  548. */
  549. static DLLSPEC daeElementRef create(DAE& dae);
  550. /**
  551. * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
  552. * If a daeMetaElement already exists it will return that instead of creating a new one.
  553. * @return A daeMetaElement describing this COLLADA element.
  554. */
  555. static DLLSPEC daeMetaElement* registerElement(DAE& dae);
  556. };
  557. protected: // Attribute
  558. /**
  559. * The id attribute is a text string containing the unique identifier of
  560. * this element. This value must be unique within the instance document.
  561. * Optional attribute.
  562. */
  563. xsID attrId;
  564. protected: // Elements
  565. domAssetRef elemAsset;
  566. domImage_Array elemImage_array;
  567. domCommon_newparam_type_Array elemNewparam_array;
  568. /**
  569. * Holds a description of the textures, samplers, shaders, parameters, and
  570. * passes necessary for rendering this effect using one method. @see domTechnique
  571. */
  572. domTechniqueRef elemTechnique;
  573. /**
  574. * The extra element may appear any number of times. @see domExtra
  575. */
  576. domExtra_Array elemExtra_array;
  577. /**
  578. * Used to preserve order in elements that do not specify strict sequencing of sub-elements.
  579. */
  580. daeElementRefArray _contents;
  581. /**
  582. * Used to preserve order in elements that have a complex content model.
  583. */
  584. daeUIntArray _contentsOrder;
  585. /**
  586. * Used to store information needed for some content model objects.
  587. */
  588. daeTArray< daeCharArray * > _CMData;
  589. public: //Accessors and Mutators
  590. /**
  591. * Gets the id attribute.
  592. * @return Returns a xsID of the id attribute.
  593. */
  594. xsID getId() const { return attrId; }
  595. /**
  596. * Sets the id attribute.
  597. * @param atId The new value for the id attribute.
  598. */
  599. void setId( xsID atId ) { *(daeStringRef*)&attrId = atId; _validAttributeArray[0] = true;
  600. if( _document != NULL ) _document->changeElementID( this, attrId );
  601. }
  602. /**
  603. * Gets the asset element.
  604. * @return a daeSmartRef to the asset element.
  605. */
  606. const domAssetRef getAsset() const { return elemAsset; }
  607. /**
  608. * Gets the image element array.
  609. * @return Returns a reference to the array of image elements.
  610. */
  611. domImage_Array &getImage_array() { return elemImage_array; }
  612. /**
  613. * Gets the image element array.
  614. * @return Returns a constant reference to the array of image elements.
  615. */
  616. const domImage_Array &getImage_array() const { return elemImage_array; }
  617. /**
  618. * Gets the newparam element array.
  619. * @return Returns a reference to the array of newparam elements.
  620. */
  621. domCommon_newparam_type_Array &getNewparam_array() { return elemNewparam_array; }
  622. /**
  623. * Gets the newparam element array.
  624. * @return Returns a constant reference to the array of newparam elements.
  625. */
  626. const domCommon_newparam_type_Array &getNewparam_array() const { return elemNewparam_array; }
  627. /**
  628. * Gets the technique element.
  629. * @return a daeSmartRef to the technique element.
  630. */
  631. const domTechniqueRef getTechnique() const { return elemTechnique; }
  632. /**
  633. * Gets the extra element array.
  634. * @return Returns a reference to the array of extra elements.
  635. */
  636. domExtra_Array &getExtra_array() { return elemExtra_array; }
  637. /**
  638. * Gets the extra element array.
  639. * @return Returns a constant reference to the array of extra elements.
  640. */
  641. const domExtra_Array &getExtra_array() const { return elemExtra_array; }
  642. /**
  643. * Gets the _contents array.
  644. * @return Returns a reference to the _contents element array.
  645. */
  646. daeElementRefArray &getContents() { return _contents; }
  647. /**
  648. * Gets the _contents array.
  649. * @return Returns a constant reference to the _contents element array.
  650. */
  651. const daeElementRefArray &getContents() const { return _contents; }
  652. protected:
  653. /**
  654. * Constructor
  655. */
  656. domProfile_COMMON(DAE& dae) : domFx_profile_abstract(dae), attrId(), elemAsset(), elemImage_array(), elemNewparam_array(), elemTechnique(), elemExtra_array() {}
  657. /**
  658. * Destructor
  659. */
  660. virtual ~domProfile_COMMON() { daeElement::deleteCMDataArray(_CMData); }
  661. /**
  662. * Overloaded assignment operator
  663. */
  664. virtual domProfile_COMMON &operator=( const domProfile_COMMON &cpy ) { (void)cpy; return *this; }
  665. public: // STATIC METHODS
  666. /**
  667. * Creates an instance of this class and returns a daeElementRef referencing it.
  668. * @return a daeElementRef referencing an instance of this object.
  669. */
  670. static DLLSPEC daeElementRef create(DAE& dae);
  671. /**
  672. * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
  673. * If a daeMetaElement already exists it will return that instead of creating a new one.
  674. * @return A daeMetaElement describing this COLLADA element.
  675. */
  676. static DLLSPEC daeMetaElement* registerElement(DAE& dae);
  677. };
  678. #endif