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 TypeMethodDescriptionclone
(int position) static Expression
convert
(Context context, int pos, Type type, List<Expression> args) getKind()
static Expression
make
(Context context, int position, Type type, Expression[] arguments) static Expression
makeFromConstants
(Context context, int pos, Type type, double[] values) Methods inherited from class icyllis.arc3d.compiler.tree.ConstructorCall
accept, getArgument, getArguments, getComponentType, getConstantValue, isConstructorCall, toString
Methods inherited from class icyllis.arc3d.compiler.tree.Expression
clone, getCoercionCost, getType, isBooleanLiteral, isFloatLiteral, isIncomplete, isIntLiteral, isLiteral, toString
Methods inherited from class icyllis.arc3d.compiler.tree.Node
getEndOffset, getStartOffset
-
Method Details
-
convert
@Nullable public static Expression convert(@Nonnull Context context, int pos, @Nonnull Type type, @Nonnull List<Expression> args) -
make
@Nonnull public static Expression make(@Nonnull Context context, int position, Type type, Expression[] arguments) -
makeFromConstants
@Nonnull public static Expression makeFromConstants(@Nonnull Context context, int pos, Type type, double[] values) -
getKind
- Specified by:
getKind
in classExpression
- See Also:
-
clone
- Specified by:
clone
in classExpression
-