godot/doc/classes/OccluderShapeSphere.xml
lawnjelly 3c2df49832 Fix Occluder to properly share resources
In order to properly support the resource sharing paradigm, Occluders are split into Instances and Resources in the VisualServer. Instances are owned by a Scenario, and Resources are global. OccluderShape resources can now correctly be shared by multiple OccluderInstances.
2022-02-16 09:55:11 +00:00

38 lines
1.5 KiB
XML

<?xml version="1.0" encoding="UTF-8" ?>
<class name="OccluderShapeSphere" inherits="OccluderShape" version="3.5">
<brief_description>
Spherical occlusion primitive for use with the [Occluder] node.
</brief_description>
<description>
[OccluderShape]s are resources used by [Occluder] nodes, allowing geometric occlusion culling.
This shape can include multiple spheres. These can be created and deleted either in the Editor inspector or by calling [code]set_spheres[/code]. The sphere positions can be set by dragging the handle in the Editor viewport. The radius can be set with the smaller handle.
</description>
<tutorials>
</tutorials>
<methods>
<method name="set_sphere_position">
<return type="void" />
<argument index="0" name="index" type="int" />
<argument index="1" name="position" type="Vector3" />
<description>
Sets an individual sphere's position.
</description>
</method>
<method name="set_sphere_radius">
<return type="void" />
<argument index="0" name="index" type="int" />
<argument index="1" name="radius" type="float" />
<description>
Sets an individual sphere's radius.
</description>
</method>
</methods>
<members>
<member name="spheres" type="Array" setter="set_spheres" getter="get_spheres" default="[ Plane( 0, 0, 0, 1 ) ]">
The sphere data can be accessed as an array of [Plane]s. The position of each sphere is stored in the [code]normal[/code], and the radius is stored in the [code]d[/code] value of the plane.
</member>
</members>
<constants>
</constants>
</class>