GLTFCamera.xml 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="GLTFCamera" inherits="Resource" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
  3. <brief_description>
  4. Represents a GLTF camera.
  5. </brief_description>
  6. <description>
  7. Represents a camera as defined by the base GLTF spec.
  8. </description>
  9. <tutorials>
  10. <link title="GLTF camera detailed specification">https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#reference-camera</link>
  11. <link title="GLTF camera spec and example file">https://github.com/KhronosGroup/glTF-Tutorials/blob/master/gltfTutorial/gltfTutorial_015_SimpleCameras.md</link>
  12. </tutorials>
  13. <methods>
  14. <method name="from_dictionary" qualifiers="static">
  15. <return type="GLTFCamera" />
  16. <param index="0" name="dictionary" type="Dictionary" />
  17. <description>
  18. Creates a new GLTFCamera instance by parsing the given [Dictionary].
  19. </description>
  20. </method>
  21. <method name="from_node" qualifiers="static">
  22. <return type="GLTFCamera" />
  23. <param index="0" name="camera_node" type="Camera3D" />
  24. <description>
  25. Create a new GLTFCamera instance from the given Godot [Camera3D] node.
  26. </description>
  27. </method>
  28. <method name="to_dictionary" qualifiers="const">
  29. <return type="Dictionary" />
  30. <description>
  31. Serializes this GLTFCamera instance into a [Dictionary].
  32. </description>
  33. </method>
  34. <method name="to_node" qualifiers="const">
  35. <return type="Camera3D" />
  36. <description>
  37. Converts this GLTFCamera instance into a Godot [Camera3D] node.
  38. </description>
  39. </method>
  40. </methods>
  41. <members>
  42. <member name="depth_far" type="float" setter="set_depth_far" getter="get_depth_far" default="4000.0">
  43. The distance to the far culling boundary for this camera relative to its local Z axis, in meters. This maps to GLTF's [code]zfar[/code] property.
  44. </member>
  45. <member name="depth_near" type="float" setter="set_depth_near" getter="get_depth_near" default="0.05">
  46. The distance to the near culling boundary for this camera relative to its local Z axis, in meters. This maps to GLTF's [code]znear[/code] property.
  47. </member>
  48. <member name="fov" type="float" setter="set_fov" getter="get_fov" default="1.309">
  49. The FOV of the camera. This class and GLTF define the camera FOV in radians, while Godot uses degrees. This maps to GLTF's [code]yfov[/code] property. This value is only used for perspective cameras, when [member perspective] is true.
  50. </member>
  51. <member name="perspective" type="bool" setter="set_perspective" getter="get_perspective" default="true">
  52. Whether or not the camera is in perspective mode. If false, the camera is in orthographic/orthogonal mode. This maps to GLTF's camera [code]type[/code] property. See [member Camera3D.projection] and the GLTF spec for more information.
  53. </member>
  54. <member name="size_mag" type="float" setter="set_size_mag" getter="get_size_mag" default="0.5">
  55. The size of the camera. This class and GLTF define the camera size magnitude as a radius in meters, while Godot defines it as a diameter in meters. This maps to GLTF's [code]ymag[/code] property. This value is only used for orthographic/orthogonal cameras, when [member perspective] is false.
  56. </member>
  57. </members>
  58. </class>