Always snap to grid
Difference between revisions of "Legacy:Built-In Structs (UT)"
m |
(Moved UT2003 link. Added plane link.) |
||
Line 1: | Line 1: | ||
− | These structs are declared in [[Legacy:Object|Object]] and can be used everywhere in [[Legacy:UT|UT]]'s UnrealScript. | + | These structs are declared in [[Legacy:Object|Object]] and can be used everywhere in [[Legacy:UT|UT]]'s UnrealScript. Many of these have [[Legacy:Operators|operators]] defined for them. |
− | + | See [[Legacy:Built-In Struct|Built-In Struct]] for the UT2003 built-in structs. | |
===GUID === | ===GUID === | ||
Line 29: | Line 29: | ||
===Plane (extends Vector) === | ===Plane (extends Vector) === | ||
− | A plane definition in 3D space. | + | A plane definition in 3D space. See [[Legacy:Plane|Plane]]. |
<uscript> | <uscript> | ||
Line 126: | Line 126: | ||
==Related Topics == | ==Related Topics == | ||
* [[Legacy:Object|Object]] class | * [[Legacy:Object|Object]] class | ||
− | |||
* [[Legacy:Operators|Operators]] | * [[Legacy:Operators|Operators]] |
Revision as of 07:47, 20 August 2003
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.
Contents
GUID
A globally unique identifier.
struct Guid { var int A, B, C, D; };
Vector
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)
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
An orthogonal rotation in 3d space. See Rotator.
struct Rotator { var() config int Pitch, Yaw, Roll; };
Coords
An arbitrary coordinate system in 3d space.
struct Coords { var() config vector Origin, XAxis, YAxis, ZAxis; };
Scale
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
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
A bounding box.
struct BoundingBox { var vector Min, Max; var byte IsValid; };
BoundingVolume
A bounding box sphere together.
struct BoundingVolume extends BoundingBox { var plane Sphere; };