LOD.xml 1.5 KB

12345678910111213141516171819202122232425262728
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="LOD" inherits="Spatial" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
  3. <brief_description>
  4. Provides discrete level of detail.
  5. </brief_description>
  6. <description>
  7. Automatically hides and shows [Spatial] children depending on the distance from the closest [Camera] to the [LOD] node. Child nodes that don't inherit from [Spatial] are ignored by the LOD system.
  8. Children are shown in order with the first children shown when closest to the [Camera], and the latter children shown when further away.
  9. The threshold distances for changes are determined by [member Spatial.lod_range].
  10. For example, a first child with a range of [code]2[/code] will be shown from distance 0 to 2. A second child with a range of [code]5[/code] will be shown from distance 2 to 7, etc.
  11. </description>
  12. <tutorials>
  13. </tutorials>
  14. <methods>
  15. </methods>
  16. <members>
  17. <member name="hysteresis" type="float" setter="set_hysteresis" getter="get_hysteresis" default="1.0">
  18. To prevent flickering at borders, a hysteresis distance will be added to threshold distances when the object is moving away from the [Camera].
  19. </member>
  20. <member name="lod_priority" type="int" setter="set_lod_priority" getter="get_lod_priority" default="0">
  21. Determines the rate at which level of detail will be updated.
  22. Higher priorities will update faster, but use more CPU.
  23. </member>
  24. </members>
  25. <constants>
  26. </constants>
  27. </class>