Mesh.xml 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="Mesh" inherits="Resource" category="Core" version="3.0.alpha.custom_build">
  3. <brief_description>
  4. A [Resource] that contains vertex-array based geometry.
  5. </brief_description>
  6. <description>
  7. Mesh is a type of [Resource] that contains vertex-array based geometry, divided in [i]surfaces[/i]. Each surface contains a completely separate array and a material used to draw it. Design wise, a mesh with multiple surfaces is preferred to a single surface, because objects created in 3D editing software commonly contain multiple materials.
  8. </description>
  9. <tutorials>
  10. </tutorials>
  11. <demos>
  12. </demos>
  13. <methods>
  14. <method name="create_convex_shape" qualifiers="const">
  15. <return type="Shape">
  16. </return>
  17. <description>
  18. Calculate a [ConvexPolygonShape] from the mesh.
  19. </description>
  20. </method>
  21. <method name="create_outline" qualifiers="const">
  22. <return type="Mesh">
  23. </return>
  24. <argument index="0" name="margin" type="float">
  25. </argument>
  26. <description>
  27. Calculate an outline mesh at a defined offset (margin) from the original mesh. Note: Typically returns the vertices in reverse order (e.g. clockwise to anti-clockwise).
  28. </description>
  29. </method>
  30. <method name="create_trimesh_shape" qualifiers="const">
  31. <return type="Shape">
  32. </return>
  33. <description>
  34. Calculate a [ConcavePolygonShape] from the mesh.
  35. </description>
  36. </method>
  37. <method name="generate_triangle_mesh" qualifiers="const">
  38. <return type="TriangleMesh">
  39. </return>
  40. <description>
  41. Generate a [TriangleMesh] from the mesh.
  42. </description>
  43. </method>
  44. <method name="get_faces" qualifiers="const">
  45. <return type="PoolVector3Array">
  46. </return>
  47. <description>
  48. Returns all the vertices that make up the faces of the mesh. Each three vertices represent one triangle.
  49. </description>
  50. </method>
  51. </methods>
  52. <constants>
  53. <constant name="PRIMITIVE_POINTS" value="0">
  54. Render array as points (one vertex equals one point).
  55. </constant>
  56. <constant name="PRIMITIVE_LINES" value="1">
  57. Render array as lines (every two vertices a line is created).
  58. </constant>
  59. <constant name="PRIMITIVE_LINE_STRIP" value="2">
  60. Render array as line strip.
  61. </constant>
  62. <constant name="PRIMITIVE_LINE_LOOP" value="3">
  63. Render array as line loop (like line strip, but closed).
  64. </constant>
  65. <constant name="PRIMITIVE_TRIANGLES" value="4">
  66. Render array as triangles (every three vertices a triangle is created).
  67. </constant>
  68. <constant name="PRIMITIVE_TRIANGLE_STRIP" value="5">
  69. Render array as triangle strips.
  70. </constant>
  71. <constant name="PRIMITIVE_TRIANGLE_FAN" value="6">
  72. Render array as triangle fans.
  73. </constant>
  74. <constant name="BLEND_SHAPE_MODE_NORMALIZED" value="0">
  75. </constant>
  76. <constant name="BLEND_SHAPE_MODE_RELATIVE" value="1">
  77. </constant>
  78. <constant name="ARRAY_FORMAT_VERTEX" value="1">
  79. </constant>
  80. <constant name="ARRAY_FORMAT_NORMAL" value="2">
  81. </constant>
  82. <constant name="ARRAY_FORMAT_TANGENT" value="4">
  83. </constant>
  84. <constant name="ARRAY_FORMAT_COLOR" value="8">
  85. </constant>
  86. <constant name="ARRAY_FORMAT_TEX_UV" value="16">
  87. </constant>
  88. <constant name="ARRAY_FORMAT_TEX_UV2" value="32">
  89. </constant>
  90. <constant name="ARRAY_FORMAT_BONES" value="64">
  91. </constant>
  92. <constant name="ARRAY_FORMAT_WEIGHTS" value="128">
  93. </constant>
  94. <constant name="ARRAY_FORMAT_INDEX" value="256">
  95. </constant>
  96. <constant name="ARRAY_COMPRESS_BASE" value="9">
  97. </constant>
  98. <constant name="ARRAY_COMPRESS_VERTEX" value="512">
  99. </constant>
  100. <constant name="ARRAY_COMPRESS_NORMAL" value="1024">
  101. </constant>
  102. <constant name="ARRAY_COMPRESS_TANGENT" value="2048">
  103. </constant>
  104. <constant name="ARRAY_COMPRESS_COLOR" value="4096">
  105. </constant>
  106. <constant name="ARRAY_COMPRESS_TEX_UV" value="8192">
  107. </constant>
  108. <constant name="ARRAY_COMPRESS_TEX_UV2" value="16384">
  109. </constant>
  110. <constant name="ARRAY_COMPRESS_BONES" value="32768">
  111. </constant>
  112. <constant name="ARRAY_COMPRESS_WEIGHTS" value="65536">
  113. </constant>
  114. <constant name="ARRAY_COMPRESS_INDEX" value="131072">
  115. </constant>
  116. <constant name="ARRAY_FLAG_USE_2D_VERTICES" value="262144">
  117. </constant>
  118. <constant name="ARRAY_FLAG_USE_16_BIT_BONES" value="524288">
  119. </constant>
  120. <constant name="ARRAY_COMPRESS_DEFAULT" value="97792">
  121. </constant>
  122. <constant name="ARRAY_VERTEX" value="0">
  123. </constant>
  124. <constant name="ARRAY_NORMAL" value="1">
  125. </constant>
  126. <constant name="ARRAY_TANGENT" value="2">
  127. </constant>
  128. <constant name="ARRAY_COLOR" value="3">
  129. </constant>
  130. <constant name="ARRAY_TEX_UV" value="4">
  131. </constant>
  132. <constant name="ARRAY_TEX_UV2" value="5">
  133. </constant>
  134. <constant name="ARRAY_BONES" value="6">
  135. </constant>
  136. <constant name="ARRAY_WEIGHTS" value="7">
  137. </constant>
  138. <constant name="ARRAY_INDEX" value="8">
  139. </constant>
  140. <constant name="ARRAY_MAX" value="9">
  141. </constant>
  142. </constants>
  143. </class>