• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_scenes_h__
10 #define __domLibrary_physics_scenes_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_scene.h>
18 #include <dom/domExtra.h>
19 class DAE;
20 
21 /**
22  * The library_physics_scenes element declares a module of physics_scene elements.
23  */
24 class domLibrary_physics_scenes : public daeElement
25 {
26 public:
getElementType()27 	virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::LIBRARY_PHYSICS_SCENES; }
ID()28 	static daeInt ID() { return 725; }
typeID()29 	virtual daeInt typeID() const { return ID(); }
30 protected:  // Attributes
31 /**
32  *  The id attribute is a text string containing the unique identifier of
33  * this element.  This value must be unique within the instance document.
34  * Optional attribute.
35  */
36 	xsID attrId;
37 /**
38  *  The name attribute is the text string name of this element. Optional attribute.
39  */
40 	xsNCName attrName;
41 
42 protected:  // Elements
43 /**
44  *  The library_physics_scenes element may contain an asset element.  @see
45  * domAsset
46  */
47 	domAssetRef elemAsset;
48 /**
49  *  There must be at least one physics_scene element.  @see domPhysics_scene
50  */
51 	domPhysics_scene_Array elemPhysics_scene_array;
52 /**
53  *  The extra element may appear any number of times.  @see domExtra
54  */
55 	domExtra_Array elemExtra_array;
56 
57 public:	//Accessors and Mutators
58 	/**
59 	 * Gets the id attribute.
60 	 * @return Returns a xsID of the id attribute.
61 	 */
getId()62 	xsID getId() const { return attrId; }
63 	/**
64 	 * Sets the id attribute.
65 	 * @param atId The new value for the id attribute.
66 	 */
setId(xsID atId)67 	void setId( xsID atId ) { *(daeStringRef*)&attrId = atId; _validAttributeArray[0] = true;
68 		if( _document != NULL ) _document->changeElementID( this, attrId );
69 	}
70 
71 	/**
72 	 * Gets the name attribute.
73 	 * @return Returns a xsNCName of the name attribute.
74 	 */
getName()75 	xsNCName getName() const { return attrName; }
76 	/**
77 	 * Sets the name attribute.
78 	 * @param atName The new value for the name attribute.
79 	 */
setName(xsNCName atName)80 	void setName( xsNCName atName ) { *(daeStringRef*)&attrName = atName; _validAttributeArray[1] = true; }
81 
82 	/**
83 	 * Gets the asset element.
84 	 * @return a daeSmartRef to the asset element.
85 	 */
getAsset()86 	const domAssetRef getAsset() const { return elemAsset; }
87 	/**
88 	 * Gets the physics_scene element array.
89 	 * @return Returns a reference to the array of physics_scene elements.
90 	 */
getPhysics_scene_array()91 	domPhysics_scene_Array &getPhysics_scene_array() { return elemPhysics_scene_array; }
92 	/**
93 	 * Gets the physics_scene element array.
94 	 * @return Returns a constant reference to the array of physics_scene elements.
95 	 */
getPhysics_scene_array()96 	const domPhysics_scene_Array &getPhysics_scene_array() const { return elemPhysics_scene_array; }
97 	/**
98 	 * Gets the extra element array.
99 	 * @return Returns a reference to the array of extra elements.
100 	 */
getExtra_array()101 	domExtra_Array &getExtra_array() { return elemExtra_array; }
102 	/**
103 	 * Gets the extra element array.
104 	 * @return Returns a constant reference to the array of extra elements.
105 	 */
getExtra_array()106 	const domExtra_Array &getExtra_array() const { return elemExtra_array; }
107 protected:
108 	/**
109 	 * Constructor
110 	 */
domLibrary_physics_scenes(DAE & dae)111 	domLibrary_physics_scenes(DAE& dae) : daeElement(dae), attrId(), attrName(), elemAsset(), elemPhysics_scene_array(), elemExtra_array() {}
112 	/**
113 	 * Destructor
114 	 */
~domLibrary_physics_scenes()115 	virtual ~domLibrary_physics_scenes() {}
116 	/**
117 	 * Overloaded assignment operator
118 	 */
119 	virtual domLibrary_physics_scenes &operator=( const domLibrary_physics_scenes &cpy ) { (void)cpy; return *this; }
120 
121 public: // STATIC METHODS
122 	/**
123 	 * Creates an instance of this class and returns a daeElementRef referencing it.
124 	 * @return a daeElementRef referencing an instance of this object.
125 	 */
126 	static DLLSPEC daeElementRef create(DAE& dae);
127 	/**
128 	 * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
129 	 * If a daeMetaElement already exists it will return that instead of creating a new one.
130 	 * @return A daeMetaElement describing this COLLADA element.
131 	 */
132 	static DLLSPEC daeMetaElement* registerElement(DAE& dae);
133 };
134 
135 
136 #endif
137