Navigation
API > API/Plugins > API/Plugins/RigVM
The register represents an address with the VM's memory. Within a register we can store arbitrary data, so it provides a series of properties to describe the memory location. Registers also support the notion of slices. A slice is a complete copy of the memory - so for example if your register stores 4 Vectors, then a slice would contain 48 bytes (4 * 3 * 4). The register can however store multiple slices / copies of that if needed. Slices can be used to provide per-invocation memory to functions within the same register. An integrator for example that needs to store a simulated position might want access to a separate memory per loop iteration.
| Name | FRigVMRegister |
| Type | struct |
| Header File | /Engine/Plugins/Runtime/RigVM/Source/RigVM/Public/RigVMCore/RigVMMemoryDeprecated.h |
| Include Path | #include "RigVMCore/RigVMMemoryDeprecated.h" |
Syntax
USTRUCT ()
struct FRigVMRegister
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FRigVMRegister() |
RigVMCore/RigVMMemoryDeprecated.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AlignmentBytes | uint8 | The number of leading bytes for alignment. | RigVMCore/RigVMMemoryDeprecated.h | |
| BaseCPPType | FName | Defines the CPP type used for the register This is only used for debugging purposes in editor. | RigVMCore/RigVMMemoryDeprecated.h |
|
| BaseCPPTypeObject | TObjectPtr< UObject > | The resolved UScriptStruct / UObject (in the future) used for debugging. | RigVMCore/RigVMMemoryDeprecated.h |
|
| bIsArray | bool | If true defines this register as an array. | RigVMCore/RigVMMemoryDeprecated.h | |
| bIsDynamic | bool | If true defines this register to use dynamic storage. | RigVMCore/RigVMMemoryDeprecated.h | |
| ByteIndex | uint32 | The index of the first work byte. | RigVMCore/RigVMMemoryDeprecated.h | |
| ElementCount | uint16 | The number of elements in this register (for example the number of elements in an array) | RigVMCore/RigVMMemoryDeprecated.h | |
| ElementSize | uint16 | The size of each store element (for example 4 for a float) | RigVMCore/RigVMMemoryDeprecated.h | |
| Name | FName | The name of the register (can be None) | RigVMCore/RigVMMemoryDeprecated.h | |
| ScriptStructIndex | int32 | For struct registers this is the index of the struct used - otherwise INDEX_NONE | RigVMCore/RigVMMemoryDeprecated.h | |
| SliceCount | uint16 | The number of slices (complete copies) (for example the number of iterations on a fixed loop) Potentially redundant state - can be removed. | RigVMCore/RigVMMemoryDeprecated.h | |
| TrailingBytes | uint16 | The number of trailing bytes. | RigVMCore/RigVMMemoryDeprecated.h | |
| Type | ERigVMRegisterType | The type of register (plain, name, string, etc.) | RigVMCore/RigVMMemoryDeprecated.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
uint8 GetAlignmentBytes() |
Returns the leading alignment bytes. | RigVMCore/RigVMMemoryDeprecated.h | |
uint16 GetAllocatedBytes() |
Returns the number of allocated bytes (including alignment + trailing bytes) | RigVMCore/RigVMMemoryDeprecated.h | |
uint64 GetFirstAllocatedByte() |
Returns the first allocated byte in the data byte array | RigVMCore/RigVMMemoryDeprecated.h | |
uint16 GetNumBytesAllSlices() |
Returns the number of bytes for all slices. | RigVMCore/RigVMMemoryDeprecated.h | |
uint16 GetNumBytesPerSlice() |
Returns the number of bytes for a complete slice. | RigVMCore/RigVMMemoryDeprecated.h | |
uint32 GetTotalElementCount() |
Returns the total number of elements (elementcount * slicecount) in the register. | RigVMCore/RigVMMemoryDeprecated.h | |
uint64 GetWorkByteIndex
(
int32 InSliceIndex |
Returns the current address of the register within the data byte array. | RigVMCore/RigVMMemoryDeprecated.h | |
bool IsArray() |
Returns true if the register stores more than one element. | RigVMCore/RigVMMemoryDeprecated.h | |
bool IsDynamic() |
Returns true if this register is using a dynamic array for storage | RigVMCore/RigVMMemoryDeprecated.h | |
bool IsNestedDynamic() |
Returns true if this register is using a dynamic array for storage | RigVMCore/RigVMMemoryDeprecated.h | |
void Load
(
FArchive& Ar |
RigVMCore/RigVMMemoryDeprecated.h | ||
void Save
(
FArchive& Ar |
RigVMCore/RigVMMemoryDeprecated.h | ||
void Serialize
(
FArchive& Ar |
RigVMCore/RigVMMemoryDeprecated.h |