ImmediateGeometry.xml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="ImmediateGeometry" inherits="GeometryInstance" category="Core" version="3.1.2">
  3. <brief_description>
  4. Draws simple geometry from code.
  5. </brief_description>
  6. <description>
  7. Draws simple geometry from code. Uses a drawing mode similar to OpenGL 1.x.
  8. </description>
  9. <tutorials>
  10. </tutorials>
  11. <methods>
  12. <method name="add_sphere">
  13. <return type="void">
  14. </return>
  15. <argument index="0" name="lats" type="int">
  16. </argument>
  17. <argument index="1" name="lons" type="int">
  18. </argument>
  19. <argument index="2" name="radius" type="float">
  20. </argument>
  21. <argument index="3" name="add_uv" type="bool" default="true">
  22. </argument>
  23. <description>
  24. Simple helper to draw a uvsphere, with given latitudes, longitude and radius.
  25. </description>
  26. </method>
  27. <method name="add_vertex">
  28. <return type="void">
  29. </return>
  30. <argument index="0" name="position" type="Vector3">
  31. </argument>
  32. <description>
  33. Adds a vertex with the currently set color/uv/etc.
  34. </description>
  35. </method>
  36. <method name="begin">
  37. <return type="void">
  38. </return>
  39. <argument index="0" name="primitive" type="int" enum="Mesh.PrimitiveType">
  40. </argument>
  41. <argument index="1" name="texture" type="Texture" default="null">
  42. </argument>
  43. <description>
  44. Begin drawing (And optionally pass a texture override). When done call end(). For more information on how this works, search for glBegin() glEnd() references.
  45. For the type of primitive, use the [Mesh].PRIMITIVE_* enumerations.
  46. </description>
  47. </method>
  48. <method name="clear">
  49. <return type="void">
  50. </return>
  51. <description>
  52. Clears everything that was drawn using begin/end.
  53. </description>
  54. </method>
  55. <method name="end">
  56. <return type="void">
  57. </return>
  58. <description>
  59. Ends a drawing context and displays the results.
  60. </description>
  61. </method>
  62. <method name="set_color">
  63. <return type="void">
  64. </return>
  65. <argument index="0" name="color" type="Color">
  66. </argument>
  67. <description>
  68. The current drawing color.
  69. </description>
  70. </method>
  71. <method name="set_normal">
  72. <return type="void">
  73. </return>
  74. <argument index="0" name="normal" type="Vector3">
  75. </argument>
  76. <description>
  77. The next vertex's normal.
  78. </description>
  79. </method>
  80. <method name="set_tangent">
  81. <return type="void">
  82. </return>
  83. <argument index="0" name="tangent" type="Plane">
  84. </argument>
  85. <description>
  86. The next vertex's tangent (and binormal facing).
  87. </description>
  88. </method>
  89. <method name="set_uv">
  90. <return type="void">
  91. </return>
  92. <argument index="0" name="uv" type="Vector2">
  93. </argument>
  94. <description>
  95. The next vertex's UV.
  96. </description>
  97. </method>
  98. <method name="set_uv2">
  99. <return type="void">
  100. </return>
  101. <argument index="0" name="uv" type="Vector2">
  102. </argument>
  103. <description>
  104. The next vertex's second layer UV.
  105. </description>
  106. </method>
  107. </methods>
  108. <constants>
  109. </constants>
  110. </class>