Navigation
API > API/Runtime > API/Runtime/Engine
Represents the type of scalars, vectors and matrices. It indicates what kind of scalar data type it has and type dimensions (rows and columns).
| Name | FPrimitiveType |
| Type | struct |
| Header File | /Engine/Source/Runtime/Engine/Public/Materials/MaterialIRTypes.h |
| Include Path | #include "Materials/MaterialIRTypes.h" |
Syntax
struct FPrimitiveType : public MIR::FType
Inheritance Hierarchy
- FType → FPrimitiveType
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| NumColumns | int | Number of columns (rows > 1 and columns == 1, this is a vector). | Materials/MaterialIRTypes.h | |
| NumRows | int | Number of rows. | Materials/MaterialIRTypes.h | |
| ScalarKind | EScalarKind | Scalar data type kind. | Materials/MaterialIRTypes.h | |
| Spelling | FStringView | String representation of this type (e.g. 'float3', "bool4x2") | Materials/MaterialIRTypes.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
int GetNumComponents() |
Returns the number of components in this primitive type. | Materials/MaterialIRTypes.h | |
bool IsArithmetic() |
Whether this primitive type is arithmetic (it supports arithemtic operations like addition). | Materials/MaterialIRTypes.h | |
bool IsMatrix() |
Whether this primitive type is a matrix. | Materials/MaterialIRTypes.h | |
bool IsScalar() |
Whether this primitive type is scalar. | Materials/MaterialIRTypes.h | |
bool IsVector() |
Whether this primitive type is a column vector. | Materials/MaterialIRTypes.h | |
const FPrimitiveType * ToScalar() |
Returns the scalar type with this type scalar kind. | Materials/MaterialIRTypes.h | |
const FPrimitiveType * ToVector
(
int NumRows |
Returns the vector type with this type scalar kind. | Materials/MaterialIRTypes.h | |
const FPrimitiveType * WithScalarKind
(
EScalarKind InScalarKind |
Returns this primitive type with a different scalar kind. | Materials/MaterialIRTypes.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static const FPrimitiveType * Get
(
EScalarKind InScalarKind, |
Returns the primitive type with given kind and number of columns and rows. | Materials/MaterialIRTypes.h | |
static const FPrimitiveType * GetBool() |
Returns the boolean scalar type. | Materials/MaterialIRTypes.h | |
static const FPrimitiveType * GetFloat() |
Returns the floating point scalar type. | Materials/MaterialIRTypes.h | |
static const FPrimitiveType * GetFloat2() |
Returns the floating point 2D vector type. | Materials/MaterialIRTypes.h | |
static const FPrimitiveType * GetFloat3() |
Returns the floating point 3D vector type. | Materials/MaterialIRTypes.h | |
static const FPrimitiveType * GetFloat4() |
Returns the floating point 4D vector type. | Materials/MaterialIRTypes.h | |
static const FPrimitiveType * GetInt() |
Returns the integer scalar type. | Materials/MaterialIRTypes.h | |
static const FPrimitiveType * GetScalar
(
EScalarKind InScalarKind |
Returns the scalar type with given kind. | Materials/MaterialIRTypes.h | |
static const FPrimitiveType * GetVector
(
EScalarKind InScalarKind, |
Returns the column vector type with given kind and number of rows. | Materials/MaterialIRTypes.h |