2
0

VisualInstance3D.xml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="VisualInstance3D" inherits="Node3D" version="4.0">
  3. <brief_description>
  4. Parent of all visual 3D nodes.
  5. </brief_description>
  6. <description>
  7. The [VisualInstance3D] is used to connect a resource to a visual representation. All visual 3D nodes inherit from the [VisualInstance3D]. In general, you should not access the [VisualInstance3D] properties directly as they are accessed and managed by the nodes that inherit from [VisualInstance3D]. [VisualInstance3D] is the node representation of the [RenderingServer] instance.
  8. </description>
  9. <tutorials>
  10. </tutorials>
  11. <methods>
  12. <method name="get_aabb" qualifiers="const">
  13. <return type="AABB" />
  14. <description>
  15. Returns the [AABB] (also known as the bounding box) for this [VisualInstance3D]. See also [method get_transformed_aabb].
  16. </description>
  17. </method>
  18. <method name="get_base" qualifiers="const">
  19. <return type="RID" />
  20. <description>
  21. Returns the RID of the resource associated with this [VisualInstance3D]. For example, if the Node is a [MeshInstance3D], this will return the RID of the associated [Mesh].
  22. </description>
  23. </method>
  24. <method name="get_instance" qualifiers="const">
  25. <return type="RID" />
  26. <description>
  27. Returns the RID of this instance. This RID is the same as the RID returned by [method RenderingServer.instance_create]. This RID is needed if you want to call [RenderingServer] functions directly on this [VisualInstance3D].
  28. </description>
  29. </method>
  30. <method name="get_layer_mask_value" qualifiers="const">
  31. <return type="bool" />
  32. <argument index="0" name="layer_number" type="int" />
  33. <description>
  34. Returns whether or not the specified layer of the [member layers] is enabled, given a [code]layer_number[/code] between 1 and 20.
  35. </description>
  36. </method>
  37. <method name="get_transformed_aabb" qualifiers="const">
  38. <return type="AABB" />
  39. <description>
  40. Returns the transformed [AABB] (also known as the bounding box) for this [VisualInstance3D].
  41. Transformed in this case means the [AABB] plus the position, rotation, and scale of the [Node3D]'s [Transform3D]. See also [method get_aabb].
  42. </description>
  43. </method>
  44. <method name="set_base">
  45. <return type="void" />
  46. <argument index="0" name="base" type="RID" />
  47. <description>
  48. Sets the resource that is instantiated by this [VisualInstance3D], which changes how the engine handles the [VisualInstance3D] under the hood. Equivalent to [method RenderingServer.instance_set_base].
  49. </description>
  50. </method>
  51. <method name="set_layer_mask_value">
  52. <return type="void" />
  53. <argument index="0" name="layer_number" type="int" />
  54. <argument index="1" name="value" type="bool" />
  55. <description>
  56. Based on [code]value[/code], enables or disables the specified layer in the [member layers], given a [code]layer_number[/code] between 1 and 20.
  57. </description>
  58. </method>
  59. </methods>
  60. <members>
  61. <member name="layers" type="int" setter="set_layer_mask" getter="get_layer_mask" default="1">
  62. The render layer(s) this [VisualInstance3D] is drawn on.
  63. This object will only be visible for [Camera3D]s whose cull mask includes the render object this [VisualInstance3D] is set to.
  64. </member>
  65. </members>
  66. </class>