123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358 |
- /*
- * Copyright 2006 Sony Computer Entertainment Inc.
- *
- * Licensed under the SCEA Shared Source License, Version 1.0 (the "License"); you may not use this
- * file except in compliance with the License. You may obtain a copy of the License at:
- * http://research.scea.com/scea_shared_source_license.html
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied. See the License for the specific language governing permissions and limitations under the
- * License.
- */
- #ifndef __domInstance_material_h__
- #define __domInstance_material_h__
- #include <dae/daeDocument.h>
- #include <dom/domTypes.h>
- #include <dom/domElements.h>
- #include <dom/domExtra.h>
- class DAE;
- /**
- * The instance_material element declares the instantiation of a COLLADA material
- * resource.
- */
- class domInstance_material : public daeElement
- {
- public:
- virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::INSTANCE_MATERIAL; }
- static daeInt ID() { return 697; }
- virtual daeInt typeID() const { return ID(); }
- public:
- class domBind;
- typedef daeSmartRef<domBind> domBindRef;
- typedef daeTArray<domBindRef> domBind_Array;
- /**
- * The bind element binds values to effect parameters upon instantiation.
- */
- class domBind : public daeElement
- {
- public:
- virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::BIND; }
- static daeInt ID() { return 698; }
- virtual daeInt typeID() const { return ID(); }
- protected: // Attributes
- /**
- * The semantic attribute specifies which effect parameter to bind.
- */
- xsNCName attrSemantic;
- /**
- * The target attribute specifies the location of the value to bind to the
- * specified semantic. This text string is a path-name following a simple
- * syntax described in the “Addressing Syntax” section.
- */
- xsToken attrTarget;
- public: //Accessors and Mutators
- /**
- * Gets the semantic attribute.
- * @return Returns a xsNCName of the semantic attribute.
- */
- xsNCName getSemantic() const { return attrSemantic; }
- /**
- * Sets the semantic attribute.
- * @param atSemantic The new value for the semantic attribute.
- */
- void setSemantic( xsNCName atSemantic ) { *(daeStringRef*)&attrSemantic = atSemantic; _validAttributeArray[0] = true; }
- /**
- * Gets the target attribute.
- * @return Returns a xsToken of the target attribute.
- */
- xsToken getTarget() const { return attrTarget; }
- /**
- * Sets the target attribute.
- * @param atTarget The new value for the target attribute.
- */
- void setTarget( xsToken atTarget ) { *(daeStringRef*)&attrTarget = atTarget; _validAttributeArray[1] = true; }
- protected:
- /**
- * Constructor
- */
- domBind(DAE& dae) : daeElement(dae), attrSemantic(), attrTarget() {}
- /**
- * Destructor
- */
- virtual ~domBind() {}
- /**
- * Overloaded assignment operator
- */
- virtual domBind &operator=( const domBind &cpy ) { (void)cpy; return *this; }
- public: // STATIC METHODS
- /**
- * Creates an instance of this class and returns a daeElementRef referencing it.
- * @return a daeElementRef referencing an instance of this object.
- */
- static DLLSPEC daeElementRef create(DAE& dae);
- /**
- * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
- * If a daeMetaElement already exists it will return that instead of creating a new one.
- * @return A daeMetaElement describing this COLLADA element.
- */
- static DLLSPEC daeMetaElement* registerElement(DAE& dae);
- };
- class domBind_vertex_input;
- typedef daeSmartRef<domBind_vertex_input> domBind_vertex_inputRef;
- typedef daeTArray<domBind_vertex_inputRef> domBind_vertex_input_Array;
- /**
- * The bind_vertex_input element binds vertex inputs to effect parameters
- * upon instantiation.
- */
- class domBind_vertex_input : public daeElement
- {
- public:
- virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::BIND_VERTEX_INPUT; }
- static daeInt ID() { return 699; }
- virtual daeInt typeID() const { return ID(); }
- protected: // Attributes
- /**
- * The semantic attribute specifies which effect parameter to bind.
- */
- xsNCName attrSemantic;
- /**
- * The input_semantic attribute specifies which input semantic to bind.
- */
- xsNCName attrInput_semantic;
- /**
- * The input_set attribute specifies which input set to bind.
- */
- domUint attrInput_set;
- public: //Accessors and Mutators
- /**
- * Gets the semantic attribute.
- * @return Returns a xsNCName of the semantic attribute.
- */
- xsNCName getSemantic() const { return attrSemantic; }
- /**
- * Sets the semantic attribute.
- * @param atSemantic The new value for the semantic attribute.
- */
- void setSemantic( xsNCName atSemantic ) { *(daeStringRef*)&attrSemantic = atSemantic; _validAttributeArray[0] = true; }
- /**
- * Gets the input_semantic attribute.
- * @return Returns a xsNCName of the input_semantic attribute.
- */
- xsNCName getInput_semantic() const { return attrInput_semantic; }
- /**
- * Sets the input_semantic attribute.
- * @param atInput_semantic The new value for the input_semantic attribute.
- */
- void setInput_semantic( xsNCName atInput_semantic ) { *(daeStringRef*)&attrInput_semantic = atInput_semantic; _validAttributeArray[1] = true; }
- /**
- * Gets the input_set attribute.
- * @return Returns a domUint of the input_set attribute.
- */
- domUint getInput_set() const { return attrInput_set; }
- /**
- * Sets the input_set attribute.
- * @param atInput_set The new value for the input_set attribute.
- */
- void setInput_set( domUint atInput_set ) { attrInput_set = atInput_set; _validAttributeArray[2] = true; }
- protected:
- /**
- * Constructor
- */
- domBind_vertex_input(DAE& dae) : daeElement(dae), attrSemantic(), attrInput_semantic(), attrInput_set() {}
- /**
- * Destructor
- */
- virtual ~domBind_vertex_input() {}
- /**
- * Overloaded assignment operator
- */
- virtual domBind_vertex_input &operator=( const domBind_vertex_input &cpy ) { (void)cpy; return *this; }
- public: // STATIC METHODS
- /**
- * Creates an instance of this class and returns a daeElementRef referencing it.
- * @return a daeElementRef referencing an instance of this object.
- */
- static DLLSPEC daeElementRef create(DAE& dae);
- /**
- * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
- * If a daeMetaElement already exists it will return that instead of creating a new one.
- * @return A daeMetaElement describing this COLLADA element.
- */
- static DLLSPEC daeMetaElement* registerElement(DAE& dae);
- };
- protected: // Attributes
- /**
- * The symbol attribute specifies which symbol defined from within the geometry
- * this material binds to.
- */
- xsNCName attrSymbol;
- /**
- * The target attribute specifies the URL of the location of the object to
- * instantiate.
- */
- xsAnyURI attrTarget;
- /**
- * The sid attribute is a text string value containing the sub-identifier
- * of this element. This value must be unique within the scope of the parent
- * element. Optional attribute.
- */
- xsNCName attrSid;
- /**
- * The name attribute is the text string name of this element. Optional attribute.
- */
- xsNCName attrName;
- protected: // Elements
- /**
- * The bind element binds values to effect parameters upon instantiation.
- * @see domBind
- */
- domBind_Array elemBind_array;
- /**
- * The bind_vertex_input element binds vertex inputs to effect parameters
- * upon instantiation. @see domBind_vertex_input
- */
- domBind_vertex_input_Array elemBind_vertex_input_array;
- /**
- * The extra element may appear any number of times. @see domExtra
- */
- domExtra_Array elemExtra_array;
- public: //Accessors and Mutators
- /**
- * Gets the symbol attribute.
- * @return Returns a xsNCName of the symbol attribute.
- */
- xsNCName getSymbol() const { return attrSymbol; }
- /**
- * Sets the symbol attribute.
- * @param atSymbol The new value for the symbol attribute.
- */
- void setSymbol( xsNCName atSymbol ) { *(daeStringRef*)&attrSymbol = atSymbol; _validAttributeArray[0] = true; }
- /**
- * Gets the target attribute.
- * @return Returns a xsAnyURI reference of the target attribute.
- */
- xsAnyURI &getTarget() { return attrTarget; }
- /**
- * Gets the target attribute.
- * @return Returns a constant xsAnyURI reference of the target attribute.
- */
- const xsAnyURI &getTarget() const { return attrTarget; }
- /**
- * Sets the target attribute.
- * @param atTarget The new value for the target attribute.
- */
- void setTarget( const xsAnyURI &atTarget ) { attrTarget = atTarget; _validAttributeArray[1] = true; }
- /**
- * Sets the target attribute.
- * @param atTarget The new value for the target attribute.
- */
- void setTarget( xsString atTarget ) { attrTarget = atTarget; _validAttributeArray[1] = true; }
- /**
- * Gets the sid attribute.
- * @return Returns a xsNCName of the sid attribute.
- */
- xsNCName getSid() const { return attrSid; }
- /**
- * Sets the sid attribute.
- * @param atSid The new value for the sid attribute.
- */
- void setSid( xsNCName atSid ) { *(daeStringRef*)&attrSid = atSid; _validAttributeArray[2] = true; }
- /**
- * Gets the name attribute.
- * @return Returns a xsNCName of the name attribute.
- */
- xsNCName getName() const { return attrName; }
- /**
- * Sets the name attribute.
- * @param atName The new value for the name attribute.
- */
- void setName( xsNCName atName ) { *(daeStringRef*)&attrName = atName; _validAttributeArray[3] = true; }
- /**
- * Gets the bind element array.
- * @return Returns a reference to the array of bind elements.
- */
- domBind_Array &getBind_array() { return elemBind_array; }
- /**
- * Gets the bind element array.
- * @return Returns a constant reference to the array of bind elements.
- */
- const domBind_Array &getBind_array() const { return elemBind_array; }
- /**
- * Gets the bind_vertex_input element array.
- * @return Returns a reference to the array of bind_vertex_input elements.
- */
- domBind_vertex_input_Array &getBind_vertex_input_array() { return elemBind_vertex_input_array; }
- /**
- * Gets the bind_vertex_input element array.
- * @return Returns a constant reference to the array of bind_vertex_input elements.
- */
- const domBind_vertex_input_Array &getBind_vertex_input_array() const { return elemBind_vertex_input_array; }
- /**
- * Gets the extra element array.
- * @return Returns a reference to the array of extra elements.
- */
- domExtra_Array &getExtra_array() { return elemExtra_array; }
- /**
- * Gets the extra element array.
- * @return Returns a constant reference to the array of extra elements.
- */
- const domExtra_Array &getExtra_array() const { return elemExtra_array; }
- protected:
- /**
- * Constructor
- */
- domInstance_material(DAE& dae) : daeElement(dae), attrSymbol(), attrTarget(dae, *this), attrSid(), attrName(), elemBind_array(), elemBind_vertex_input_array(), elemExtra_array() {}
- /**
- * Destructor
- */
- virtual ~domInstance_material() {}
- /**
- * Overloaded assignment operator
- */
- virtual domInstance_material &operator=( const domInstance_material &cpy ) { (void)cpy; return *this; }
- public: // STATIC METHODS
- /**
- * Creates an instance of this class and returns a daeElementRef referencing it.
- * @return a daeElementRef referencing an instance of this object.
- */
- static DLLSPEC daeElementRef create(DAE& dae);
- /**
- * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
- * If a daeMetaElement already exists it will return that instead of creating a new one.
- * @return A daeMetaElement describing this COLLADA element.
- */
- static DLLSPEC daeMetaElement* registerElement(DAE& dae);
- };
- #endif
|