Capítulo 490 de 859
Represents a struct type node in the node-based system. This class is used to define and manage the layout and types of struct members. It extends the base Node class and provides methods to get the length of the struct, retrieve member types, and generate the struct type for a builder.
Constructor
| Signature |
|---|
new StructTypeNode( membersLayout : Object, name : string ) |
Properties
| Property | Description |
|---|---|
.isStructTypeNode : boolean (readonly) | This flag can be used for type testing. |
.membersLayout : Array.<{name: string, type: string, atomic: boolean}> | The layout of the members for the struct |
.name : string | The name of the struct. |
Methods
| Method | Description |
|---|---|
.getLength() : number | Returns the length of the struct in 4-byte elements (e.g. float or int components). The length is calculated by summing the lengths of the struct's members, accounting for memory alignment. To get th… |