The three virtues of a programmer: Laziness, Impatience, and Hubris. – Larry Wall

Legacy:Built-In Structs (UT)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search

These structs are declared in Object and can be used everywhere in UT's UnrealScript. Many of these have operators defined for them.

See Built-In Struct for the UT2003 built-in structs.

GUID[edit]

A globally unique identifier.

struct Guid
{
	var int A, B, C, D;
};

Vector[edit]

A point or direction vector in 3d space.

struct Vector
{
	var() config float X, Y, Z;
};

See Useful Maths Functions for some useful vector assignment operators.

Plane (extends Vector)[edit]

A plane definition in 3D space. See Plane.

struct Plane extends Vector
{
	                       // inherited: normal vector X, Y, Z
	var() config float W;  // distance from origin
};

This could also be used to describe a sphere: X, Y, Z is the location of the sphere's center and W is the radius.

Rotator[edit]

An orthogonal rotation in 3d space. See Rotator.

struct Rotator
{
	var() config int Pitch, Yaw, Roll;
};

Coords[edit]

An arbitrary coordinate system in 3d space.

struct Coords
{
	var() config vector Origin, XAxis, YAxis, ZAxis;
};

Scale[edit]

A scale and sheering.

struct Scale
{
	var() config vector Scale;
	var() config float SheerRate;
	var() config enum ESheerAxis
	{
		SHEER_None,
		SHEER_XY,
		SHEER_XZ,
		SHEER_YX,
		SHEER_YZ,
		SHEER_ZX,
		SHEER_ZY,
	} SheerAxis;
};

Color[edit]

An RGB color.

struct Color
{
	var() config byte R, G, B;  // red, green, blue color components
	var() config byte A;        // alpha component
};

See also the page on custom Color Operators.

Note that many functions and class variables don't use this struct for colours, eg ZoneInfo's ViewFog.

BoundingBox[edit]

A bounding box.

struct BoundingBox
{
	var vector Min, Max;
	var byte IsValid;
};

BoundingVolume[edit]

A bounding box sphere together.

struct BoundingVolume extends BoundingBox
{
	var plane Sphere;
};

Related Topics[edit]