The three virtues of a programmer: Laziness, Impatience, and Hubris. – Larry Wall

UE3:Object static native functions (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UDK Object (static native functions)

Contents

Object static native functions in other games:
RTNP, U1, UT, U2, U2XMP, UE2Runtime, UT2003, UT2004, UT3
Other member categories for this class:
functions, operators, structs

Static native functions[edit]

Abs[edit]

native(186) static final function float Abs (float A)


Acos[edit]

native static final function float Acos (float A)


Asc[edit]

native(237) static final function int Asc (string S)


Asin[edit]

native static final function float Asin (float A)


Atan[edit]

native(190) static final function float Atan (float A)


Atan2[edit]

native static final function float Atan2 (float A, float B)


Caps[edit]

native(235) static final function string Caps (coerce string S)


Chr[edit]

native(236) static final function string Chr (int i)


Clamp[edit]

native(251) static final function int Clamp (int V, int A, int B)


ClampLength[edit]

native static final function Vector ClampLength (Vector V, float MaxLength)

Clamps a vector to not be longer than MaxLength.

ClassIsChildOf[edit]

native(258) static final function bool ClassIsChildOf (Class TestClass, Class ParentClass)

Determine if a class is a child of another class.

Returns:

TRUE if TestClass == ParentClass, or if TestClass is a child of ParentClass; FALSE otherwise, or if either the value for either parameter is 'None'.

Cos[edit]

native(188) static final function float Cos (float A)


DebugBreak[edit]

native static final function DebugBreak (optional int UserFlags, optional EDebugBreakType DebuggerType)

Script-induced breakpoint. Useful for examining state with the debugger at a particular point in script.

Parameters:

  • UserFlags - user-defined flags to be used for e.g. indentifying different calls to DebugBreak in the same session
  • DebuggerType - C++ debugger, UScript debugger, or both

DynamicLoadObject[edit]

native static final function Object DynamicLoadObject (string ObjectName, Class ObjectClass, optional bool MayFail)


Exp[edit]

native(191) static final function float Exp (float A)


FCeil[edit]

native static final function int FCeil (float A)


FClamp[edit]

native(246) static final function float FClamp (float V, float A, float B)


FCubicInterp[edit]

native static final function float FCubicInterp (float P0, float T0, float P1, float T1, float A)

Cubic Spline interpolation.

Parameters:

  • P - end points
  • T - tangent directions at end points
  • Alpha - distance along spline

Returns:

evaluated value.

FFloor[edit]

native static final function int FFloor (float A)


FindObject[edit]

native static final function Object FindObject (string ObjectName, Class ObjectClass)


FInterpConstantTo[edit]

native static final function float FInterpConstantTo (float Current, float Target, float DeltaTime, float InterpSpeed)

Same as above, but using a constant step

FInterpEaseInOut[edit]

native static final function float FInterpEaseInOut (float A, float B, float Alpha, float Exp)

Interpolates with both ease-in and ease-out (smoothly departs A, smoothly approaches B).

Parameters:

  • A - Value to interpolate from.
  • B - Value to interpolate to.
  • Alpha - Interpolant.
  • Exp - Exponent. Higher values result in more rapid acceleration adn deceleration.

Returns:

Interpolated value.

FInterpTo[edit]

native static final function float FInterpTo (float Current, float Target, float DeltaTime, float InterpSpeed)

Tries to reach Target based on distance from Current position, giving a nice smooth feeling when tracking a position. (Doesn't work well when target teleports)

Parameters:

  • Current - Actual position
  • Target - Target position
  • DeltaTime - time since last tick
  • InterpSpeed - Interpolation speed

Returns:

new interpolated position

FMax[edit]

native(245) static final function float FMax (float A, float B)


FMin[edit]

native(244) static final function float FMin (float A, float B)


FRand[edit]

native(195) static final function float FRand ()


GetAngularDistance[edit]

native static final function bool GetAngularDistance (out Vector2D OutAngularDist, Vector Direction, Vector AxisX, Vector AxisY, Vector AxisZ)

Calculates the angular distance of vector 'Direction' to coordinate system O(AxisX,AxisY,AxisZ).

Orientation: (consider 'O' the first person view of the player, and 'Direction' a vector pointing to an enemy) - positive azimuth means enemy is on the right of crosshair. (negative means left). - positive elevation means enemy is on top of crosshair, negative means below.

Parameters:

  • out_AngularDist - X = Azimuth angle (in radians) of 'Direction' vector compared to plane (AxisX,AxisZ). .Y = Elevation angle (in radians) of 'Direction' vector compared to plane (AxisX,AxisY).
  • Direction - Direction of target.
  • AxisX - X component of reference system.
  • AxisY - Y component of reference system.
  • AxisZ - Z component of reference system.

Output: true if 'Direction' is facing AxisX (Direction dot AxisX >= 0.f)

GetAngularFromDotDist[edit]

native static final function GetAngularFromDotDist (out Vector2D OutAngDist, Vector2D DotDist)

Converts Dot distance to angular distance.

Parameters:

  • OutAngDist - Angular distance in radians.
  • DotDist - Dot distance.

See: GetAngularDistance() and GetDotDistance().

GetAxes[edit]

native(229) static final function GetAxes (Rotator A, out Vector X, out Vector Y, out Vector Z)


GetDotDistance[edit]

native static final function bool GetDotDistance (out Vector2D OutDotDist, Vector Direction, Vector AxisX, Vector AxisY, Vector AxisZ)

Calculates the dotted distance of vector 'Direction' to coordinate system O(AxisX,AxisY,AxisZ).

Orientation: (consider 'O' the first person view of the player, and 'Direction' a vector pointing to an enemy) - positive azimuth means enemy is on the right of crosshair. (negative means left). - positive elevation means enemy is on top of crosshair, negative means below.

Parameters:

  • OutDotDist - X = 'Direction' dot AxisX relative to plane (AxisX,AxisZ). (== Cos(Azimuth)) .Y = 'Direction' dot AxisX relative to plane (AxisX,AxisY). (== Sin(Elevation))
  • Direction - direction of target.
  • AxisX - X component of reference system.
  • AxisY - Y component of reference system.
  • AxisZ - Z component of reference system.

Returns:

true if 'Direction' is facing AxisX (Direction dot AxisX >= 0.f)

Note: Azimuth' (.X) sign is changed to represent left/right and not front/behind. front/behind is the funtion's return value.

GetEnum[edit]

native static final function name GetEnum (Object E, coerce int i)


GetFuncName[edit]

native static final function name GetFuncName ()

Returns the current calling function's name, useful for debugging.

GetMappedRangeValue[edit]

static final simulated native function float GetMappedRangeValue (Vector2D InputRange, Vector2D OutputRange, float Value)

Useful for mapping a value in one value range to a different value range. Output is clamped to the OutputRange. e.g. given that velocities [50..100] correspond to a sound volume of [0.2..1.4], find the

    volume for a velocity of 77.

GetPerObjectConfigSections[edit]

native static final function bool GetPerObjectConfigSections (Class SearchClass, out array<stringout_SectionNames, optional Object ObjectOuter, optional int MaxResults)

Retrieve the names of sections which contain data for the specified PerObjectConfig class.

Parameters:

  • SearchClass - the PerObjectConfig class to retrieve sections for.
  • out_SectionNames - will receive the list of section names that correspond to PerObjectConfig sections of the specified class
  • ObjectOuter - the Outer to use for determining which file to look in. Specify the same object that is used when creating the PerObjectConfig objects that sections are being retrieved for. (PerObjectConfig data is generally stored in a file named after the Outer used when creating those objects, unless the PerObjectConfig class specifies a config file in its class declaration); specify None to use the transient package as the Outer.
  • MaxResults - the maximum number of section names to retrieve

Returns:

TRUE if the file specified was found and it contained at least 1 section for the specified class

GetUnAxes[edit]

native(230) static final function GetUnAxes (Rotator A, out Vector X, out Vector Y, out Vector Z)


InStr[edit]

native(126) static final function int InStr (coerce string S, coerce string t, optional bool bSearchFromRight, optional bool bIgnoreCase, optional int StartPos)


InverseTransformNormal[edit]

native static final function Vector InverseTransformNormal (Matrix TM, Vector A)


InverseTransformVector[edit]

native static final function Vector InverseTransformVector (Matrix TM, Vector A)


IsUTracing[edit]

native static final function bool IsUTracing ()

Returns whether script function call trace logging is currently enabled.

IsZero[edit]

native(1501) static final function bool IsZero (Vector A)


Left[edit]

native(128) static final function string Left (coerce string S, int i)


Len[edit]

native(125) static final function int Len (coerce string S)


Lerp[edit]

native(247) static final function float Lerp (float A, float B, float Alpha)


Localize[edit]

native static function string Localize (string SectionName, string KeyName, string PackageName)


Locs[edit]

native(238) static final function string Locs (coerce string S)


Loge[edit]

native(192) static final function float Loge (float A)


LogInternal[edit]

native(231) final static function LogInternal (coerce string S, optional name Tag)

Writes a message to the log. This function should never be called directly - use the `log macro instead, which has the following signature:

log( coerce string Msg, optional bool bCondition=true, optional name LogTag='ScriptLog' );

Parameters:

  • Msg - the string to print to the log
  • bCondition - if specified, the message is only printed to the log if this condition is satisfied.
  • LogTag - if specified, the message will be prepended with this tag in the log file

MakeRotationMatrix[edit]

native static final function Matrix MakeRotationMatrix (Rotator Rotation)


MakeRotationTranslationMatrix[edit]

native static final function Matrix MakeRotationTranslationMatrix (Vector Translation, Rotator Rotation)


MatrixGetAxis[edit]

native static final function Vector MatrixGetAxis (Matrix TM, EAxis Axis)


MatrixGetOrigin[edit]

native static final function Vector MatrixGetOrigin (Matrix TM)


MatrixGetRotator[edit]

native static final function Rotator MatrixGetRotator (Matrix TM)


Max[edit]

native(250) static final function int Max (int A, int B)


Mid[edit]

native(127) static final function string Mid (coerce string S, int i, optional int j)


Min[edit]

native(249) static final function int Min (int A, int B)


MirrorVectorByNormal[edit]

native(300) static final function Vector MirrorVectorByNormal (Vector InVect, Vector InNormal)


Normal[edit]

native(226) static final function Vector Normal (Vector A)


Normalize[edit]

native static final function Rotator Normalize (Rotator Rot)


NormalizeRotAxis[edit]

native static final function int NormalizeRotAxis (int Angle)

Returns a Rotator axis within the [-32768,+32767] range in float

Parameters:

  • RotAxis - axis of the rotator

Returns:

Normalized axis value, within the [-32768,+32767] range.

OrthoRotation[edit]

native static final function Rotator OrthoRotation (Vector X, Vector Y, Vector Z)


ParseStringIntoArray[edit]

native static final function ParseStringIntoArray (string BaseString, out array<stringPieces, string Delim, bool bCullEmpty)

Breaks up a delimited string into elements of a string array.

Parameters:

  • BaseString - The string to break up
  • Pieces - The array to fill with the string pieces
  • Delim - The string to delimit on
  • bCullEmpty - If true, empty strings are not added to the array

PathName[edit]

native static final function string PathName (Object CheckObject)

Returns the full path name of the specified object (including package and groups), ie CheckObject::GetPathName().

PointProjectToPlane[edit]

native static final function Vector PointProjectToPlane (Vector Point, Vector A, Vector B, Vector C)

Calculates a point's projection onto a plane

Parameters:

  • Point - point to project onto the plane
  • A - point on plane
  • B - point on plane
  • C - point on plane

Returns:

projection of point onto the plane defined by ABC

ProjectOnTo[edit]

native(1500) static final function Vector ProjectOnTo (Vector x, Vector y)


QuatDot[edit]

native static final function float QuatDot (Quat A, Quat B)


QuatFindBetween[edit]

native static final function Quat QuatFindBetween (Vector A, Vector B)


QuatFromAxisAndAngle[edit]

native static final function Quat QuatFromAxisAndAngle (Vector Axis, float Angle)


QuatFromRotator[edit]

native static final function Quat QuatFromRotator (Rotator A)


QuatInvert[edit]

native static final function Quat QuatInvert (Quat A)


QuatProduct[edit]

native static final function Quat QuatProduct (Quat A, Quat B)


QuatRotateVector[edit]

native static final function Vector QuatRotateVector (Quat A, Vector B)


QuatSlerp[edit]

native static final function Quat QuatSlerp (Quat A, Quat B, float Alpha, optional bool bShortestPath)


QuatToRotator[edit]

native static final function Rotator QuatToRotator (Quat A)


Rand[edit]

native(167) static final function int Rand (int Max)

Rand will give you a value between 0 and Max -1 *

RDiff[edit]

native static final function float RDiff (Rotator A, Rotator B)

Gives the rotation difference between two Rotators, taking the shortest route between them (in degrees).

Repl[edit]

native(201) static final function string Repl (coerce string Src, coerce string Match, coerce string With, optional bool bCaseSensitive)


Right[edit]

native(234) static final function string Right (coerce string S, int i)


RInterpTo[edit]

native static final function Rotator RInterpTo (Rotator Current, Rotator Target, float DeltaTime, float InterpSpeed, optional bool bConstantInterpSpeed)

Tries to reach Target based on distance from Current position, giving a nice smooth feeling when tracking a position. (Doesn't work well when target teleports)

Parameters:

  • Current - Actual position
  • Target - Target position
  • DeltaTime - time since last tick
  • InterpSpeed - Interpolation speed, if !bConstantInterpSpeed will perform a continuous lerp, otherwise will interp at constant speed

Returns:

new interpolated position

RLerp[edit]

native static final function Rotator RLerp (Rotator A, Rotator B, float Alpha, optional bool bShortestPath)


RotRand[edit]

native(320) static final function Rotator RotRand (optional bool bRoll)


Round[edit]

native(199) static final function int Round (float A)


RSmerp[edit]

native static final function Rotator RSmerp (Rotator A, Rotator B, float Alpha, optional bool bShortestPath)


RTransform[edit]

native static final function Rotator RTransform (Rotator R, Rotator RBasis)

Given rotation R in the space defined by RBasis, return R in "world" space

ScriptTrace[edit]

native static final function ScriptTrace ()

Dumps the current script function stack to the log file, useful for debugging.

SetUTracing[edit]

native static final function SetUTracing (bool bShouldUTrace)

Enables/disables script function call trace logging.

Sin[edit]

native(187) static final function float Sin (float A)


Sqrt[edit]

native(193) static final function float Sqrt (float A)


Square[edit]

native(194) static final function float Square (float A)


StaticSaveConfig[edit]

native static final function StaticSaveConfig ()


Tan[edit]

native(189) static final function float Tan (float A)


ToHex[edit]

native static final function string ToHex (int A)


TransformNormal[edit]

native static final function Vector TransformNormal (Matrix TM, Vector A)


TransformVector[edit]

native static final function Vector TransformVector (Matrix TM, Vector A)


VInterpTo[edit]

native static final function Vector VInterpTo (Vector Current, Vector Target, float DeltaTime, float InterpSpeed)

Tries to reach Target based on distance from Current position, giving a nice smooth feeling when tracking a location. (Doesn't work well when target teleports)

Parameters:

  • Current - Actual location
  • Target - Target location
  • DeltaTime - time since last tick
  • InterpSpeed - Interpolation speed

Returns:

new interpolated position

VLerp[edit]

native static final function Vector VLerp (Vector A, Vector B, float Alpha)


VRand[edit]

native(252) static final function Vector VRand ()


VRandCone[edit]

native static final function Vector VRandCone (Vector Dir, float ConeHalfAngleRadians)


VRandCone2[edit]

native static final function Vector VRandCone2 (Vector Dir, float HorizontalConeHalfAngleRadians, float VerticalConeHalfAngleRadians)


VSize[edit]

native(225) static final function float VSize (Vector A)


VSize2D[edit]

native static final function float VSize2D (Vector A)


VSizeSq[edit]

native static final function float VSizeSq (Vector A)


VSizeSq2D[edit]

native static final function float VSizeSq2D (Vector A)


VSmerp[edit]

native static final function Vector VSmerp (Vector A, Vector B, float Alpha)


WarnInternal[edit]

native(232) final static function WarnInternal (coerce string S)

Same as calling LogInternal(SomeMsg, 'Warning'); This function should never be called directly - use the `warn macro instead, which has the following signature:

warn( coerce string Msg, optional bool bCondition=true );