ArrayMesh.xml 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="ArrayMesh" inherits="Mesh" category="Core" version="3.0.alpha.custom_build">
  3. <brief_description>
  4. </brief_description>
  5. <description>
  6. </description>
  7. <tutorials>
  8. </tutorials>
  9. <demos>
  10. </demos>
  11. <methods>
  12. <method name="add_blend_shape">
  13. <return type="void">
  14. </return>
  15. <argument index="0" name="name" type="String">
  16. </argument>
  17. <description>
  18. </description>
  19. </method>
  20. <method name="add_surface_from_arrays">
  21. <return type="void">
  22. </return>
  23. <argument index="0" name="primitive" type="int" enum="Mesh.PrimitiveType">
  24. </argument>
  25. <argument index="1" name="arrays" type="Array">
  26. </argument>
  27. <argument index="2" name="blend_shapes" type="Array" default="[ ]">
  28. </argument>
  29. <argument index="3" name="compress_flags" type="int" default="97792">
  30. </argument>
  31. <description>
  32. Create a new surface ([method get_surface_count] that will become surf_idx for this.
  33. Surfaces are created to be rendered using a "primitive", which may be PRIMITIVE_POINTS, PRIMITIVE_LINES, PRIMITIVE_LINE_STRIP, PRIMITIVE_LINE_LOOP, PRIMITIVE_TRIANGLES, PRIMITIVE_TRIANGLE_STRIP, PRIMITIVE_TRIANGLE_FAN. (As a note, when using indices, it is recommended to only use just points, lines or triangles).
  34. </description>
  35. </method>
  36. <method name="center_geometry">
  37. <return type="void">
  38. </return>
  39. <description>
  40. </description>
  41. </method>
  42. <method name="clear_blend_shapes">
  43. <return type="void">
  44. </return>
  45. <description>
  46. </description>
  47. </method>
  48. <method name="get_blend_shape_count" qualifiers="const">
  49. <return type="int">
  50. </return>
  51. <description>
  52. </description>
  53. </method>
  54. <method name="get_blend_shape_mode" qualifiers="const">
  55. <return type="int" enum="Mesh.BlendShapeMode">
  56. </return>
  57. <description>
  58. </description>
  59. </method>
  60. <method name="get_blend_shape_name" qualifiers="const">
  61. <return type="String">
  62. </return>
  63. <argument index="0" name="index" type="int">
  64. </argument>
  65. <description>
  66. </description>
  67. </method>
  68. <method name="get_custom_aabb" qualifiers="const">
  69. <return type="Rect3">
  70. </return>
  71. <description>
  72. </description>
  73. </method>
  74. <method name="get_surface_count" qualifiers="const">
  75. <return type="int">
  76. </return>
  77. <description>
  78. Return the amount of surfaces that the [ArrayMesh] holds.
  79. </description>
  80. </method>
  81. <method name="regen_normalmaps">
  82. <return type="void">
  83. </return>
  84. <description>
  85. </description>
  86. </method>
  87. <method name="set_blend_shape_mode">
  88. <return type="void">
  89. </return>
  90. <argument index="0" name="mode" type="int" enum="Mesh.BlendShapeMode">
  91. </argument>
  92. <description>
  93. </description>
  94. </method>
  95. <method name="set_custom_aabb">
  96. <return type="void">
  97. </return>
  98. <argument index="0" name="aabb" type="Rect3">
  99. </argument>
  100. <description>
  101. </description>
  102. </method>
  103. <method name="surface_get_array_index_len" qualifiers="const">
  104. <return type="int">
  105. </return>
  106. <argument index="0" name="surf_idx" type="int">
  107. </argument>
  108. <description>
  109. Return the length in indices of the index array in the requested surface (see [method add_surface]).
  110. </description>
  111. </method>
  112. <method name="surface_get_array_len" qualifiers="const">
  113. <return type="int">
  114. </return>
  115. <argument index="0" name="surf_idx" type="int">
  116. </argument>
  117. <description>
  118. Return the length in vertices of the vertex array in the requested surface (see [method add_surface]).
  119. </description>
  120. </method>
  121. <method name="surface_get_arrays" qualifiers="const">
  122. <return type="Array">
  123. </return>
  124. <argument index="0" name="surf_idx" type="int">
  125. </argument>
  126. <description>
  127. </description>
  128. </method>
  129. <method name="surface_get_blend_shape_arrays" qualifiers="const">
  130. <return type="Array">
  131. </return>
  132. <argument index="0" name="surf_idx" type="int">
  133. </argument>
  134. <description>
  135. </description>
  136. </method>
  137. <method name="surface_get_format" qualifiers="const">
  138. <return type="int">
  139. </return>
  140. <argument index="0" name="surf_idx" type="int">
  141. </argument>
  142. <description>
  143. Return the format mask of the requested surface (see [method add_surface]).
  144. </description>
  145. </method>
  146. <method name="surface_get_material" qualifiers="const">
  147. <return type="Material">
  148. </return>
  149. <argument index="0" name="surf_idx" type="int">
  150. </argument>
  151. <description>
  152. Return a [Material] in a given surface. Surface is rendered using this material.
  153. </description>
  154. </method>
  155. <method name="surface_get_name" qualifiers="const">
  156. <return type="String">
  157. </return>
  158. <argument index="0" name="surf_idx" type="int">
  159. </argument>
  160. <description>
  161. </description>
  162. </method>
  163. <method name="surface_get_primitive_type" qualifiers="const">
  164. <return type="int" enum="Mesh.PrimitiveType">
  165. </return>
  166. <argument index="0" name="surf_idx" type="int">
  167. </argument>
  168. <description>
  169. Return the primitive type of the requested surface (see [method add_surface]).
  170. </description>
  171. </method>
  172. <method name="surface_remove">
  173. <return type="void">
  174. </return>
  175. <argument index="0" name="surf_idx" type="int">
  176. </argument>
  177. <description>
  178. Remove a surface at position surf_idx, shifting greater surfaces one surf_idx slot down.
  179. </description>
  180. </method>
  181. <method name="surface_set_material">
  182. <return type="void">
  183. </return>
  184. <argument index="0" name="surf_idx" type="int">
  185. </argument>
  186. <argument index="1" name="material" type="Material">
  187. </argument>
  188. <description>
  189. </description>
  190. </method>
  191. <method name="surface_set_name">
  192. <return type="void">
  193. </return>
  194. <argument index="0" name="surf_idx" type="int">
  195. </argument>
  196. <argument index="1" name="name" type="String">
  197. </argument>
  198. <description>
  199. Set a [Material] for a given surface. Surface will be rendered using this material.
  200. </description>
  201. </method>
  202. </methods>
  203. <constants>
  204. <constant name="NO_INDEX_ARRAY" value="-1" enum="">
  205. Default value used for index_array_len when no indices are present.
  206. </constant>
  207. <constant name="ARRAY_WEIGHTS_SIZE" value="4" enum="">
  208. Amount of weights/bone indices per vertex (always 4).
  209. </constant>
  210. <constant name="ARRAY_VERTEX" value="0">
  211. Vertex array (array of [Vector3] vertices).
  212. </constant>
  213. <constant name="ARRAY_NORMAL" value="1">
  214. Normal array (array of [Vector3] normals).
  215. </constant>
  216. <constant name="ARRAY_TANGENT" value="2">
  217. Tangent array, array of groups of 4 floats. first 3 floats determine the tangent, and the last the binormal direction as -1 or 1.
  218. </constant>
  219. <constant name="ARRAY_COLOR" value="3">
  220. Vertex array (array of [Color] colors).
  221. </constant>
  222. <constant name="ARRAY_TEX_UV" value="4">
  223. UV array (array of [Vector3] UVs or float array of groups of 2 floats (u,v)).
  224. </constant>
  225. <constant name="ARRAY_TEX_UV2" value="5">
  226. Second UV array (array of [Vector3] UVs or float array of groups of 2 floats (u,v)).
  227. </constant>
  228. <constant name="ARRAY_BONES" value="6">
  229. Array of bone indices, as a float array. Each element in groups of 4 floats.
  230. </constant>
  231. <constant name="ARRAY_WEIGHTS" value="7">
  232. Array of bone weights, as a float array. Each element in groups of 4 floats.
  233. </constant>
  234. <constant name="ARRAY_INDEX" value="8">
  235. Array of integers, used as indices referencing vertices. No index can be beyond the vertex array size.
  236. </constant>
  237. <constant name="ARRAY_MAX" value="9">
  238. </constant>
  239. <constant name="ARRAY_FORMAT_VERTEX" value="1">
  240. Array format will include vertices (mandatory).
  241. </constant>
  242. <constant name="ARRAY_FORMAT_NORMAL" value="2">
  243. Array format will include normals
  244. </constant>
  245. <constant name="ARRAY_FORMAT_TANGENT" value="4">
  246. Array format will include tangents
  247. </constant>
  248. <constant name="ARRAY_FORMAT_COLOR" value="8">
  249. Array format will include a color array.
  250. </constant>
  251. <constant name="ARRAY_FORMAT_TEX_UV" value="16">
  252. Array format will include UVs.
  253. </constant>
  254. <constant name="ARRAY_FORMAT_TEX_UV2" value="32">
  255. Array format will include another set of UVs.
  256. </constant>
  257. <constant name="ARRAY_FORMAT_BONES" value="64">
  258. Array format will include bone indices.
  259. </constant>
  260. <constant name="ARRAY_FORMAT_WEIGHTS" value="128">
  261. Array format will include bone weights.
  262. </constant>
  263. <constant name="ARRAY_FORMAT_INDEX" value="256">
  264. Index array will be used.
  265. </constant>
  266. </constants>
  267. </class>