class_visualshadernodeswitch.rst 3.3 KB

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