Data Types: Difference between revisions

From Heavy Iron Modding
Content added Content deleted
No edit summary
Battlepedia>Igorseabra4
Line 47: Line 47:


===Vector3===
===Vector3===
Vector3 is a set of 3 floats, which usually represent a 3D vector on the world, be it position, rotation, scale or RGB color.
Vector3 is a set of 3 floats, which usually represent a 3D vector on the world, be it position, rotation or scale.


{| class="wikitable"
{| class="wikitable"
Line 59: Line 59:
|-
|-
| float || Z - The Z coordinate of this vector
| float || Z - The Z coordinate of this vector
|}

===Vector4===
Vector4 is a set of 4 floats. They can represent a vector in 4D space, and also a color with R, G, B, A components ranging from 0 to 1.

{| class="wikitable"
|+
! Type
! Description
|-
| float || X - The X coordinate of this vector
|-
| float || Y - The Y coordinate of this vector
|-
| float || Z - The Z coordinate of this vector
|-
| float || W - The W coordinate of this vector
|}
|}



Revision as of 01:34, 2 September 2018

Basic types

Type Description
int, int32 32-bit signed integer
uint, uint32 32-bit unsigned integer
short, int16 16-bit signed integer
ushort, uint16 16-bit unsigned integer
byte 8-bit signed integer
char 8-bit unsigned ASCII integer
float IEEE 754 floating point number

Structs

AssetID

Asset ID is a type derived from uint32 (unsigned integer). It is considered its own type due to how the game uses Asset IDs to uniquely identify an asset and manage communication between them.

Type Description
uint 32-bit unsigned integer

Vector2

Vector2 is a set of 2 floats, which usually represent a 2D vector on the world; it is used mostly for texture coordinates.

Type Description
float X - The X coordinate of this vector
float Y - The Y coordinate of this vector

Vector3

Vector3 is a set of 3 floats, which usually represent a 3D vector on the world, be it position, rotation or scale.

Type Description
float X - The X coordinate of this vector
float Y - The Y coordinate of this vector
float Z - The Z coordinate of this vector

Vector4

Vector4 is a set of 4 floats. They can represent a vector in 4D space, and also a color with R, G, B, A components ranging from 0 to 1.

Type Description
float X - The X coordinate of this vector
float Y - The Y coordinate of this vector
float Z - The Z coordinate of this vector
float W - The W coordinate of this vector

UIColor

UIColor is a set of 4 bytes, which represent a 32 bit color with red, blue, green and alpha components.

Type Description
byte R - red component of this color
byte G - green component of this color
byte B - blue component of this color
byte A - alpha component of this color