class_visualshadernodevectorop.rst 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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 VisualShaderNodeVectorOp.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_VisualShaderNodeVectorOp:
  6. VisualShaderNodeVectorOp
  7. ========================
  8. **Inherits:** :ref:`VisualShaderNode<class_VisualShaderNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  9. A vector operator to be used within the visual shader graph.
  10. Description
  11. -----------
  12. A visual shader node for use of vector operators. Operates on vector ``a`` and vector ``b``.
  13. Properties
  14. ----------
  15. +---------------------------------------------------------+-------------------------------------------------------------------+-------+
  16. | :ref:`Operator<enum_VisualShaderNodeVectorOp_Operator>` | :ref:`operator<class_VisualShaderNodeVectorOp_property_operator>` | ``0`` |
  17. +---------------------------------------------------------+-------------------------------------------------------------------+-------+
  18. Enumerations
  19. ------------
  20. .. _enum_VisualShaderNodeVectorOp_Operator:
  21. .. _class_VisualShaderNodeVectorOp_constant_OP_ADD:
  22. .. _class_VisualShaderNodeVectorOp_constant_OP_SUB:
  23. .. _class_VisualShaderNodeVectorOp_constant_OP_MUL:
  24. .. _class_VisualShaderNodeVectorOp_constant_OP_DIV:
  25. .. _class_VisualShaderNodeVectorOp_constant_OP_MOD:
  26. .. _class_VisualShaderNodeVectorOp_constant_OP_POW:
  27. .. _class_VisualShaderNodeVectorOp_constant_OP_MAX:
  28. .. _class_VisualShaderNodeVectorOp_constant_OP_MIN:
  29. .. _class_VisualShaderNodeVectorOp_constant_OP_CROSS:
  30. .. _class_VisualShaderNodeVectorOp_constant_OP_ATAN2:
  31. .. _class_VisualShaderNodeVectorOp_constant_OP_REFLECT:
  32. .. _class_VisualShaderNodeVectorOp_constant_OP_STEP:
  33. enum **Operator**:
  34. - **OP_ADD** = **0** --- Adds two vectors.
  35. - **OP_SUB** = **1** --- Subtracts a vector from a vector.
  36. - **OP_MUL** = **2** --- Multiplies two vectors.
  37. - **OP_DIV** = **3** --- Divides vector by vector.
  38. - **OP_MOD** = **4** --- Returns the remainder of the two vectors.
  39. - **OP_POW** = **5** --- Returns the value of the first parameter raised to the power of the second, for each component of the vectors.
  40. - **OP_MAX** = **6** --- Returns the greater of two values, for each component of the vectors.
  41. - **OP_MIN** = **7** --- Returns the lesser of two values, for each component of the vectors.
  42. - **OP_CROSS** = **8** --- Calculates the cross product of two vectors.
  43. - **OP_ATAN2** = **9** --- Returns the arc-tangent of the parameters.
  44. - **OP_REFLECT** = **10** --- Returns the vector that points in the direction of reflection. ``a`` is incident vector and ``b`` is the normal vector.
  45. - **OP_STEP** = **11** --- Vector step operator. Returns ``0.0`` if ``a`` is smaller than ``b`` and ``1.0`` otherwise.
  46. Property Descriptions
  47. ---------------------
  48. .. _class_VisualShaderNodeVectorOp_property_operator:
  49. - :ref:`Operator<enum_VisualShaderNodeVectorOp_Operator>` **operator**
  50. +-----------+---------------------+
  51. | *Default* | ``0`` |
  52. +-----------+---------------------+
  53. | *Setter* | set_operator(value) |
  54. +-----------+---------------------+
  55. | *Getter* | get_operator() |
  56. +-----------+---------------------+
  57. The operator to be used. See :ref:`Operator<enum_VisualShaderNodeVectorOp_Operator>` for options.
  58. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  59. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  60. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`