I don't need to test my programs. I have an error-correcting modem.

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

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
m (added to category)
 
m
(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.  Many of these have [[Legacy:Operators|operators]] defined for them.
+
These structs are declared in [[Legacy:Object|Object]] and can be used everywhere in [[Legacy:UT|UT]]'s UnrealScript.
  
See [[Legacy:Built-In Struct|Built-In Struct]] for the UT2003 built-in structs.
+
Many of these have [[Legacy:Operators|operators]] defined for them.
  
 
===GUID ===
 
===GUID ===
Line 29: Line 29:
 
===Plane (extends Vector) ===
 
===Plane (extends Vector) ===
  
A plane definition in 3D space. See [[Legacy:Plane|Plane]].
+
A plane definition in 3D space.
  
 
<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}}]]
 

Revision as of 14:02, 9 November 2002

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.

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.

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;
};

Related Topics