class_visualshadernodeintfunc.rst 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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/VisualShaderNodeIntFunc.xml.
  6. .. _class_VisualShaderNodeIntFunc:
  7. VisualShaderNodeIntFunc
  8. =======================
  9. **Inherits:** :ref:`VisualShaderNode<class_VisualShaderNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. A scalar integer function to be used within the visual shader graph.
  11. Description
  12. -----------
  13. Accept an integer scalar (``x``) to the input port and transform it according to :ref:`function<class_VisualShaderNodeIntFunc_property_function>`.
  14. Properties
  15. ----------
  16. +--------------------------------------------------------+------------------------------------------------------------------+-------+
  17. | :ref:`Function<enum_VisualShaderNodeIntFunc_Function>` | :ref:`function<class_VisualShaderNodeIntFunc_property_function>` | ``2`` |
  18. +--------------------------------------------------------+------------------------------------------------------------------+-------+
  19. Enumerations
  20. ------------
  21. .. _enum_VisualShaderNodeIntFunc_Function:
  22. .. _class_VisualShaderNodeIntFunc_constant_FUNC_ABS:
  23. .. _class_VisualShaderNodeIntFunc_constant_FUNC_NEGATE:
  24. .. _class_VisualShaderNodeIntFunc_constant_FUNC_SIGN:
  25. .. _class_VisualShaderNodeIntFunc_constant_FUNC_BITWISE_NOT:
  26. .. _class_VisualShaderNodeIntFunc_constant_FUNC_MAX:
  27. enum **Function**:
  28. - **FUNC_ABS** = **0** --- Returns the absolute value of the parameter. Translates to ``abs(x)`` in the Godot Shader Language.
  29. - **FUNC_NEGATE** = **1** --- Negates the ``x`` using ``-(x)``.
  30. - **FUNC_SIGN** = **2** --- Extracts the sign of the parameter. Translates to ``sign(x)`` in the Godot Shader Language.
  31. - **FUNC_BITWISE_NOT** = **3** --- Returns the result of bitwise ``NOT`` operation on the integer. Translates to ``~a`` in the Godot Shader Language.
  32. - **FUNC_MAX** = **4** --- Represents the size of the :ref:`Function<enum_VisualShaderNodeIntFunc_Function>` enum.
  33. Property Descriptions
  34. ---------------------
  35. .. _class_VisualShaderNodeIntFunc_property_function:
  36. - :ref:`Function<enum_VisualShaderNodeIntFunc_Function>` **function**
  37. +-----------+---------------------+
  38. | *Default* | ``2`` |
  39. +-----------+---------------------+
  40. | *Setter* | set_function(value) |
  41. +-----------+---------------------+
  42. | *Getter* | get_function() |
  43. +-----------+---------------------+
  44. A function to be applied to the scalar. See :ref:`Function<enum_VisualShaderNodeIntFunc_Function>` for options.
  45. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  46. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  47. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  48. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  49. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  50. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`