virtualx-engine/doc/classes/ImmediateGeometry.xml
Hugo Locurcio f7f6115f76
Proofread and improve the whole class reference
- Document a few more properties and methods
- Add more information to many classes
- Fix lots of typos and gramar mistakes
- Use [code] tags for parameters consistently
- Use [b] and [i] tags consistently
- Put "Warning:" and "Note:" on their own line to be more visible,
  and make them always bold
- Tweak formatting in code examples to be more readable
- Use double quotes consistently
- Add more links to third-party technologies
2019-06-27 22:30:19 +02:00

110 lines
3 KiB
XML

<?xml version="1.0" encoding="UTF-8" ?>
<class name="ImmediateGeometry" inherits="GeometryInstance" category="Core" version="3.2">
<brief_description>
Draws simple geometry from code.
</brief_description>
<description>
Draws simple geometry from code. Uses a drawing mode similar to OpenGL 1.x.
</description>
<tutorials>
</tutorials>
<methods>
<method name="add_sphere">
<return type="void">
</return>
<argument index="0" name="lats" type="int">
</argument>
<argument index="1" name="lons" type="int">
</argument>
<argument index="2" name="radius" type="float">
</argument>
<argument index="3" name="add_uv" type="bool" default="true">
</argument>
<description>
Simple helper to draw an UV sphere with given latitude, longitude and radius.
</description>
</method>
<method name="add_vertex">
<return type="void">
</return>
<argument index="0" name="position" type="Vector3">
</argument>
<description>
Adds a vertex with the currently set color/uv/etc.
</description>
</method>
<method name="begin">
<return type="void">
</return>
<argument index="0" name="primitive" type="int" enum="Mesh.PrimitiveType">
</argument>
<argument index="1" name="texture" type="Texture" default="null">
</argument>
<description>
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 [Mesh].[code]PRIMITIVE_*[/code] enumerations.
</description>
</method>
<method name="clear">
<return type="void">
</return>
<description>
Clears everything that was drawn using begin/end.
</description>
</method>
<method name="end">
<return type="void">
</return>
<description>
Ends a drawing context and displays the results.
</description>
</method>
<method name="set_color">
<return type="void">
</return>
<argument index="0" name="color" type="Color">
</argument>
<description>
The current drawing color.
</description>
</method>
<method name="set_normal">
<return type="void">
</return>
<argument index="0" name="normal" type="Vector3">
</argument>
<description>
The next vertex's normal.
</description>
</method>
<method name="set_tangent">
<return type="void">
</return>
<argument index="0" name="tangent" type="Plane">
</argument>
<description>
The next vertex's tangent (and binormal facing).
</description>
</method>
<method name="set_uv">
<return type="void">
</return>
<argument index="0" name="uv" type="Vector2">
</argument>
<description>
The next vertex's UV.
</description>
</method>
<method name="set_uv2">
<return type="void">
</return>
<argument index="0" name="uv" type="Vector2">
</argument>
<description>
The next vertex's second layer UV.
</description>
</method>
</methods>
<constants>
</constants>
</class>