Package icyllis.arc3d.compiler.tree
Class ConstructorSplat
java.lang.Object
icyllis.arc3d.compiler.tree.Node
icyllis.arc3d.compiler.tree.Expression
icyllis.arc3d.compiler.tree.ConstructorCall
icyllis.arc3d.compiler.tree.ConstructorSplat
Represents the construction of a vector splat (broadcast), such as `float3(n)`.
These always contain exactly 1 scalar.
-
Nested Class Summary
Nested classes/interfaces inherited from class icyllis.arc3d.compiler.tree.Node
Node.ElementKind, Node.ExpressionKind, Node.StatementKind, Node.SymbolKind
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescription@NonNull Expression
copy
(int position) @NonNull OptionalDouble
getConstantValue
(int i) Returns the i'th compile-time constant value within a literal or constructor.getKind()
static @NonNull Expression
make
(int position, @NonNull Type type, @NonNull Expression arg) Methods inherited from class icyllis.arc3d.compiler.tree.ConstructorCall
convert, getArgument, getArguments, getComponentType, isConstructorCall, toString
Methods inherited from class icyllis.arc3d.compiler.tree.Expression
accept, copy, getCoercionCost, getType, isBooleanLiteral, isFloatLiteral, isIncomplete, isIntLiteral, isLiteral, toString
Methods inherited from class icyllis.arc3d.compiler.tree.Node
getEndOffset, getStartOffset
-
Method Details
-
make
-
getKind
- Specified by:
getKind
in classExpression
- See Also:
-
getConstantValue
Description copied from class:Expression
Returns the i'th compile-time constant value within a literal or constructor. Indices which do not contain compile-time constant values will return empty. `vec4(1, vec2(2), 3)` contains four compile-time constants: (1, 2, 2, 3) `mat2(f)` contains four slots, and two are constant: (empty, 0, 0, empty)- Overrides:
getConstantValue
in classConstructorCall
-
copy
- Specified by:
copy
in classExpression
-