summaryrefslogtreecommitdiff
path: root/doc/classes/VisualShaderNodeCompare.xml
blob: ddd7f87cb804670781befe469b5ef7f23ede4227 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<?xml version="1.0" encoding="UTF-8" ?>
<class name="VisualShaderNodeCompare" inherits="VisualShaderNode" version="4.0">
	<brief_description>
		A comparison function for common types within the visual shader graph.
	</brief_description>
	<description>
		Compares [code]a[/code] and [code]b[/code] of [member type] by [member function]. Returns a boolean scalar. Translates to [code]if[/code] instruction in shader code.
	</description>
	<tutorials>
	</tutorials>
	<members>
		<member name="condition" type="int" setter="set_condition" getter="get_condition" enum="VisualShaderNodeCompare.Condition" default="0">
			Extra condition which is applied if [member type] is set to [constant CTYPE_VECTOR_3D].
		</member>
		<member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeCompare.Function" default="0">
			A comparison function. See [enum Function] for options.
		</member>
		<member name="type" type="int" setter="set_comparison_type" getter="get_comparison_type" enum="VisualShaderNodeCompare.ComparisonType" default="0">
			The type to be used in the comparison. See [enum ComparisonType] for options.
		</member>
	</members>
	<constants>
		<constant name="CTYPE_SCALAR" value="0" enum="ComparisonType">
			A floating-point scalar.
		</constant>
		<constant name="CTYPE_SCALAR_INT" value="1" enum="ComparisonType">
			An integer scalar.
		</constant>
		<constant name="CTYPE_VECTOR_2D" value="2" enum="ComparisonType">
			A 2D vector type.
		</constant>
		<constant name="CTYPE_VECTOR_3D" value="3" enum="ComparisonType">
			A 3D vector type.
		</constant>
		<constant name="CTYPE_BOOLEAN" value="4" enum="ComparisonType">
			A boolean type.
		</constant>
		<constant name="CTYPE_TRANSFORM" value="5" enum="ComparisonType">
			A transform ([code]mat4[/code]) type.
		</constant>
		<constant name="CTYPE_MAX" value="6" enum="ComparisonType">
			Represents the size of the [enum ComparisonType] enum.
		</constant>
		<constant name="FUNC_EQUAL" value="0" enum="Function">
			Comparison for equality ([code]a == b[/code]).
		</constant>
		<constant name="FUNC_NOT_EQUAL" value="1" enum="Function">
			Comparison for inequality ([code]a != b[/code]).
		</constant>
		<constant name="FUNC_GREATER_THAN" value="2" enum="Function">
			Comparison for greater than ([code]a &gt; b[/code]). Cannot be used if [member type] set to [constant CTYPE_BOOLEAN] or [constant CTYPE_TRANSFORM].
		</constant>
		<constant name="FUNC_GREATER_THAN_EQUAL" value="3" enum="Function">
			Comparison for greater than or equal ([code]a &gt;= b[/code]). Cannot be used if [member type] set to [constant CTYPE_BOOLEAN] or [constant CTYPE_TRANSFORM].
		</constant>
		<constant name="FUNC_LESS_THAN" value="4" enum="Function">
			Comparison for less than ([code]a &lt; b[/code]). Cannot be used if [member type] set to [constant CTYPE_BOOLEAN] or [constant CTYPE_TRANSFORM].
		</constant>
		<constant name="FUNC_LESS_THAN_EQUAL" value="5" enum="Function">
			Comparison for less than or equal ([code]a &lt;= b[/code]). Cannot be used if [member type] set to [constant CTYPE_BOOLEAN] or [constant CTYPE_TRANSFORM].
		</constant>
		<constant name="FUNC_MAX" value="6" enum="Function">
			Represents the size of the [enum Function] enum.
		</constant>
		<constant name="COND_ALL" value="0" enum="Condition">
			The result will be true if all of component in vector satisfy the comparison condition.
		</constant>
		<constant name="COND_ANY" value="1" enum="Condition">
			The result will be true if any of component in vector satisfy the comparison condition.
		</constant>
		<constant name="COND_MAX" value="2" enum="Condition">
			Represents the size of the [enum Condition] enum.
		</constant>
	</constants>
</class>