FRigVMRegister

The register represents an address with the VM's memory.

Windows
MacOS
Linux

References

Module

RigVM

Header

/Engine/Source/Runtime/RigVM/Public/RigVMCore/RigVMMemory.h

Include

#include "RigVMCore/RigVMMemory.h"

Syntax

struct FRigVMRegister

Remarks

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.

Variables

Name Description

Public variable

uint8

 

AlignmentBytes

The number of leading bytes for alignment.

Public variable

bool

 

bIsArray

If true defines this register as an array.

Public variable

bool

 

bIsDynamic

If true defines this register to use dynamic storage.

Public variable

uint32

 

ByteIndex

The index of the first work byte.

Public variable

uint16

 

ElementCount

The number of elements in this register.

Public variable

uint16

 

ElementSize

The size of each store element.

Public variable

FName

 

Name

The name of the register (can be None)

Public variable

int32

 

ScriptStructIndex

For struct registers this is the index of the struct used - otherwise INDEX_NONE

Public variable

uint16

 

SliceCount

The number of slices (complete copies)

Public variable

uint16

 

TrailingBytes

The number of trailing bytes. These originate after shrinking a register.

Public variable

ERigVMRegisterT...

 

Type

The type of register (plain, name, string, etc.)

Constructors

Name Description

Public function

FRigVMRegister()

Functions

Name Description

Public function Const

uint8

 

GetAlignmentBytes()

Returns the leading alignment bytes.

Public function Const

uint16

 

GetAllocatedBytes()

Returns the number of allocated bytes (including alignment + trailing bytes)

Public function Const

uint64

 

GetFirstAllocatedByte()

Returns the first allocated byte in the data byte array

Public function Const

uint16

 

GetNumBytesAllSlices()

Returns the number of bytes for all slices.

Public function Const

uint16

 

GetNumBytesPerSlice()

Returns the number of bytes for a complete slice.

Public function Const

uint32

 

GetTotalElementCount()

Returns the total number of elements (elementcount * slicecount) in the register.

Public function Const

uint64

 

GetWorkByteIndex

(
    int32 InSliceIndex
)

Returns the current address of the register within the data byte array.

Public function Const

bool

 

IsArray()

Returns true if the register stores more than one element.

Public function Const

bool

 

IsDynamic()

Returns true if this register is using a dynamic array for storage

Public function Const

bool

 

IsNestedDynamic()

Returns true if this register is using a dynamic array for storage

Public function Const

bool

 

IsShallow()

Returns true if the register stores shallow memory.

Public function

bool

 

Serialize

(
    FArchive& Ar
)

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss