domScale.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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 __domScale_h__
  14. #define __domScale_h__
  15. #include <dae/daeDocument.h>
  16. #include <dom/domTypes.h>
  17. #include <dom/domElements.h>
  18. #include <dom/domTargetableFloat3.h>
  19. class DAE;
  20. /**
  21. * The scale element contains a mathematical vector that represents the relative
  22. * proportions of the X, Y and Z axes of a coordinated system.
  23. */
  24. class domScale : public daeElement, public domTargetableFloat3_complexType
  25. {
  26. public:
  27. virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::SCALE; }
  28. static daeInt ID() { return 632; }
  29. virtual daeInt typeID() const { return ID(); }
  30. /**
  31. * Gets the sid attribute.
  32. * @return Returns a xsNCName of the sid attribute.
  33. */
  34. xsNCName getSid() const { return attrSid; }
  35. /**
  36. * Sets the sid attribute.
  37. * @param atSid The new value for the sid attribute.
  38. */
  39. void setSid( xsNCName atSid ) { *(daeStringRef*)&attrSid = atSid; _validAttributeArray[0] = true; }
  40. protected:
  41. /**
  42. * Constructor
  43. */
  44. domScale(DAE& dae) : daeElement(dae), domTargetableFloat3_complexType(dae, this) {}
  45. /**
  46. * Destructor
  47. */
  48. virtual ~domScale() {}
  49. /**
  50. * Overloaded assignment operator
  51. */
  52. virtual domScale &operator=( const domScale &cpy ) { (void)cpy; return *this; }
  53. public: // STATIC METHODS
  54. /**
  55. * Creates an instance of this class and returns a daeElementRef referencing it.
  56. * @return a daeElementRef referencing an instance of this object.
  57. */
  58. static DLLSPEC daeElementRef create(DAE& dae);
  59. /**
  60. * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
  61. * If a daeMetaElement already exists it will return that instead of creating a new one.
  62. * @return A daeMetaElement describing this COLLADA element.
  63. */
  64. static DLLSPEC daeMetaElement* registerElement(DAE& dae);
  65. };
  66. #endif