ImmediateGeometry.xml 3.0 KB

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