Legacy:Built-In Structs (UT)
These structs are declared in Object and can be used everywhere in UT's UnrealScript.
Many of these have operators defined for them.
GUID
A globally unique identifier.
<uscript> struct Guid { var int A, B, C, D; }; </uscript>
Vector
A point or direction vector in 3d space.
<uscript> struct Vector { var() config float X, Y, Z; }; </uscript>
See Useful Maths Functions for some useful vector assignment operators.
Plane (extends Vector)
A plane definition in 3D space.
<uscript> struct Plane extends Vector { // inherited: normal vector X, Y, Z var() config float W; // distance from origin }; </uscript>
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
An orthogonal rotation in 3d space. See Rotator.
<uscript> struct Rotator { var() config int Pitch, Yaw, Roll; }; </uscript>
Coords
An arbitrary coordinate system in 3d space.
<uscript> struct Coords { var() config vector Origin, XAxis, YAxis, ZAxis; }; </uscript>
Scale
A scale and sheering.
<uscript> 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; }; </uscript>
Color
An RGB color.
<uscript> struct Color { var() config byte R, G, B; // red, green, blue color components var() config byte A; // alpha component }; </uscript>
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
A bounding box.
<uscript> struct BoundingBox { var vector Min, Max; var byte IsValid; }; </uscript>
BoundingVolume
A bounding box sphere together.
<uscript> struct BoundingVolume extends BoundingBox { var plane Sphere; }; </uscript>
Related Topics
- Object class
- Built-In Struct (UT2003)
- Operators