class_visualshadernodecompare.rst 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  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/VisualShaderNodeCompare.xml.
  6. .. _class_VisualShaderNodeCompare:
  7. VisualShaderNodeCompare
  8. =======================
  9. **Inherits:** :ref:`VisualShaderNode<class_VisualShaderNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. A comparison function for common types within the visual shader graph.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. Compares ``a`` and ``b`` of :ref:`type<class_VisualShaderNodeCompare_property_type>` by :ref:`function<class_VisualShaderNodeCompare_property_function>`. Returns a boolean scalar. Translates to ``if`` instruction in shader code.
  15. .. rst-class:: classref-reftable-group
  16. Properties
  17. ----------
  18. .. table::
  19. :widths: auto
  20. +--------------------------------------------------------------------+--------------------------------------------------------------------+-------+
  21. | :ref:`Condition<enum_VisualShaderNodeCompare_Condition>` | :ref:`condition<class_VisualShaderNodeCompare_property_condition>` | ``0`` |
  22. +--------------------------------------------------------------------+--------------------------------------------------------------------+-------+
  23. | :ref:`Function<enum_VisualShaderNodeCompare_Function>` | :ref:`function<class_VisualShaderNodeCompare_property_function>` | ``0`` |
  24. +--------------------------------------------------------------------+--------------------------------------------------------------------+-------+
  25. | :ref:`ComparisonType<enum_VisualShaderNodeCompare_ComparisonType>` | :ref:`type<class_VisualShaderNodeCompare_property_type>` | ``0`` |
  26. +--------------------------------------------------------------------+--------------------------------------------------------------------+-------+
  27. .. rst-class:: classref-section-separator
  28. ----
  29. .. rst-class:: classref-descriptions-group
  30. Enumerations
  31. ------------
  32. .. _enum_VisualShaderNodeCompare_ComparisonType:
  33. .. rst-class:: classref-enumeration
  34. enum **ComparisonType**: :ref:`🔗<enum_VisualShaderNodeCompare_ComparisonType>`
  35. .. _class_VisualShaderNodeCompare_constant_CTYPE_SCALAR:
  36. .. rst-class:: classref-enumeration-constant
  37. :ref:`ComparisonType<enum_VisualShaderNodeCompare_ComparisonType>` **CTYPE_SCALAR** = ``0``
  38. A floating-point scalar.
  39. .. _class_VisualShaderNodeCompare_constant_CTYPE_SCALAR_INT:
  40. .. rst-class:: classref-enumeration-constant
  41. :ref:`ComparisonType<enum_VisualShaderNodeCompare_ComparisonType>` **CTYPE_SCALAR_INT** = ``1``
  42. An integer scalar.
  43. .. _class_VisualShaderNodeCompare_constant_CTYPE_SCALAR_UINT:
  44. .. rst-class:: classref-enumeration-constant
  45. :ref:`ComparisonType<enum_VisualShaderNodeCompare_ComparisonType>` **CTYPE_SCALAR_UINT** = ``2``
  46. An unsigned integer scalar.
  47. .. _class_VisualShaderNodeCompare_constant_CTYPE_VECTOR_2D:
  48. .. rst-class:: classref-enumeration-constant
  49. :ref:`ComparisonType<enum_VisualShaderNodeCompare_ComparisonType>` **CTYPE_VECTOR_2D** = ``3``
  50. A 2D vector type.
  51. .. _class_VisualShaderNodeCompare_constant_CTYPE_VECTOR_3D:
  52. .. rst-class:: classref-enumeration-constant
  53. :ref:`ComparisonType<enum_VisualShaderNodeCompare_ComparisonType>` **CTYPE_VECTOR_3D** = ``4``
  54. A 3D vector type.
  55. .. _class_VisualShaderNodeCompare_constant_CTYPE_VECTOR_4D:
  56. .. rst-class:: classref-enumeration-constant
  57. :ref:`ComparisonType<enum_VisualShaderNodeCompare_ComparisonType>` **CTYPE_VECTOR_4D** = ``5``
  58. A 4D vector type.
  59. .. _class_VisualShaderNodeCompare_constant_CTYPE_BOOLEAN:
  60. .. rst-class:: classref-enumeration-constant
  61. :ref:`ComparisonType<enum_VisualShaderNodeCompare_ComparisonType>` **CTYPE_BOOLEAN** = ``6``
  62. A boolean type.
  63. .. _class_VisualShaderNodeCompare_constant_CTYPE_TRANSFORM:
  64. .. rst-class:: classref-enumeration-constant
  65. :ref:`ComparisonType<enum_VisualShaderNodeCompare_ComparisonType>` **CTYPE_TRANSFORM** = ``7``
  66. A transform (``mat4``) type.
  67. .. _class_VisualShaderNodeCompare_constant_CTYPE_MAX:
  68. .. rst-class:: classref-enumeration-constant
  69. :ref:`ComparisonType<enum_VisualShaderNodeCompare_ComparisonType>` **CTYPE_MAX** = ``8``
  70. Represents the size of the :ref:`ComparisonType<enum_VisualShaderNodeCompare_ComparisonType>` enum.
  71. .. rst-class:: classref-item-separator
  72. ----
  73. .. _enum_VisualShaderNodeCompare_Function:
  74. .. rst-class:: classref-enumeration
  75. enum **Function**: :ref:`🔗<enum_VisualShaderNodeCompare_Function>`
  76. .. _class_VisualShaderNodeCompare_constant_FUNC_EQUAL:
  77. .. rst-class:: classref-enumeration-constant
  78. :ref:`Function<enum_VisualShaderNodeCompare_Function>` **FUNC_EQUAL** = ``0``
  79. Comparison for equality (``a == b``).
  80. .. _class_VisualShaderNodeCompare_constant_FUNC_NOT_EQUAL:
  81. .. rst-class:: classref-enumeration-constant
  82. :ref:`Function<enum_VisualShaderNodeCompare_Function>` **FUNC_NOT_EQUAL** = ``1``
  83. Comparison for inequality (``a != b``).
  84. .. _class_VisualShaderNodeCompare_constant_FUNC_GREATER_THAN:
  85. .. rst-class:: classref-enumeration-constant
  86. :ref:`Function<enum_VisualShaderNodeCompare_Function>` **FUNC_GREATER_THAN** = ``2``
  87. Comparison for greater than (``a > b``). Cannot be used if :ref:`type<class_VisualShaderNodeCompare_property_type>` set to :ref:`CTYPE_BOOLEAN<class_VisualShaderNodeCompare_constant_CTYPE_BOOLEAN>` or :ref:`CTYPE_TRANSFORM<class_VisualShaderNodeCompare_constant_CTYPE_TRANSFORM>`.
  88. .. _class_VisualShaderNodeCompare_constant_FUNC_GREATER_THAN_EQUAL:
  89. .. rst-class:: classref-enumeration-constant
  90. :ref:`Function<enum_VisualShaderNodeCompare_Function>` **FUNC_GREATER_THAN_EQUAL** = ``3``
  91. Comparison for greater than or equal (``a >= b``). Cannot be used if :ref:`type<class_VisualShaderNodeCompare_property_type>` set to :ref:`CTYPE_BOOLEAN<class_VisualShaderNodeCompare_constant_CTYPE_BOOLEAN>` or :ref:`CTYPE_TRANSFORM<class_VisualShaderNodeCompare_constant_CTYPE_TRANSFORM>`.
  92. .. _class_VisualShaderNodeCompare_constant_FUNC_LESS_THAN:
  93. .. rst-class:: classref-enumeration-constant
  94. :ref:`Function<enum_VisualShaderNodeCompare_Function>` **FUNC_LESS_THAN** = ``4``
  95. Comparison for less than (``a < b``). Cannot be used if :ref:`type<class_VisualShaderNodeCompare_property_type>` set to :ref:`CTYPE_BOOLEAN<class_VisualShaderNodeCompare_constant_CTYPE_BOOLEAN>` or :ref:`CTYPE_TRANSFORM<class_VisualShaderNodeCompare_constant_CTYPE_TRANSFORM>`.
  96. .. _class_VisualShaderNodeCompare_constant_FUNC_LESS_THAN_EQUAL:
  97. .. rst-class:: classref-enumeration-constant
  98. :ref:`Function<enum_VisualShaderNodeCompare_Function>` **FUNC_LESS_THAN_EQUAL** = ``5``
  99. Comparison for less than or equal (``a <= b``). Cannot be used if :ref:`type<class_VisualShaderNodeCompare_property_type>` set to :ref:`CTYPE_BOOLEAN<class_VisualShaderNodeCompare_constant_CTYPE_BOOLEAN>` or :ref:`CTYPE_TRANSFORM<class_VisualShaderNodeCompare_constant_CTYPE_TRANSFORM>`.
  100. .. _class_VisualShaderNodeCompare_constant_FUNC_MAX:
  101. .. rst-class:: classref-enumeration-constant
  102. :ref:`Function<enum_VisualShaderNodeCompare_Function>` **FUNC_MAX** = ``6``
  103. Represents the size of the :ref:`Function<enum_VisualShaderNodeCompare_Function>` enum.
  104. .. rst-class:: classref-item-separator
  105. ----
  106. .. _enum_VisualShaderNodeCompare_Condition:
  107. .. rst-class:: classref-enumeration
  108. enum **Condition**: :ref:`🔗<enum_VisualShaderNodeCompare_Condition>`
  109. .. _class_VisualShaderNodeCompare_constant_COND_ALL:
  110. .. rst-class:: classref-enumeration-constant
  111. :ref:`Condition<enum_VisualShaderNodeCompare_Condition>` **COND_ALL** = ``0``
  112. The result will be ``true`` if all components in the vector satisfy the comparison condition.
  113. .. _class_VisualShaderNodeCompare_constant_COND_ANY:
  114. .. rst-class:: classref-enumeration-constant
  115. :ref:`Condition<enum_VisualShaderNodeCompare_Condition>` **COND_ANY** = ``1``
  116. The result will be ``true`` if any component in the vector satisfies the comparison condition.
  117. .. _class_VisualShaderNodeCompare_constant_COND_MAX:
  118. .. rst-class:: classref-enumeration-constant
  119. :ref:`Condition<enum_VisualShaderNodeCompare_Condition>` **COND_MAX** = ``2``
  120. Represents the size of the :ref:`Condition<enum_VisualShaderNodeCompare_Condition>` enum.
  121. .. rst-class:: classref-section-separator
  122. ----
  123. .. rst-class:: classref-descriptions-group
  124. Property Descriptions
  125. ---------------------
  126. .. _class_VisualShaderNodeCompare_property_condition:
  127. .. rst-class:: classref-property
  128. :ref:`Condition<enum_VisualShaderNodeCompare_Condition>` **condition** = ``0`` :ref:`🔗<class_VisualShaderNodeCompare_property_condition>`
  129. .. rst-class:: classref-property-setget
  130. - |void| **set_condition**\ (\ value\: :ref:`Condition<enum_VisualShaderNodeCompare_Condition>`\ )
  131. - :ref:`Condition<enum_VisualShaderNodeCompare_Condition>` **get_condition**\ (\ )
  132. Extra condition which is applied if :ref:`type<class_VisualShaderNodeCompare_property_type>` is set to :ref:`CTYPE_VECTOR_3D<class_VisualShaderNodeCompare_constant_CTYPE_VECTOR_3D>`.
  133. .. rst-class:: classref-item-separator
  134. ----
  135. .. _class_VisualShaderNodeCompare_property_function:
  136. .. rst-class:: classref-property
  137. :ref:`Function<enum_VisualShaderNodeCompare_Function>` **function** = ``0`` :ref:`🔗<class_VisualShaderNodeCompare_property_function>`
  138. .. rst-class:: classref-property-setget
  139. - |void| **set_function**\ (\ value\: :ref:`Function<enum_VisualShaderNodeCompare_Function>`\ )
  140. - :ref:`Function<enum_VisualShaderNodeCompare_Function>` **get_function**\ (\ )
  141. A comparison function. See :ref:`Function<enum_VisualShaderNodeCompare_Function>` for options.
  142. .. rst-class:: classref-item-separator
  143. ----
  144. .. _class_VisualShaderNodeCompare_property_type:
  145. .. rst-class:: classref-property
  146. :ref:`ComparisonType<enum_VisualShaderNodeCompare_ComparisonType>` **type** = ``0`` :ref:`🔗<class_VisualShaderNodeCompare_property_type>`
  147. .. rst-class:: classref-property-setget
  148. - |void| **set_comparison_type**\ (\ value\: :ref:`ComparisonType<enum_VisualShaderNodeCompare_ComparisonType>`\ )
  149. - :ref:`ComparisonType<enum_VisualShaderNodeCompare_ComparisonType>` **get_comparison_type**\ (\ )
  150. The type to be used in the comparison. See :ref:`ComparisonType<enum_VisualShaderNodeCompare_ComparisonType>` for options.
  151. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  152. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  153. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  154. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  155. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  156. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  157. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  158. .. |void| replace:: :abbr:`void (No return value.)`