Home | History | Annotate | Download | only in dom
      1 /*
      2 * Copyright 2006 Sony Computer Entertainment Inc.
      3 *
      4 * Licensed under the MIT Open Source License, for details please see license.txt or the website
      5 * http://www.opensource.org/licenses/mit-license.php
      6 *
      7 */
      8 
      9 #ifndef __domLibrary_physics_materials_h__
     10 #define __domLibrary_physics_materials_h__
     11 
     12 #include <dae/daeDocument.h>
     13 #include <dom/domTypes.h>
     14 #include <dom/domElements.h>
     15 
     16 #include <dom/domAsset.h>
     17 #include <dom/domPhysics_material.h>
     18 #include <dom/domExtra.h>
     19 class DAE;
     20 
     21 /**
     22  * The library_physics_materials element declares a module of physics_material
     23  * elements.
     24  */
     25 class domLibrary_physics_materials : public daeElement
     26 {
     27 public:
     28 	virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::LIBRARY_PHYSICS_MATERIALS; }
     29 	static daeInt ID() { return 723; }
     30 	virtual daeInt typeID() const { return ID(); }
     31 protected:  // Attributes
     32 /**
     33  *  The id attribute is a text string containing the unique identifier of
     34  * this element.  This value must be unique within the instance document.
     35  * Optional attribute.
     36  */
     37 	xsID attrId;
     38 /**
     39  *  The name attribute is the text string name of this element. Optional attribute.
     40  */
     41 	xsNCName attrName;
     42 
     43 protected:  // Elements
     44 /**
     45  *  The library_physics_materials element may contain an asset element.  @see
     46  * domAsset
     47  */
     48 	domAssetRef elemAsset;
     49 /**
     50  *  There must be at least one physics_material element.  @see domPhysics_material
     51  */
     52 	domPhysics_material_Array elemPhysics_material_array;
     53 /**
     54  *  The extra element may appear any number of times.  @see domExtra
     55  */
     56 	domExtra_Array elemExtra_array;
     57 
     58 public:	//Accessors and Mutators
     59 	/**
     60 	 * Gets the id attribute.
     61 	 * @return Returns a xsID of the id attribute.
     62 	 */
     63 	xsID getId() const { return attrId; }
     64 	/**
     65 	 * Sets the id attribute.
     66 	 * @param atId The new value for the id attribute.
     67 	 */
     68 	void setId( xsID atId ) { *(daeStringRef*)&attrId = atId; _validAttributeArray[0] = true;
     69 		if( _document != NULL ) _document->changeElementID( this, attrId );
     70 	}
     71 
     72 	/**
     73 	 * Gets the name attribute.
     74 	 * @return Returns a xsNCName of the name attribute.
     75 	 */
     76 	xsNCName getName() const { return attrName; }
     77 	/**
     78 	 * Sets the name attribute.
     79 	 * @param atName The new value for the name attribute.
     80 	 */
     81 	void setName( xsNCName atName ) { *(daeStringRef*)&attrName = atName; _validAttributeArray[1] = true; }
     82 
     83 	/**
     84 	 * Gets the asset element.
     85 	 * @return a daeSmartRef to the asset element.
     86 	 */
     87 	const domAssetRef getAsset() const { return elemAsset; }
     88 	/**
     89 	 * Gets the physics_material element array.
     90 	 * @return Returns a reference to the array of physics_material elements.
     91 	 */
     92 	domPhysics_material_Array &getPhysics_material_array() { return elemPhysics_material_array; }
     93 	/**
     94 	 * Gets the physics_material element array.
     95 	 * @return Returns a constant reference to the array of physics_material elements.
     96 	 */
     97 	const domPhysics_material_Array &getPhysics_material_array() const { return elemPhysics_material_array; }
     98 	/**
     99 	 * Gets the extra element array.
    100 	 * @return Returns a reference to the array of extra elements.
    101 	 */
    102 	domExtra_Array &getExtra_array() { return elemExtra_array; }
    103 	/**
    104 	 * Gets the extra element array.
    105 	 * @return Returns a constant reference to the array of extra elements.
    106 	 */
    107 	const domExtra_Array &getExtra_array() const { return elemExtra_array; }
    108 protected:
    109 	/**
    110 	 * Constructor
    111 	 */
    112 	domLibrary_physics_materials(DAE& dae) : daeElement(dae), attrId(), attrName(), elemAsset(), elemPhysics_material_array(), elemExtra_array() {}
    113 	/**
    114 	 * Destructor
    115 	 */
    116 	virtual ~domLibrary_physics_materials() {}
    117 	/**
    118 	 * Overloaded assignment operator
    119 	 */
    120 	virtual domLibrary_physics_materials &operator=( const domLibrary_physics_materials &cpy ) { (void)cpy; return *this; }
    121 
    122 public: // STATIC METHODS
    123 	/**
    124 	 * Creates an instance of this class and returns a daeElementRef referencing it.
    125 	 * @return a daeElementRef referencing an instance of this object.
    126 	 */
    127 	static DLLSPEC daeElementRef create(DAE& dae);
    128 	/**
    129 	 * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
    130 	 * If a daeMetaElement already exists it will return that instead of creating a new one.
    131 	 * @return A daeMetaElement describing this COLLADA element.
    132 	 */
    133 	static DLLSPEC daeMetaElement* registerElement(DAE& dae);
    134 };
    135 
    136 
    137 #endif
    138