class_visualshadernodeswitch.rst 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the VisualShaderNodeSwitch.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_VisualShaderNodeSwitch:
  6. VisualShaderNodeSwitch
  7. ======================
  8. **Inherits:** :ref:`VisualShaderNode<class_VisualShaderNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  9. A selector function for use within the visual shader graph.
  10. Description
  11. -----------
  12. Returns an associated value of the ``op_type`` type if the provided boolean value is ``true`` or ``false``.
  13. Properties
  14. ----------
  15. +---------------------------------------------------+---------------------------------------------------------------+-------+
  16. | :ref:`OpType<enum_VisualShaderNodeSwitch_OpType>` | :ref:`op_type<class_VisualShaderNodeSwitch_property_op_type>` | ``0`` |
  17. +---------------------------------------------------+---------------------------------------------------------------+-------+
  18. Enumerations
  19. ------------
  20. .. _enum_VisualShaderNodeSwitch_OpType:
  21. .. _class_VisualShaderNodeSwitch_constant_OP_TYPE_FLOAT:
  22. .. _class_VisualShaderNodeSwitch_constant_OP_TYPE_INT:
  23. .. _class_VisualShaderNodeSwitch_constant_OP_TYPE_VECTOR_2D:
  24. .. _class_VisualShaderNodeSwitch_constant_OP_TYPE_VECTOR_3D:
  25. .. _class_VisualShaderNodeSwitch_constant_OP_TYPE_BOOLEAN:
  26. .. _class_VisualShaderNodeSwitch_constant_OP_TYPE_TRANSFORM:
  27. .. _class_VisualShaderNodeSwitch_constant_OP_TYPE_MAX:
  28. enum **OpType**:
  29. - **OP_TYPE_FLOAT** = **0** --- A floating-point scalar.
  30. - **OP_TYPE_INT** = **1** --- An integer scalar.
  31. - **OP_TYPE_VECTOR_2D** = **2** --- A 2D vector type.
  32. - **OP_TYPE_VECTOR_3D** = **3** --- A 3D vector type.
  33. - **OP_TYPE_BOOLEAN** = **4** --- A boolean type.
  34. - **OP_TYPE_TRANSFORM** = **5** --- A transform type.
  35. - **OP_TYPE_MAX** = **6** --- Represents the size of the :ref:`OpType<enum_VisualShaderNodeSwitch_OpType>` enum.
  36. Property Descriptions
  37. ---------------------
  38. .. _class_VisualShaderNodeSwitch_property_op_type:
  39. - :ref:`OpType<enum_VisualShaderNodeSwitch_OpType>` **op_type**
  40. +-----------+--------------------+
  41. | *Default* | ``0`` |
  42. +-----------+--------------------+
  43. | *Setter* | set_op_type(value) |
  44. +-----------+--------------------+
  45. | *Getter* | get_op_type() |
  46. +-----------+--------------------+
  47. A type of operands and returned value.
  48. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  49. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  50. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  51. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  52. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  53. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`