summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
authorjfons <joan.fonssanchez@gmail.com>2022-02-04 16:28:18 +0100
committerjfons <joan.fonssanchez@gmail.com>2022-02-07 13:04:51 +0100
commitdd970482c5961278034fde5fb2961e31c543e9ae (patch)
tree1cc0738558989993553c671f08bb5235d4a32ccd /doc/classes
parent6f425242dcce95ae9993dca017f91e7bab2060d3 (diff)
Improvements and fixes to occluders
Improvements: * Occluder3D is now an abstract type inherited by: ArrayOccluder3D, QuadOccluder3D, BoxOccluder3D, SphereOccluder3D and PolygonOccluder3D. ArrayOccluder3D serves the same purpose as the old Occluder3D (triangle mesh occluder) while the rest are primitives that can be used to manually place simple occluders. * Occluder baking can now apply simplification. The "bake_simplification_distance" property can be used to set a world-space distance as the desired maximum error, set to 0.1 by default. * Occluders can now be generated on import. Using the "occ" and "occonly" keywords (similar to "col" and "colonly" for colliders) or by enabling on MeshInstance3Ds in the scene's import window. Fixes: * Fixed saving of occluder files after bake. * Fixed a small error where occluders didn't correctly update in the rendering server. Bonus content: * Generalized "CollisionPolygon3DEditor" so it can also be used to edit Resources. Renamed it to "Polygon3DEditor" since it was already being used by other things, not just colliders. * Fixed a small bug in "EditorPropertyArray" where a call to "remove" was left after the "remove_at" rename.
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/ArrayOccluder3D.xml24
-rw-r--r--doc/classes/BoxOccluder3D.xml13
-rw-r--r--doc/classes/Occluder3D.xml18
-rw-r--r--doc/classes/OccluderInstance3D.xml2
-rw-r--r--doc/classes/PolygonOccluder3D.xml13
-rw-r--r--doc/classes/QuadOccluder3D.xml13
-rw-r--r--doc/classes/SphereOccluder3D.xml13
7 files changed, 90 insertions, 6 deletions
diff --git a/doc/classes/ArrayOccluder3D.xml b/doc/classes/ArrayOccluder3D.xml
new file mode 100644
index 0000000000..993393cf50
--- /dev/null
+++ b/doc/classes/ArrayOccluder3D.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ArrayOccluder3D" inherits="Occluder3D" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="set_arrays">
+ <return type="void" />
+ <argument index="0" name="vertices" type="PackedVector3Array" />
+ <argument index="1" name="indices" type="PackedInt32Array" />
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="indices" type="PackedInt32Array" setter="set_indices" getter="get_indices" default="PackedInt32Array()">
+ </member>
+ <member name="vertices" type="PackedVector3Array" setter="set_vertices" getter="get_vertices" default="PackedVector3Array()">
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/BoxOccluder3D.xml b/doc/classes/BoxOccluder3D.xml
new file mode 100644
index 0000000000..8c3b597193
--- /dev/null
+++ b/doc/classes/BoxOccluder3D.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="BoxOccluder3D" inherits="Occluder3D" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <members>
+ <member name="size" type="Vector3" setter="set_size" getter="get_size" default="Vector3(1, 1, 1)">
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/Occluder3D.xml b/doc/classes/Occluder3D.xml
index 69fb3002e3..6c6c410bc3 100644
--- a/doc/classes/Occluder3D.xml
+++ b/doc/classes/Occluder3D.xml
@@ -6,10 +6,16 @@
</description>
<tutorials>
</tutorials>
- <members>
- <member name="indices" type="PackedInt32Array" setter="set_indices" getter="get_indices" default="PackedInt32Array()">
- </member>
- <member name="vertices" type="PackedVector3Array" setter="set_vertices" getter="get_vertices" default="PackedVector3Array()">
- </member>
- </members>
+ <methods>
+ <method name="get_indices" qualifiers="const">
+ <return type="PackedInt32Array" />
+ <description>
+ </description>
+ </method>
+ <method name="get_vertices" qualifiers="const">
+ <return type="PackedVector3Array" />
+ <description>
+ </description>
+ </method>
+ </methods>
</class>
diff --git a/doc/classes/OccluderInstance3D.xml b/doc/classes/OccluderInstance3D.xml
index d97aa4312f..32e48f9a70 100644
--- a/doc/classes/OccluderInstance3D.xml
+++ b/doc/classes/OccluderInstance3D.xml
@@ -26,6 +26,8 @@
<members>
<member name="bake_mask" type="int" setter="set_bake_mask" getter="get_bake_mask" default="4294967295">
</member>
+ <member name="bake_simplification_distance" type="float" setter="set_bake_simplification_distance" getter="get_bake_simplification_distance" default="0.1">
+ </member>
<member name="occluder" type="Occluder3D" setter="set_occluder" getter="get_occluder">
</member>
</members>
diff --git a/doc/classes/PolygonOccluder3D.xml b/doc/classes/PolygonOccluder3D.xml
new file mode 100644
index 0000000000..a4d910c983
--- /dev/null
+++ b/doc/classes/PolygonOccluder3D.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="PolygonOccluder3D" inherits="Occluder3D" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <members>
+ <member name="polygon" type="PackedVector2Array" setter="set_polygon" getter="get_polygon" default="PackedVector2Array()">
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/QuadOccluder3D.xml b/doc/classes/QuadOccluder3D.xml
new file mode 100644
index 0000000000..c1b89149f5
--- /dev/null
+++ b/doc/classes/QuadOccluder3D.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="QuadOccluder3D" inherits="Occluder3D" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <members>
+ <member name="size" type="Vector2" setter="set_size" getter="get_size" default="Vector2(1, 1)">
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/SphereOccluder3D.xml b/doc/classes/SphereOccluder3D.xml
new file mode 100644
index 0000000000..1ffa51e170
--- /dev/null
+++ b/doc/classes/SphereOccluder3D.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="SphereOccluder3D" inherits="Occluder3D" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <members>
+ <member name="radius" type="float" setter="set_radius" getter="get_radius" default="1.0">
+ </member>
+ </members>
+</class>