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 __domFx_surface_init_from_common_h__
     10 #define __domFx_surface_init_from_common_h__
     11 
     12 #include <dae/daeDocument.h>
     13 #include <dom/domTypes.h>
     14 #include <dom/domElements.h>
     15 
     16 class DAE;
     17 
     18 /**
     19  * This element is an IDREF which specifies the image to use to initialize
     20  * a specific mip of a 1D or 2D surface, 3D slice, or Cube face.
     21  */
     22 class domFx_surface_init_from_common_complexType
     23 {
     24 protected:  // Attributes
     25 	xsUnsignedInt attrMip;
     26 	xsUnsignedInt attrSlice;
     27 	domFx_surface_face_enum attrFace;
     28 
     29 protected:  // Value
     30 	/**
     31 	 * The xsIDREF value of the text data of this element.
     32 	 */
     33 	xsIDREF _value;
     34 
     35 public:	//Accessors and Mutators
     36 	/**
     37 	 * Gets the mip attribute.
     38 	 * @return Returns a xsUnsignedInt of the mip attribute.
     39 	 */
     40 	xsUnsignedInt getMip() const { return attrMip; }
     41 	/**
     42 	 * Sets the mip attribute.
     43 	 * @param atMip The new value for the mip attribute.
     44 	 */
     45 	void setMip( xsUnsignedInt atMip ) { attrMip = atMip; }
     46 
     47 	/**
     48 	 * Gets the slice attribute.
     49 	 * @return Returns a xsUnsignedInt of the slice attribute.
     50 	 */
     51 	xsUnsignedInt getSlice() const { return attrSlice; }
     52 	/**
     53 	 * Sets the slice attribute.
     54 	 * @param atSlice The new value for the slice attribute.
     55 	 */
     56 	void setSlice( xsUnsignedInt atSlice ) { attrSlice = atSlice; }
     57 
     58 	/**
     59 	 * Gets the face attribute.
     60 	 * @return Returns a domFx_surface_face_enum of the face attribute.
     61 	 */
     62 	domFx_surface_face_enum getFace() const { return attrFace; }
     63 	/**
     64 	 * Sets the face attribute.
     65 	 * @param atFace The new value for the face attribute.
     66 	 */
     67 	void setFace( domFx_surface_face_enum atFace ) { attrFace = atFace; }
     68 
     69 	/**
     70 	 * Gets the value of this element.
     71 	 * @return Returns a xsIDREF of the value.
     72 	 */
     73 	xsIDREF &getValue() { return _value; }
     74 	/**
     75 	 * Gets the value of this element.
     76 	 * @return Returns a constant xsIDREF of the value.
     77 	 */
     78 	const xsIDREF &getValue() const { return _value; }
     79 	/**
     80 	 * Sets the _value of this element.
     81 	 * @param val The new value for this element.
     82 	 */
     83 	void setValue( const xsIDREF &val ) { _value = val; }
     84 
     85 protected:
     86 	/**
     87 	 * Constructor
     88 	 */
     89 	domFx_surface_init_from_common_complexType(DAE& dae, daeElement* elt) : attrMip(), attrSlice(), attrFace(), _value(*elt) {}
     90 	/**
     91 	 * Destructor
     92 	 */
     93 	virtual ~domFx_surface_init_from_common_complexType() {}
     94 	/**
     95 	 * Overloaded assignment operator
     96 	 */
     97 	virtual domFx_surface_init_from_common_complexType &operator=( const domFx_surface_init_from_common_complexType &cpy ) { (void)cpy; return *this; }
     98 };
     99 
    100 /**
    101  * An element of type domFx_surface_init_from_common_complexType.
    102  */
    103 class domFx_surface_init_from_common : public daeElement, public domFx_surface_init_from_common_complexType
    104 {
    105 public:
    106 	virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::FX_SURFACE_INIT_FROM_COMMON; }
    107 	static daeInt ID() { return 21; }
    108 	virtual daeInt typeID() const { return ID(); }
    109 
    110 public:	//Accessors and Mutators
    111 	/**
    112 	 * Gets the mip attribute.
    113 	 * @return Returns a xsUnsignedInt of the mip attribute.
    114 	 */
    115 	xsUnsignedInt getMip() const { return attrMip; }
    116 	/**
    117 	 * Sets the mip attribute.
    118 	 * @param atMip The new value for the mip attribute.
    119 	 */
    120 	void setMip( xsUnsignedInt atMip ) { attrMip = atMip; _validAttributeArray[0] = true; }
    121 
    122 	/**
    123 	 * Gets the slice attribute.
    124 	 * @return Returns a xsUnsignedInt of the slice attribute.
    125 	 */
    126 	xsUnsignedInt getSlice() const { return attrSlice; }
    127 	/**
    128 	 * Sets the slice attribute.
    129 	 * @param atSlice The new value for the slice attribute.
    130 	 */
    131 	void setSlice( xsUnsignedInt atSlice ) { attrSlice = atSlice; _validAttributeArray[1] = true; }
    132 
    133 	/**
    134 	 * Gets the face attribute.
    135 	 * @return Returns a domFx_surface_face_enum of the face attribute.
    136 	 */
    137 	domFx_surface_face_enum getFace() const { return attrFace; }
    138 	/**
    139 	 * Sets the face attribute.
    140 	 * @param atFace The new value for the face attribute.
    141 	 */
    142 	void setFace( domFx_surface_face_enum atFace ) { attrFace = atFace; _validAttributeArray[2] = true; }
    143 
    144 protected:
    145 	/**
    146 	 * Constructor
    147 	 */
    148 	domFx_surface_init_from_common(DAE& dae) : daeElement(dae), domFx_surface_init_from_common_complexType(dae, this) {}
    149 	/**
    150 	 * Destructor
    151 	 */
    152 	virtual ~domFx_surface_init_from_common() {}
    153 	/**
    154 	 * Overloaded assignment operator
    155 	 */
    156 	virtual domFx_surface_init_from_common &operator=( const domFx_surface_init_from_common &cpy ) { (void)cpy; return *this; }
    157 
    158 public: // STATIC METHODS
    159 	/**
    160 	 * Creates an instance of this class and returns a daeElementRef referencing it.
    161 	 * @return a daeElementRef referencing an instance of this object.
    162 	 */
    163 	static DLLSPEC daeElementRef create(DAE& dae);
    164 	/**
    165 	 * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
    166 	 * If a daeMetaElement already exists it will return that instead of creating a new one.
    167 	 * @return A daeMetaElement describing this COLLADA element.
    168 	 */
    169 	static DLLSPEC daeMetaElement* registerElement(DAE& dae);
    170 };
    171 
    172 
    173 #endif
    174