MeshInstance.xml 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="MeshInstance" inherits="GeometryInstance" category="Core" version="3.0.alpha.custom_build">
  3. <brief_description>
  4. Node that instances meshes into a scenario.
  5. </brief_description>
  6. <description>
  7. MeshInstance is a [Node] that takes a [Mesh] resource and adds it to the current scenario by creating an instance of it. This is the class most often used to get 3D geometry rendered and can be used to instance a single [Mesh] in many places. This allows to reuse geometry and save on resources. When a [Mesh] has to be instanced more than thousands of times at close proximity, consider using a [MultiMesh] in a [MultiMeshInstance] instead.
  8. </description>
  9. <tutorials>
  10. </tutorials>
  11. <demos>
  12. </demos>
  13. <methods>
  14. <method name="create_convex_collision">
  15. <return type="void">
  16. </return>
  17. <description>
  18. This helper creates a [StaticBody] child [Node] with a [ConvexPolygonShape] [CollisionShape] calculated from the mesh geometry. It's mainly used for testing.
  19. </description>
  20. </method>
  21. <method name="create_debug_tangents">
  22. <return type="void">
  23. </return>
  24. <description>
  25. </description>
  26. </method>
  27. <method name="create_trimesh_collision">
  28. <return type="void">
  29. </return>
  30. <description>
  31. This helper creates a [StaticBody] child [Node] with a [ConcavePolygonShape] [CollisionShape] calculated from the mesh geometry. It's mainly used for testing.
  32. </description>
  33. </method>
  34. <method name="get_mesh" qualifiers="const">
  35. <return type="Mesh">
  36. </return>
  37. <description>
  38. Returns the current [Mesh] resource for the instance.
  39. </description>
  40. </method>
  41. <method name="get_skeleton_path">
  42. <return type="NodePath">
  43. </return>
  44. <description>
  45. </description>
  46. </method>
  47. <method name="get_surface_material" qualifiers="const">
  48. <return type="Material">
  49. </return>
  50. <argument index="0" name="surface" type="int">
  51. </argument>
  52. <description>
  53. Returns the [Material] for a surface of the [Mesh] resource.
  54. </description>
  55. </method>
  56. <method name="set_mesh">
  57. <return type="void">
  58. </return>
  59. <argument index="0" name="mesh" type="Mesh">
  60. </argument>
  61. <description>
  62. </description>
  63. </method>
  64. <method name="set_skeleton_path">
  65. <return type="void">
  66. </return>
  67. <argument index="0" name="skeleton_path" type="NodePath">
  68. </argument>
  69. <description>
  70. </description>
  71. </method>
  72. <method name="set_surface_material">
  73. <return type="void">
  74. </return>
  75. <argument index="0" name="surface" type="int">
  76. </argument>
  77. <argument index="1" name="material" type="Material">
  78. </argument>
  79. <description>
  80. Sets the [Material] for a surface of the [Mesh] resource.
  81. </description>
  82. </method>
  83. </methods>
  84. <members>
  85. <member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh">
  86. The [Mesh] resource for the instance.
  87. </member>
  88. <member name="skeleton" type="NodePath" setter="set_skeleton_path" getter="get_skeleton_path">
  89. [NodePath] to the [Skeleton] associated with the instance.
  90. </member>
  91. </members>
  92. <constants>
  93. </constants>
  94. </class>