.. Generated automatically by doc/tools/makerst.py in Godot's source tree. .. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead. .. _class_ImmediateGeometry: ImmediateGeometry ================= **Inherits:** :ref:`GeometryInstance` **<** :ref:`VisualInstance` **<** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` **Category:** Core Brief Description ----------------- Node to draw simple geometry from code, ala OpenGL 1.x Member Functions ---------------- +-------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_sphere` **(** :ref:`int` lats, :ref:`int` lons, :ref:`float` radius, :ref:`bool` add_uv=true **)** | +-------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_vertex` **(** :ref:`Vector3` pos **)** | +-------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`begin` **(** :ref:`int` primitive, :ref:`Texture` texture=NULL **)** | +-------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`clear` **(** **)** | +-------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`end` **(** **)** | +-------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_color` **(** :ref:`Color` color **)** | +-------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_normal` **(** :ref:`Vector3` normal **)** | +-------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_tangent` **(** :ref:`Plane` tangent **)** | +-------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_uv` **(** :ref:`Vector2` uv **)** | +-------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_uv2` **(** :ref:`Vector2` uv **)** | +-------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Member Function Description --------------------------- .. _class_ImmediateGeometry_add_sphere: - void **add_sphere** **(** :ref:`int` lats, :ref:`int` lons, :ref:`float` radius, :ref:`bool` add_uv=true **)** Simple helper to draw a uvsphere, with given latitudes, longitude and radius. .. _class_ImmediateGeometry_add_vertex: - void **add_vertex** **(** :ref:`Vector3` pos **)** Add a vertex with the currently set color/uv/etc. .. _class_ImmediateGeometry_begin: - void **begin** **(** :ref:`int` primitive, :ref:`Texture` texture=null **)** Begin drawing (And optionally pass a texture override). When done call end(). For more information on how this works, search for glBegin() glEnd() references. For the type of primitive, use the :ref:`Mesh`.PRIMITIVE\_\* enumerations. .. _class_ImmediateGeometry_clear: - void **clear** **(** **)** Clear everything that was drawn using begin/end. .. _class_ImmediateGeometry_end: - void **end** **(** **)** Call this when done adding a batch of geometry, otherwise it can't be displayed. .. _class_ImmediateGeometry_set_color: - void **set_color** **(** :ref:`Color` color **)** Set the color that the next vertex will use to be drawn. .. _class_ImmediateGeometry_set_normal: - void **set_normal** **(** :ref:`Vector3` normal **)** Set the normal that the next vertex will use to be drawn. .. _class_ImmediateGeometry_set_tangent: - void **set_tangent** **(** :ref:`Plane` tangent **)** Set the tangent (and binormal facing) that the next vertex will use to be drawn. .. _class_ImmediateGeometry_set_uv: - void **set_uv** **(** :ref:`Vector2` uv **)** Set the UV that the next vertex will use to be drawn. .. _class_ImmediateGeometry_set_uv2: - void **set_uv2** **(** :ref:`Vector2` uv **)** Set the second layer of UV that the next vertex will use to be drawn.