148 lines
4.0 KiB
XML
148 lines
4.0 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<class name="VoxelTool" inherits="Reference" version="3.2">
|
|
<brief_description>
|
|
Helper class to easily access and modify voxels
|
|
</brief_description>
|
|
<description>
|
|
</description>
|
|
<tutorials>
|
|
</tutorials>
|
|
<methods>
|
|
<method name="do_box">
|
|
<return type="void">
|
|
</return>
|
|
<argument index="0" name="begin" type="Vector3">
|
|
</argument>
|
|
<argument index="1" name="end" type="Vector3">
|
|
</argument>
|
|
<description>
|
|
Operate on a rectangular cuboid section of the terrain. [code]begin[/code] and [code]end[/code] are inclusive. Choose operation and which voxel to use by setting [code]value[/code] and [code]mode[/code] before calling this function.
|
|
</description>
|
|
</method>
|
|
<method name="do_point">
|
|
<return type="void">
|
|
</return>
|
|
<argument index="0" name="pos" type="Vector3">
|
|
</argument>
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="do_sphere">
|
|
<return type="void">
|
|
</return>
|
|
<argument index="0" name="center" type="Vector3">
|
|
</argument>
|
|
<argument index="1" name="radius" type="float">
|
|
</argument>
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="get_voxel">
|
|
<return type="int">
|
|
</return>
|
|
<argument index="0" name="pos" type="Vector3">
|
|
</argument>
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="get_voxel_f">
|
|
<return type="float">
|
|
</return>
|
|
<argument index="0" name="pos" type="Vector3">
|
|
</argument>
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="get_voxel_metadata">
|
|
<return type="Variant">
|
|
</return>
|
|
<argument index="0" name="pos" type="Vector3">
|
|
</argument>
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="is_area_editable">
|
|
<return type="bool">
|
|
</return>
|
|
<argument index="0" name="box" type="AABB">
|
|
</argument>
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="paste">
|
|
<return type="void">
|
|
</return>
|
|
<argument index="0" name="dst_pos" type="Vector3">
|
|
</argument>
|
|
<argument index="1" name="src_buffer" type="Reference">
|
|
</argument>
|
|
<argument index="2" name="src_mask_value" type="int">
|
|
</argument>
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="raycast">
|
|
<return type="VoxelRaycastResult">
|
|
</return>
|
|
<argument index="0" name="origin" type="Vector3">
|
|
</argument>
|
|
<argument index="1" name="direction" type="Vector3">
|
|
</argument>
|
|
<argument index="2" name="max_distance" type="float" default="10.0">
|
|
</argument>
|
|
<argument index="3" name="collision_mask" type="int" default="4294967295">
|
|
</argument>
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="set_voxel">
|
|
<return type="void">
|
|
</return>
|
|
<argument index="0" name="pos" type="Vector3">
|
|
</argument>
|
|
<argument index="1" name="v" type="int">
|
|
</argument>
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="set_voxel_f">
|
|
<return type="void">
|
|
</return>
|
|
<argument index="0" name="pos" type="Vector3">
|
|
</argument>
|
|
<argument index="1" name="v" type="float">
|
|
</argument>
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="set_voxel_metadata">
|
|
<return type="void">
|
|
</return>
|
|
<argument index="0" name="pos" type="Vector3">
|
|
</argument>
|
|
<argument index="1" name="meta" type="Variant">
|
|
</argument>
|
|
<description>
|
|
</description>
|
|
</method>
|
|
</methods>
|
|
<members>
|
|
<member name="channel" type="int" setter="set_channel" getter="get_channel" default="0">
|
|
</member>
|
|
<member name="eraser_value" type="int" setter="set_eraser_value" getter="get_eraser_value" default="0">
|
|
</member>
|
|
<member name="mode" type="int" setter="set_mode" getter="get_mode" enum="VoxelTool.Mode" default="0">
|
|
</member>
|
|
<member name="value" type="int" setter="set_value" getter="get_value" default="0">
|
|
</member>
|
|
</members>
|
|
<constants>
|
|
<constant name="MODE_ADD" value="0" enum="Mode">
|
|
</constant>
|
|
<constant name="MODE_REMOVE" value="1" enum="Mode">
|
|
</constant>
|
|
<constant name="MODE_SET" value="2" enum="Mode">
|
|
</constant>
|
|
</constants>
|
|
</class>
|