class_visualshadernodeintop.rst 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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 VisualShaderNodeIntOp.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_VisualShaderNodeIntOp:
  6. VisualShaderNodeIntOp
  7. =====================
  8. **Inherits:** :ref:`VisualShaderNode<class_VisualShaderNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  9. An integer scalar operator to be used within the visual shader graph.
  10. Description
  11. -----------
  12. Applies :ref:`operator<class_VisualShaderNodeIntOp_property_operator>` to two integer inputs: ``a`` and ``b``.
  13. Properties
  14. ----------
  15. +------------------------------------------------------+----------------------------------------------------------------+-------+
  16. | :ref:`Operator<enum_VisualShaderNodeIntOp_Operator>` | :ref:`operator<class_VisualShaderNodeIntOp_property_operator>` | ``0`` |
  17. +------------------------------------------------------+----------------------------------------------------------------+-------+
  18. Enumerations
  19. ------------
  20. .. _enum_VisualShaderNodeIntOp_Operator:
  21. .. _class_VisualShaderNodeIntOp_constant_OP_ADD:
  22. .. _class_VisualShaderNodeIntOp_constant_OP_SUB:
  23. .. _class_VisualShaderNodeIntOp_constant_OP_MUL:
  24. .. _class_VisualShaderNodeIntOp_constant_OP_DIV:
  25. .. _class_VisualShaderNodeIntOp_constant_OP_MOD:
  26. .. _class_VisualShaderNodeIntOp_constant_OP_MAX:
  27. .. _class_VisualShaderNodeIntOp_constant_OP_MIN:
  28. .. _class_VisualShaderNodeIntOp_constant_OP_BITWISE_AND:
  29. .. _class_VisualShaderNodeIntOp_constant_OP_BITWISE_OR:
  30. .. _class_VisualShaderNodeIntOp_constant_OP_BITWISE_XOR:
  31. .. _class_VisualShaderNodeIntOp_constant_OP_BITWISE_LEFT_SHIFT:
  32. .. _class_VisualShaderNodeIntOp_constant_OP_BITWISE_RIGHT_SHIFT:
  33. .. _class_VisualShaderNodeIntOp_constant_OP_ENUM_SIZE:
  34. enum **Operator**:
  35. - **OP_ADD** = **0** --- Sums two numbers using ``a + b``.
  36. - **OP_SUB** = **1** --- Subtracts two numbers using ``a - b``.
  37. - **OP_MUL** = **2** --- Multiplies two numbers using ``a * b``.
  38. - **OP_DIV** = **3** --- Divides two numbers using ``a / b``.
  39. - **OP_MOD** = **4** --- Calculates the remainder of two numbers using ``a % b``.
  40. - **OP_MAX** = **5** --- Returns the greater of two numbers. Translates to ``max(a, b)`` in the Godot Shader Language.
  41. - **OP_MIN** = **6** --- Returns the lesser of two numbers. Translates to ``max(a, b)`` in the Godot Shader Language.
  42. - **OP_BITWISE_AND** = **7** --- Returns the result of bitwise ``AND`` operation on the integer. Translates to ``a & b`` in the Godot Shader Language.
  43. - **OP_BITWISE_OR** = **8** --- Returns the result of bitwise ``OR`` operation for two integers. Translates to ``a | b`` in the Godot Shader Language.
  44. - **OP_BITWISE_XOR** = **9** --- Returns the result of bitwise ``XOR`` operation for two integers. Translates to ``a ^ b`` in the Godot Shader Language.
  45. - **OP_BITWISE_LEFT_SHIFT** = **10** --- Returns the result of bitwise left shift operation on the integer. Translates to ``a << b`` in the Godot Shader Language.
  46. - **OP_BITWISE_RIGHT_SHIFT** = **11** --- Returns the result of bitwise right shift operation on the integer. Translates to ``a >> b`` in the Godot Shader Language.
  47. - **OP_ENUM_SIZE** = **12** --- Represents the size of the :ref:`Operator<enum_VisualShaderNodeIntOp_Operator>` enum.
  48. Property Descriptions
  49. ---------------------
  50. .. _class_VisualShaderNodeIntOp_property_operator:
  51. - :ref:`Operator<enum_VisualShaderNodeIntOp_Operator>` **operator**
  52. +-----------+---------------------+
  53. | *Default* | ``0`` |
  54. +-----------+---------------------+
  55. | *Setter* | set_operator(value) |
  56. +-----------+---------------------+
  57. | *Getter* | get_operator() |
  58. +-----------+---------------------+
  59. An operator to be applied to the inputs. See :ref:`Operator<enum_VisualShaderNodeIntOp_Operator>` for options.
  60. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  61. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  62. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  63. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  64. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  65. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`