qquick3dgeometry.sip 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. // qquick3dgeometry.sip generated by MetaSIP
  2. //
  3. // This file is part of the QtQuick3D Python extension module.
  4. //
  5. // Copyright (c) 2026 Riverbank Computing Limited <info@riverbankcomputing.com>
  6. //
  7. // This file is part of PyQt6.
  8. //
  9. // This file may be used under the terms of the GNU General Public License
  10. // version 3.0 as published by the Free Software Foundation and appearing in
  11. // the file LICENSE included in the packaging of this file. Please review the
  12. // following information to ensure the GNU General Public License version 3.0
  13. // requirements will be met: http://www.gnu.org/copyleft/gpl.html.
  14. //
  15. // If you do not wish to use this file under the terms of the GPL version 3.0
  16. // then you may purchase a commercial license. For more information contact
  17. // info@riverbankcomputing.com.
  18. //
  19. // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
  20. // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  21. class QQuick3DGeometry : public QQuick3DObject
  22. {
  23. %TypeHeaderCode
  24. #include <qquick3dgeometry.h>
  25. %End
  26. public:
  27. explicit QQuick3DGeometry(QQuick3DObject *parent /TransferThis/ = 0);
  28. virtual ~QQuick3DGeometry();
  29. enum class PrimitiveType
  30. {
  31. Points,
  32. LineStrip,
  33. Lines,
  34. TriangleStrip,
  35. TriangleFan,
  36. Triangles,
  37. };
  38. struct Attribute
  39. {
  40. %TypeHeaderCode
  41. #include <qquick3dgeometry.h>
  42. %End
  43. enum Semantic
  44. {
  45. IndexSemantic,
  46. PositionSemantic,
  47. NormalSemantic,
  48. TexCoordSemantic,
  49. TangentSemantic,
  50. BinormalSemantic,
  51. JointSemantic,
  52. WeightSemantic,
  53. ColorSemantic,
  54. %If (Qt_6_1_0 -)
  55. TargetPositionSemantic,
  56. %End
  57. %If (Qt_6_1_0 -)
  58. TargetNormalSemantic,
  59. %End
  60. %If (Qt_6_1_0 -)
  61. TargetTangentSemantic,
  62. %End
  63. %If (Qt_6_1_0 -)
  64. TargetBinormalSemantic,
  65. %End
  66. %If (Qt_6_1_0 -)
  67. TexCoord1Semantic,
  68. %End
  69. %If (Qt_6_1_0 -)
  70. TexCoord0Semantic,
  71. %End
  72. };
  73. enum ComponentType
  74. {
  75. U16Type,
  76. U32Type,
  77. F32Type,
  78. I32Type,
  79. };
  80. QQuick3DGeometry::Attribute::Semantic semantic;
  81. int offset;
  82. QQuick3DGeometry::Attribute::ComponentType componentType;
  83. };
  84. int attributeCount() const;
  85. QQuick3DGeometry::Attribute attribute(int index) const;
  86. QQuick3DGeometry::PrimitiveType primitiveType() const;
  87. QVector3D boundsMin() const;
  88. QVector3D boundsMax() const;
  89. int stride() const;
  90. void setVertexData(const QByteArray &data);
  91. void setVertexData(int offset, const QByteArray &data);
  92. void setIndexData(const QByteArray &data);
  93. void setIndexData(int offset, const QByteArray &data);
  94. void setStride(int stride);
  95. void setBounds(const QVector3D &min, const QVector3D &max);
  96. void setPrimitiveType(QQuick3DGeometry::PrimitiveType type);
  97. void addAttribute(QQuick3DGeometry::Attribute::Semantic semantic, int offset, QQuick3DGeometry::Attribute::ComponentType componentType);
  98. void addAttribute(const QQuick3DGeometry::Attribute &att);
  99. void clear();
  100. QByteArray vertexData() const;
  101. QByteArray indexData() const;
  102. %If (Qt_6_3_0 -)
  103. int subsetCount(int subset) const;
  104. %End
  105. %If (Qt_6_3_0 -)
  106. int subsetCount() const;
  107. %End
  108. %If (Qt_6_3_0 -)
  109. QVector3D subsetBoundsMin(int subset) const;
  110. %End
  111. %If (Qt_6_3_0 -)
  112. QVector3D subsetBoundsMax(int subset) const;
  113. %End
  114. %If (Qt_6_3_0 -)
  115. int subsetOffset(int subset) const;
  116. %End
  117. %If (Qt_6_3_0 -)
  118. QString subsetName(int subset) const;
  119. %End
  120. %If (Qt_6_3_0 -)
  121. void addSubset(int offset, int count, const QVector3D &boundsMin, const QVector3D &boundsMax, const QString &name = {});
  122. %End
  123. %If (Qt_6_6_0 -)
  124. struct TargetAttribute
  125. {
  126. %TypeHeaderCode
  127. #include <qquick3dgeometry.h>
  128. %End
  129. quint32 targetId;
  130. QQuick3DGeometry::Attribute attr;
  131. int stride;
  132. };
  133. %End
  134. %If (Qt_6_6_0 -)
  135. QByteArray targetData() const;
  136. %End
  137. %If (Qt_6_6_0 -)
  138. void setTargetData(int offset, const QByteArray &data);
  139. %End
  140. %If (Qt_6_6_0 -)
  141. void setTargetData(const QByteArray &data);
  142. %End
  143. %If (Qt_6_6_0 -)
  144. QQuick3DGeometry::TargetAttribute targetAttribute(int index) const;
  145. %End
  146. %If (Qt_6_6_0 -)
  147. int targetAttributeCount() const;
  148. %End
  149. %If (Qt_6_6_0 -)
  150. void addTargetAttribute(const QQuick3DGeometry::TargetAttribute &att);
  151. %End
  152. %If (Qt_6_6_0 -)
  153. void addTargetAttribute(quint32 targetId, QQuick3DGeometry::Attribute::Semantic semantic, int offset, int stride = 0);
  154. %End
  155. };