Package icyllis.arc3d.compiler.tree
Class ConstructorCompound
java.lang.Object
icyllis.arc3d.compiler.tree.Node
icyllis.arc3d.compiler.tree.Expression
icyllis.arc3d.compiler.tree.ConstructorCall
icyllis.arc3d.compiler.tree.ConstructorCompound
Represents a vector or matrix that is composed of other expressions, such as
`float3(pos.xy, 1)` or `float3x3(a.xyz, b.xyz, 0, 0, 1)`
These can contain a mix of scalars and aggregates. The total number of scalar values inside the constructor must always match the type's scalar count. (e.g. `pos.xy` consumes two scalars.) The inner values must have the same component type as the vector/matrix.
-
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 TypeMethodDescriptionstatic @Nullable Expression
convert
(@NonNull Context context, int pos, @NonNull Type type, @NonNull List<Expression> args) @NonNull Expression
copy
(int position) getKind()
static @NonNull Expression
make
(@NonNull Context context, int position, Type type, Expression[] arguments) static @NonNull Expression
makeFromConstants
(@NonNull Context context, int pos, Type type, double[] values) Methods inherited from class icyllis.arc3d.compiler.tree.ConstructorCall
getArgument, getArguments, getComponentType, getConstantValue, 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
-
convert
public static @Nullable Expression convert(@NonNull Context context, int pos, @NonNull Type type, @NonNull List<Expression> args) -
make
public static @NonNull Expression make(@NonNull Context context, int position, Type type, Expression[] arguments) -
makeFromConstants
public static @NonNull Expression makeFromConstants(@NonNull Context context, int pos, Type type, double[] values) -
getKind
- Specified by:
getKind
in classExpression
- See Also:
-
copy
- Specified by:
copy
in classExpression
-