Module: RLSL::Prism::Builtins
- Defined in:
- lib/rlsl/prism/builtins.rb,
lib/rlsl/prism/builtins/swizzle_rules.rb,
lib/rlsl/prism/builtins/operator_rules.rb,
lib/rlsl/prism/builtins/function_registry.rb
Defined Under Namespace
Modules: FunctionRegistry, OperatorRules, SwizzleRules
Constant Summary collapse
- FUNCTIONS =
FunctionRegistry::FUNCTIONS
- BINARY_OPERATORS =
OperatorRules::BINARY_OPERATORS
- UNARY_OPERATORS =
OperatorRules::UNARY_OPERATORS
- SWIZZLE_COMPONENTS =
SwizzleRules::SWIZZLE_COMPONENTS
- SINGLE_COMPONENT_FIELDS =
SwizzleRules::SINGLE_COMPONENT_FIELDS
- SWIZZLE_PATTERNS =
SwizzleRules::SWIZZLE_PATTERNS
Class Method Summary collapse
- .binary_op_result_type(op, left_type, right_type) ⇒ Object
- .binary_operator?(op) ⇒ Boolean
- .explicit_types(name) ⇒ Object
- .function?(name) ⇒ Boolean
- .function_signature(name) ⇒ Object
- .matrix_type?(type) ⇒ Boolean
- .matrix_vector_result(matrix_type) ⇒ Object
- .resolve_return_type(rule, arg_types) ⇒ Object
- .scalar_type?(type) ⇒ Boolean
- .single_component_field?(name) ⇒ Boolean
- .supported_on_target?(name, target) ⇒ Boolean
- .swizzle?(name) ⇒ Boolean
- .swizzle_type(components) ⇒ Object
- .unary_operator?(op) ⇒ Boolean
- .vector_type?(type) ⇒ Boolean
Class Method Details
.binary_op_result_type(op, left_type, right_type) ⇒ Object
58 59 60 |
# File 'lib/rlsl/prism/builtins.rb', line 58 def binary_op_result_type(op, left_type, right_type) OperatorRules.binary_op_result_type(op, left_type, right_type) end |
.binary_operator?(op) ⇒ Boolean
34 35 36 |
# File 'lib/rlsl/prism/builtins.rb', line 34 def binary_operator?(op) OperatorRules.binary_operator?(op) end |
.explicit_types(name) ⇒ Object
30 31 32 |
# File 'lib/rlsl/prism/builtins.rb', line 30 def explicit_types(name) FunctionRegistry.explicit_types(name) end |
.function?(name) ⇒ Boolean
18 19 20 |
# File 'lib/rlsl/prism/builtins.rb', line 18 def function?(name) FunctionRegistry.function?(name) end |
.function_signature(name) ⇒ Object
22 23 24 |
# File 'lib/rlsl/prism/builtins.rb', line 22 def function_signature(name) FunctionRegistry.function_signature(name) end |
.matrix_type?(type) ⇒ Boolean
66 67 68 |
# File 'lib/rlsl/prism/builtins.rb', line 66 def matrix_type?(type) OperatorRules.matrix_type?(type) end |
.matrix_vector_result(matrix_type) ⇒ Object
74 75 76 |
# File 'lib/rlsl/prism/builtins.rb', line 74 def matrix_vector_result(matrix_type) OperatorRules.matrix_vector_result(matrix_type) end |
.resolve_return_type(rule, arg_types) ⇒ Object
54 55 56 |
# File 'lib/rlsl/prism/builtins.rb', line 54 def resolve_return_type(rule, arg_types) FunctionRegistry.resolve_return_type(rule, arg_types) end |
.scalar_type?(type) ⇒ Boolean
70 71 72 |
# File 'lib/rlsl/prism/builtins.rb', line 70 def scalar_type?(type) OperatorRules.scalar_type?(type) end |
.single_component_field?(name) ⇒ Boolean
42 43 44 |
# File 'lib/rlsl/prism/builtins.rb', line 42 def single_component_field?(name) SwizzleRules.single_component_field?(name) end |
.supported_on_target?(name, target) ⇒ Boolean
26 27 28 |
# File 'lib/rlsl/prism/builtins.rb', line 26 def supported_on_target?(name, target) FunctionRegistry.supported_on_target?(name, target) end |
.swizzle?(name) ⇒ Boolean
46 47 48 |
# File 'lib/rlsl/prism/builtins.rb', line 46 def swizzle?(name) SwizzleRules.swizzle?(name) end |
.swizzle_type(components) ⇒ Object
50 51 52 |
# File 'lib/rlsl/prism/builtins.rb', line 50 def swizzle_type(components) SwizzleRules.swizzle_type(components) end |
.unary_operator?(op) ⇒ Boolean
38 39 40 |
# File 'lib/rlsl/prism/builtins.rb', line 38 def unary_operator?(op) OperatorRules.unary_operator?(op) end |
.vector_type?(type) ⇒ Boolean
62 63 64 |
# File 'lib/rlsl/prism/builtins.rb', line 62 def vector_type?(type) OperatorRules.vector_type?(type) end |