Navigation
API > API/Runtime > API/Runtime/Engine
Describes a primitive type (scalar, vector, or matrix).
| Name | FPrimitive |
| Type | struct |
| Header File | /Engine/Source/Runtime/Engine/Public/Materials/MaterialIRTypes.h |
| Include Path | #include "Materials/MaterialIRTypes.h" |
Syntax
struct FPrimitive
Inheritance Hierarchy
- FAttributeAccessors → FPrimitive
- FPrimitive
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bIsLWCInverseMatrix | bool | If true, this represents an LWC inverse matrix. Only supported for EScalarKind::LWC and 4x4 dimensions. | Materials/MaterialIRTypes.h | |
| NumColumns | int8 | Number of columns. For a vector or scalar, this is 1. For a matrix, this is > 1. | Materials/MaterialIRTypes.h | |
| NumRows | int8 | Number of rows. For a vector, this is the number of elements. For a scalar, this is 1. | Materials/MaterialIRTypes.h | |
| ScalarKind | EScalarKind | The underlying scalar data type (e.g. Bool, Int, Float). | Materials/MaterialIRTypes.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool IsAnyFloat() |
Returns whether this is any floating point primitive type (e.g. float, LWC). | Materials/MaterialIRTypes.h | |
bool IsArithmetic() |
Returns whether this primitive type is arithmetic (it supports arithmetic operations like addition). | Materials/MaterialIRTypes.h | |
bool IsBoolean() |
Returns whether this is a boolean primitive type (of any dimension). | Materials/MaterialIRTypes.h | |
bool IsBoolScalar() |
Returns whether this is a single boolean scalar. | Materials/MaterialIRTypes.h | |
bool IsColumnVector() |
Returns whether this primitive type is a row vector (rows = 1, columns > 1). | Materials/MaterialIRTypes.h | |
bool IsDouble() |
Returns whether this is an LWC primitive type (of any dimension). | Materials/MaterialIRTypes.h | |
bool IsFloat() |
Returns whether this is a float primitive type (of any dimension). | Materials/MaterialIRTypes.h | |
bool IsInteger() |
Returns whether this is an integer primitive type (of any dimension). | Materials/MaterialIRTypes.h | |
bool IsMatrix() |
Returns whether this primitive type is a matrix (rows > 1, columns > 1). | Materials/MaterialIRTypes.h | |
bool IsRowVector() |
Returns whether this primitive type is a column vector (rows > 1, columns = 1). | Materials/MaterialIRTypes.h | |
bool IsScalar() |
Returns whether this type is a primitive scalar (1x1). | Materials/MaterialIRTypes.h | |
int32 NumComponents() |
Returns the total number of scalar components in this primitive type. | Materials/MaterialIRTypes.h | |
FType ToScalar() |
Returns the scalar FType corresponding to this primitive's scalar kind. | Materials/MaterialIRTypes.h | |
FType ToScalarKind
(
EScalarKind InScalarKind |
Returns a new FType with the same dimensions but a different scalar kind. | Materials/MaterialIRTypes.h | |
FType ToVector
(
int NumColumns |
Returns a vector FType with the given number of rows and this primitive's scalar kind. | Materials/MaterialIRTypes.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool operator!=
(
const FPrimitive& Other |
Materials/MaterialIRTypes.h | ||
bool operator==
(
const FPrimitive& Other |
Materials/MaterialIRTypes.h |