I search for solutions in this order: Past Code, Unreal Source, Wiki, BUF, groups.yahoo, google, screaming at monitor. – RegularX

Difference between revisions of "Legacy:Built-In Structs (UT)"

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
m
m (added to category)
 
(One intermediate revision by one other user not shown)
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.
  
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:Built-In Struct|Built-In Struct]] (UT2003)
 
 
* [[Legacy:Operators|Operators]]
 
* [[Legacy:Operators|Operators]]
 +
 +
[[Category:Legacy Struct|{{PAGENAME}}]]

Latest revision as of 06:25, 12 February 2008

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]