VisualShaderNodeCompare
继承: VisualShaderNode
< Resource
< RefCounted
< Object
A comparison function for common types within the visual shader graph.
描述
Compares a
and b
of type
by function
. Returns a boolean scalar. Translates to if
instruction in shader code.
属性
枚举
enum ComparisonType:
ComparisonType CTYPE_SCALAR = 0
A floating-point scalar.
ComparisonType CTYPE_SCALAR_INT = 1
An integer scalar.
ComparisonType CTYPE_SCALAR_UINT = 2
An unsigned integer scalar.
ComparisonType CTYPE_VECTOR_2D = 3
A 2D vector type.
ComparisonType CTYPE_VECTOR_3D = 4
A 3D vector type.
ComparisonType CTYPE_VECTOR_4D = 5
A 4D vector type.
ComparisonType CTYPE_BOOLEAN = 6
A boolean type.
ComparisonType CTYPE_TRANSFORM = 7
A transform (mat4
) type.
ComparisonType CTYPE_MAX = 8
Represents the size of the ComparisonType enum.
enum Function:
Function FUNC_EQUAL = 0
Comparison for equality (a == b
).
Function FUNC_NOT_EQUAL = 1
Comparison for inequality (a != b
).
Function FUNC_GREATER_THAN = 2
Comparison for greater than (a > b
). Cannot be used if type
set to CTYPE_BOOLEAN
or CTYPE_TRANSFORM
.
Function FUNC_GREATER_THAN_EQUAL = 3
Comparison for greater than or equal (a >= b
). Cannot be used if type
set to CTYPE_BOOLEAN
or CTYPE_TRANSFORM
.
Function FUNC_LESS_THAN = 4
Comparison for less than (a < b
). Cannot be used if type
set to CTYPE_BOOLEAN
or CTYPE_TRANSFORM
.
Function FUNC_LESS_THAN_EQUAL = 5
Comparison for less than or equal (a <= b
). Cannot be used if type
set to CTYPE_BOOLEAN
or CTYPE_TRANSFORM
.
Function FUNC_MAX = 6
Represents the size of the Function enum.
enum Condition:
Condition COND_ALL = 0
The result will be true if all of component in vector satisfy the comparison condition.
Condition COND_ANY = 1
The result will be true if any of component in vector satisfy the comparison condition.
Condition COND_MAX = 2
Represents the size of the Condition enum.
属性说明
Condition condition = 0
Extra condition which is applied if type
is set to CTYPE_VECTOR_3D
.
Function function = 0
A comparison function. See Function for options.
ComparisonType type = 0
void
set_comparison_type ( value: ComparisonType )- ComparisonType get_comparison_type ( )
The type to be used in the comparison. See ComparisonType for options.
本方法通常需要用户覆盖才能生效。
本方法无副作用,不会修改该实例的任何成员变量。
本方法除了能接受在此处描述的参数外,还能够继续接受任意数量的参数。
本方法用于构造某个类型。
调用本方法无需实例,可直接使用类名进行调用。
本方法描述的是使用本类型作为左操作数的有效运算符。
这个值是由下列位标志构成位掩码的整数。
无返回值。