VisualScriptMathConstant.xml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="VisualScriptMathConstant" inherits="VisualScriptNode" category="Core" version="3.0.alpha.custom_build">
  3. <brief_description>
  4. Commonly used mathematical constants.
  5. </brief_description>
  6. <description>
  7. Provides common math constants, such as Pi or Euler's constant, on an output Data port.
  8. [b]Input Ports:[/b]
  9. none
  10. [b]Output Ports:[/b]
  11. - Data (variant): [code]get[/code]
  12. </description>
  13. <tutorials>
  14. </tutorials>
  15. <demos>
  16. </demos>
  17. <methods>
  18. <method name="get_math_constant">
  19. <return type="int" enum="VisualScriptMathConstant.MathConstant">
  20. </return>
  21. <description>
  22. </description>
  23. </method>
  24. <method name="set_math_constant">
  25. <return type="void">
  26. </return>
  27. <argument index="0" name="which" type="int" enum="VisualScriptMathConstant.MathConstant">
  28. </argument>
  29. <description>
  30. </description>
  31. </method>
  32. </methods>
  33. <members>
  34. <member name="constant" type="int" setter="set_math_constant" getter="get_math_constant" enum="VisualScriptMathConstant.MathConstant">
  35. The math constant.
  36. </member>
  37. </members>
  38. <constants>
  39. <constant name="MATH_CONSTANT_ONE" value="0">
  40. Unity: [code]1[/code]
  41. </constant>
  42. <constant name="MATH_CONSTANT_PI" value="1">
  43. Pi: [code]3.141593[/code]
  44. </constant>
  45. <constant name="MATH_CONSTANT_2PI" value="2">
  46. Pi times two: [code]6.283185[/code]
  47. </constant>
  48. <constant name="MATH_CONSTANT_HALF_PI" value="3">
  49. Pi divided by two: [code]1.570796[/code]
  50. </constant>
  51. <constant name="MATH_CONSTANT_E" value="4">
  52. Natural log: [code]2.718282[/code]
  53. </constant>
  54. <constant name="MATH_CONSTANT_SQRT2" value="5">
  55. Square root of two: [code]1.414214[/code]
  56. </constant>
  57. <constant name="MATH_CONSTANT_INF" value="6">
  58. Infinity: [code]inf[/code]
  59. </constant>
  60. <constant name="MATH_CONSTANT_NAN" value="7">
  61. Not a number: [code]nan[/code]
  62. </constant>
  63. <constant name="MATH_CONSTANT_MAX" value="8">
  64. </constant>
  65. </constants>
  66. </class>