Core
Class Object

source: e:\games\UnrealTournament\Core\Classes\Object.uc
Direct Known Subclasses:Commandlet, Locale, Subsystem, Time, BrushBuilder, Actor, Bitmap, Canvas, Console, LevelSummary, Palette, Player, RenderIterator, TestObj, UTExtraKeyBindings, ListItem, WebApplication, WebRequest, WebResponse, UWindowBase

class Object

//============================================================================= // Object: The base class all objects. // This is a built-in Unreal class and it shouldn't be modified. //=============================================================================
Variables
 int ObjectFlags
 int ObjectInternal[6]
 Object Outer


Function Summary
 float Abs(float A)
     
// Float functions.
 int Asc(string S)
 float Atan(float A)
 string Caps(string S)
 string Chr(int i)
 int Clamp(int V, int A, int B)
 bool ClassIsChildOf(class TestClass, class ParentClass)
     
// Objects.
 float Cos(float A)
 void Disable(name ProbeFunc)
 Object DynamicLoadObject(string ObjectName, class ObjectClass, optional bool)
 void Enable(name ProbeFunc)
     
// Probe messages.
 float Exp(float A)
 float FClamp(float V, float A, float B)
 float FMax(float A, float B)
 float FMin(float A, float B)
 float FRand()
 void GetAxes(rotator A, out vector, out vector, out vector)
     
// Rotator operators and functions.
 name GetEnum(Object E, int i)
 string GetPropertyText(string PropName)
     
// Properties.
 name GetStateName()
 void GetUnAxes(rotator A, out vector, out vector, out vector)
 void GotoState(optional name, optional name)
     
// Goto state and label.
 int InStr(string S, string t)
 void Invert(out vector, out vector, out vector)
 bool IsA(name ClassName)
 bool IsInState(name TestState)
 string Left(string S, int i)
 int Len(string S)
     
// String functions.
 float Lerp(float Alpha, float A, float B)
 string Localize(string SectionName, string KeyName, string PackageName)
 void Log(string S, optional name)
     
// Logging.
 float Loge(float A)
 int Max(int A, int B)
 string Mid(string S, int i, optional int)
 int Min(int A, int B)
 vector MirrorVectorByNormal(vector Vect, vector Normal)
 vector Normal(vector A)
 rotator Normalize(rotator Rot)
 rotator OrthoRotation(vector X, vector Y, vector Z)
 int Rand(int Max)
     
// Integer functions.
 float RandRange(float Min, float Max)
     
// Return a random number within the given range.
//#if 1 //Fix added by Legend on 4/12/2000
 void ResetConfig()
 string Right(string S, int i)
 rotator RotRand(optional bool)
 void SaveConfig()
     
// Configuration.
 void SetPropertyText(string PropName, string PropValue)
 float Sin(float A)
 float Smerp(float Alpha, float A, float B)
 float Sqrt(float A)
 float Square(float A)
 void StaticSaveConfig()
 float Tan(float A)
 vector VRand( )
 float VSize(vector A)
     
// Vector functions.
 void Warn(string S)



Source Code


00001	//=============================================================================
00002	// Object: The base class all objects.
00003	// This is a built-in Unreal class and it shouldn't be modified.
00004	//=============================================================================
00005	class Object
00006		native
00007		noexport;
00008	
00009	//=============================================================================
00010	// UObject variables.
00011	
00012	// Internal variables.
00013	var native private const int ObjectInternal[6];
00014	var native const object Outer;
00015	var native const int ObjectFlags;
00016	var(Object) native const editconst name Name;
00017	var(Object) native const editconst class Class;
00018	
00019	//=============================================================================
00020	// Unreal base structures.
00021	
00022	// Object flags.
00023	const RF_Transactional	= 0x00000001; // Supports editor undo/redo.
00024	const RF_Public         = 0x00000004; // Can be referenced by external package files.
00025	const RF_Transient      = 0x00004000; // Can't be saved or loaded.
00026	const RF_NotForClient	= 0x00100000; // Don't load for game client.
00027	const RF_NotForServer	= 0x00200000; // Don't load for game server.
00028	const RF_NotForEdit		= 0x00400000; // Don't load for editor.
00029	
00030	// A globally unique identifier.
00031	struct Guid
00032	{
00033		var int A, B, C, D;
00034	};
00035	
00036	// A point or direction vector in 3d space.
00037	struct Vector
00038	{
00039		var() config float X, Y, Z;
00040	};
00041	
00042	// A plane definition in 3d space.
00043	struct Plane extends Vector
00044	{
00045		var() config float W;
00046	};
00047	
00048	// An orthogonal rotation in 3d space.
00049	struct Rotator
00050	{
00051		var() config int Pitch, Yaw, Roll;
00052	};
00053	
00054	// An arbitrary coordinate system in 3d space.
00055	struct Coords
00056	{
00057		var() config vector Origin, XAxis, YAxis, ZAxis;
00058	};
00059	
00060	// A scale and sheering.
00061	struct Scale
00062	{
00063		var() config vector Scale;
00064		var() config float SheerRate;
00065		var() config enum ESheerAxis
00066		{
00067			SHEER_None,
00068			SHEER_XY,
00069			SHEER_XZ,
00070			SHEER_YX,
00071			SHEER_YZ,
00072			SHEER_ZX,
00073			SHEER_ZY,
00074		} SheerAxis;
00075	};
00076	
00077	// A color.
00078	struct Color
00079	{
00080		var() config byte R, G, B, A;
00081	};
00082	
00083	// A bounding box.
00084	struct BoundingBox
00085	{
00086		var vector Min, Max;
00087		var byte IsValid;
00088	};
00089	
00090	// A bounding box sphere together.
00091	struct BoundingVolume extends boundingbox
00092	{
00093		var plane Sphere;
00094	};
00095	
00096	//=============================================================================
00097	// Constants.
00098	
00099	const MaxInt = 0x7fffffff;
00100	const Pi     = 3.1415926535897932;
00101	
00102	//=============================================================================
00103	// Basic native operators and functions.
00104	
00105	// Bool operators.
00106	native(129) static final preoperator  bool  !  ( bool A );
00107	native(242) static final operator(24) bool  == ( bool A, bool B );
00108	native(243) static final operator(26) bool  != ( bool A, bool B );
00109	native(130) static final operator(30) bool  && ( bool A, skip bool B );
00110	native(131) static final operator(30) bool  ^^ ( bool A, bool B );
00111	native(132) static final operator(32) bool  || ( bool A, skip bool B );
00112	
00113	// Byte operators.
00114	native(133) static final operator(34) byte *= ( out byte A, byte B );
00115	native(134) static final operator(34) byte /= ( out byte A, byte B );
00116	native(135) static final operator(34) byte += ( out byte A, byte B );
00117	native(136) static final operator(34) byte -= ( out byte A, byte B );
00118	native(137) static final preoperator  byte ++ ( out byte A );
00119	native(138) static final preoperator  byte -- ( out byte A );
00120	native(139) static final postoperator byte ++ ( out byte A );
00121	native(140) static final postoperator byte -- ( out byte A );
00122	
00123	// Integer operators.
00124	native(141) static final preoperator  int  ~  ( int A );
00125	native(143) static final preoperator  int  -  ( int A );
00126	native(144) static final operator(16) int  *  ( int A, int B );
00127	native(145) static final operator(16) int  /  ( int A, int B );
00128	native(146) static final operator(20) int  +  ( int A, int B );
00129	native(147) static final operator(20) int  -  ( int A, int B );
00130	native(148) static final operator(22) int  << ( int A, int B );
00131	native(149) static final operator(22) int  >> ( int A, int B );
00132	native(196) static final operator(22) int  >>>( int A, int B );
00133	native(150) static final operator(24) bool <  ( int A, int B );
00134	native(151) static final operator(24) bool >  ( int A, int B );
00135	native(152) static final operator(24) bool <= ( int A, int B );
00136	native(153) static final operator(24) bool >= ( int A, int B );
00137	native(154) static final operator(24) bool == ( int A, int B );
00138	native(155) static final operator(26) bool != ( int A, int B );
00139	native(156) static final operator(28) int  &  ( int A, int B );
00140	native(157) static final operator(28) int  ^  ( int A, int B );
00141	native(158) static final operator(28) int  |  ( int A, int B );
00142	native(159) static final operator(34) int  *= ( out int A, float B );
00143	native(160) static final operator(34) int  /= ( out int A, float B );
00144	native(161) static final operator(34) int  += ( out int A, int B );
00145	native(162) static final operator(34) int  -= ( out int A, int B );
00146	native(163) static final preoperator  int  ++ ( out int A );
00147	native(164) static final preoperator  int  -- ( out int A );
00148	native(165) static final postoperator int  ++ ( out int A );
00149	native(166) static final postoperator int  -- ( out int A );
00150	
00151	// Integer functions.
00152	native(167) static final Function     int  Rand  ( int Max );
00153	native(249) static final function     int  Min   ( int A, int B );
00154	native(250) static final function     int  Max   ( int A, int B );
00155	native(251) static final function     int  Clamp ( int V, int A, int B );
00156	
00157	// Float operators.
00158	native(169) static final preoperator  float -  ( float A );
00159	native(170) static final operator(12) float ** ( float A, float B );
00160	native(171) static final operator(16) float *  ( float A, float B );
00161	native(172) static final operator(16) float /  ( float A, float B );
00162	native(173) static final operator(18) float %  ( float A, float B );
00163	native(174) static final operator(20) float +  ( float A, float B );
00164	native(175) static final operator(20) float -  ( float A, float B );
00165	native(176) static final operator(24) bool  <  ( float A, float B );
00166	native(177) static final operator(24) bool  >  ( float A, float B );
00167	native(178) static final operator(24) bool  <= ( float A, float B );
00168	native(179) static final operator(24) bool  >= ( float A, float B );
00169	native(180) static final operator(24) bool  == ( float A, float B );
00170	native(210) static final operator(24) bool  ~= ( float A, float B );
00171	native(181) static final operator(26) bool  != ( float A, float B );
00172	native(182) static final operator(34) float *= ( out float A, float B );
00173	native(183) static final operator(34) float /= ( out float A, float B );
00174	native(184) static final operator(34) float += ( out float A, float B );
00175	native(185) static final operator(34) float -= ( out float A, float B );
00176	
00177	// Float functions.
00178	native(186) static final function     float Abs   ( float A );
00179	native(187) static final function     float Sin   ( float A );
00180	native(188) static final function     float Cos   ( float A );
00181	native(189) static final function     float Tan   ( float A );
00182	native(190) static final function     float Atan  ( float A );
00183	native(191) static final function     float Exp   ( float A );
00184	native(192) static final function     float Loge  ( float A );
00185	native(193) static final function     float Sqrt  ( float A );
00186	native(194) static final function     float Square( float A );
00187	native(195) static final function     float FRand ();
00188	native(244) static final function     float FMin  ( float A, float B );
00189	native(245) static final function     float FMax  ( float A, float B );
00190	native(246) static final function     float FClamp( float V, float A, float B );
00191	native(247) static final function     float Lerp  ( float Alpha, float A, float B );
00192	native(248) static final function     float Smerp ( float Alpha, float A, float B );
00193	
00194	// Vector operators.
00195	native(211) static final preoperator  vector -     ( vector A );
00196	native(212) static final operator(16) vector *     ( vector A, float B );
00197	native(213) static final operator(16) vector *     ( float A, vector B );
00198	native(296) static final operator(16) vector *     ( vector A, vector B );
00199	native(214) static final operator(16) vector /     ( vector A, float B );
00200	native(215) static final operator(20) vector +     ( vector A, vector B );
00201	native(216) static final operator(20) vector -     ( vector A, vector B );
00202	native(275) static final operator(22) vector <<    ( vector A, rotator B );
00203	native(276) static final operator(22) vector >>    ( vector A, rotator B );
00204	native(217) static final operator(24) bool   ==    ( vector A, vector B );
00205	native(218) static final operator(26) bool   !=    ( vector A, vector B );
00206	native(219) static final operator(16) float  Dot   ( vector A, vector B );
00207	native(220) static final operator(16) vector Cross ( vector A, vector B );
00208	native(221) static final operator(34) vector *=    ( out vector A, float B );
00209	native(297) static final operator(34) vector *=    ( out vector A, vector B );
00210	native(222) static final operator(34) vector /=    ( out vector A, float B );
00211	native(223) static final operator(34) vector +=    ( out vector A, vector B );
00212	native(224) static final operator(34) vector -=    ( out vector A, vector B );
00213	
00214	// Vector functions.
00215	native(225) static final function float  VSize  ( vector A );
00216	native(226) static final function vector Normal ( vector A );
00217	native(227) static final function        Invert ( out vector X, out vector Y, out vector Z );
00218	native(252) static final function vector VRand  ( );
00219	native(300) static final function vector MirrorVectorByNormal( vector Vect, vector Normal );
00220	
00221	// Rotator operators and functions.
00222	native(142) static final operator(24) bool ==     ( rotator A, rotator B );
00223	native(203) static final operator(26) bool !=     ( rotator A, rotator B );
00224	native(287) static final operator(16) rotator *   ( rotator A, float    B );
00225	native(288) static final operator(16) rotator *   ( float    A, rotator B );
00226	native(289) static final operator(16) rotator /   ( rotator A, float    B );
00227	native(290) static final operator(34) rotator *=  ( out rotator A, float B  );
00228	native(291) static final operator(34) rotator /=  ( out rotator A, float B  );
00229	native(316) static final operator(20) rotator +   ( rotator A, rotator B );
00230	native(317) static final operator(20) rotator -   ( rotator A, rotator B );
00231	native(318) static final operator(34) rotator +=  ( out rotator A, rotator B );
00232	native(319) static final operator(34) rotator -=  ( out rotator A, rotator B );
00233	native(229) static final function GetAxes         ( rotator A, out vector X, out vector Y, out vector Z );
00234	native(230) static final function GetUnAxes       ( rotator A, out vector X, out vector Y, out vector Z );
00235	native(320) static final function rotator RotRand ( optional bool bRoll );
00236	native      static final function rotator OrthoRotation( vector X, vector Y, vector Z );
00237	native      static final function rotator Normalize( rotator Rot );
00238	
00239	// String operators.
00240	native(112) static final operator(40) string $  ( coerce string A, coerce string B );
00241	native(168) static final operator(40) string @  ( coerce string A, coerce string B );
00242	native(115) static final operator(24) bool   <  ( string A, string B );
00243	native(116) static final operator(24) bool   >  ( string A, string B );
00244	native(120) static final operator(24) bool   <= ( string A, string B );
00245	native(121) static final operator(24) bool   >= ( string A, string B );
00246	native(122) static final operator(24) bool   == ( string A, string B );
00247	native(123) static final operator(26) bool   != ( string A, string B );
00248	native(124) static final operator(24) bool   ~= ( string A, string B );
00249	
00250	// String functions.
00251	native(125) static final function int    Len    ( coerce string S );
00252	native(126) static final function int    InStr  ( coerce string S, coerce string t );
00253	native(127) static final function string Mid    ( coerce string S, int i, optional int j );
00254	native(128) static final function string Left   ( coerce string S, int i );
00255	native(234) static final function string Right  ( coerce string S, int i );
00256	native(235) static final function string Caps   ( coerce string S );
00257	native(236) static final function string Chr    ( int i );
00258	native(237) static final function int    Asc    ( string S );
00259	
00260	// Object operators.
00261	native(114) static final operator(24) bool == ( Object A, Object B );
00262	native(119) static final operator(26) bool != ( Object A, Object B );
00263	
00264	// Name operators.
00265	native(254) static final operator(24) bool == ( name A, name B );
00266	native(255) static final operator(26) bool != ( name A, name B );
00267	
00268	//=============================================================================
00269	// General functions.
00270	
00271	// Logging.
00272	native(231) final static function Log( coerce string S, optional name Tag );
00273	native(232) final static function Warn( coerce string S );
00274	native static function string Localize( string SectionName, string KeyName, string PackageName );
00275	
00276	// Goto state and label.
00277	native(113) final function GotoState( optional name NewState, optional name Label );
00278	native(281) final function bool IsInState( name TestState );
00279	native(284) final function name GetStateName();
00280	
00281	// Objects.
00282	native(258) static final function bool ClassIsChildOf( class TestClass, class ParentClass );
00283	native(303) final function bool IsA( name ClassName );
00284	
00285	// Probe messages.
00286	native(117) final function Enable( name ProbeFunc );
00287	native(118) final function Disable( name ProbeFunc );
00288	
00289	// Properties.
00290	native final function string GetPropertyText( string PropName );
00291	native final function SetPropertyText( string PropName, string PropValue );
00292	native static final function name GetEnum( object E, int i );
00293	native static final function object DynamicLoadObject( string ObjectName, class ObjectClass, optional bool MayFail );
00294	
00295	// Configuration.
00296	native(536) final function SaveConfig();
00297	native static final function StaticSaveConfig();
00298	native static final function ResetConfig();
00299	
00300	// Return a random number within the given range.
00301	//#if 1 //Fix added by Legend on 4/12/2000
00302	native(1033) final function float RandRange( float Min, float Max );
00303	//#else
00304	//final function float RandRange( float Min, float Max )
00305	//{
00306	//    return Min + (Max - Min) * FRand();
00307	//}
00308	//#endif
00309	
00310	//=============================================================================
00311	// Engine notification functions.
00312	
00313	//
00314	// Called immediately when entering a state, while within
00315	// the GotoState call that caused the state change.
00316	//
00317	event BeginState();
00318	
00319	//
00320	// Called immediately before going out of the current state,
00321	// while within the GotoState call that caused the state change.
00322	// 
00323	event EndState();
00324	
00325	defaultproperties
00326	{
00327	}

End Source Code