Structure for all math helper functions, inherits from platform math to pick up platform-specific implementations Check GenericPlatformMath.h for additional math functions
更多...
|
| static CORE_API void | ApplyScaleToFloat (float &Dst, const FVector &DeltaScale, float Magnitude=1.0f) |
| | Handy to apply scaling in the editor 更多...
|
| |
|
template<class T , class U > |
| static FORCEINLINE_DEBUGGABLE T | BiLerp (const T &P00, const T &P10, const T &P01, const T &P11, const U &FracX, const U &FracY) |
| | Performs a 2D linear interpolation between four values values, FracX, FracY ranges from 0-1
|
| |
|
static FORCEINLINE void | CartesianToPolar (const float X, const float Y, float &OutRad, float &OutAng) |
| | Converts given Cartesian coordinate pair to Polar coordinate system.
|
| |
|
static FORCEINLINE void | CartesianToPolar (const FVector2D InCart, FVector2D &OutPolar) |
| | Converts given Cartesian coordinate pair to Polar coordinate system.
|
| |
| static CORE_API FLinearColor | CInterpTo (const FLinearColor &Current, const FLinearColor &Target, float DeltaTime, float InterpSpeed) |
| | Interpolate Linear Color from Current to Target. 更多...
|
| |
|
template<class T > |
| static UE_NODISCARD FORCEINLINE T | Clamp (const T X, const T Min, const T Max) |
| | Clamps X to be between Min and Max, inclusive
|
| |
| static CORE_API float | ClampAngle (float AngleDegrees, float MinAngleDegrees, float MaxAngleDegrees) |
| | Clamps an arbitrary angle to be between the given angles. 更多...
|
| |
|
static CORE_API FVector | ClosestPointOnInfiniteLine (const FVector &LineStart, const FVector &LineEnd, const FVector &Point) |
| | Find the point on the infinite line between two points (LineStart, LineEnd) which is closest to Point
|
| |
|
static CORE_API FVector | ClosestPointOnLine (const FVector &LineStart, const FVector &LineEnd, const FVector &Point) |
| | Find the point on the line segment from LineStart to LineEnd which is closest to Point
|
| |
| static CORE_API FVector | ClosestPointOnSegment (const FVector &Point, const FVector &StartPoint, const FVector &EndPoint) |
| | Returns closest point on a segment to a given point. 更多...
|
| |
| static CORE_API FVector2D | ClosestPointOnSegment2D (const FVector2D &Point, const FVector2D &StartPoint, const FVector2D &EndPoint) |
| | FVector2D version of ClosestPointOnSegment. 更多...
|
| |
| static CORE_API FVector | ClosestPointOnTetrahedronToPoint (const FVector &Point, const FVector &A, const FVector &B, const FVector &C, const FVector &D) |
| | Returns closest point on a tetrahedron to a point. 更多...
|
| |
| static CORE_API FVector | ClosestPointOnTriangleToPoint (const FVector &Point, const FVector &A, const FVector &B, const FVector &C) |
| | Returns closest point on a triangle to a point. 更多...
|
| |
| static CORE_API FVector | ComputeBaryCentric2D (const FVector &Point, const FVector &A, const FVector &B, const FVector &C) |
| | Computes the barycentric coordinates for a given point in a triangle 更多...
|
| |
| static CORE_API FVector4 | ComputeBaryCentric3D (const FVector &Point, const FVector &A, const FVector &B, const FVector &C, const FVector &D) |
| | Computes the barycentric coordinates for a given point on a tetrahedron (3D) 更多...
|
| |
|
static FSphere | ComputeBoundingSphereForCone (FVector const &ConeOrigin, FVector const &ConeDirection, float ConeRadius, float CosConeAngle, float SinConeAngle) |
| | Computes minimal bounding sphere encompassing given cone
|
| |
| template<class U > |
| static FQuat | CubicInterp (const FQuat &P0, const FQuat &T0, const FQuat &P1, const FQuat &T1, const U &A) |
| | In the case of quaternions, we use a bezier like approach. 更多...
|
| |
| template<class T , class U > |
| static FORCEINLINE_DEBUGGABLE T | CubicInterp (const T &P0, const T &T0, const T &P1, const T &T1, const U &A) |
| | Performs a cubic interpolation 更多...
|
| |
| template<class T , class U > |
| static FORCEINLINE_DEBUGGABLE T | CubicInterpDerivative (const T &P0, const T &T0, const T &P1, const T &T1, const U &A) |
| | Performs a first derivative cubic interpolation 更多...
|
| |
| template<class T , class U > |
| static FORCEINLINE_DEBUGGABLE T | CubicInterpSecondDerivative (const T &P0, const T &T0, const T &P1, const T &T1, const U &A) |
| | Performs a second derivative cubic interpolation 更多...
|
| |
| template<class T > |
| static FORCEINLINE auto | DegreesToRadians (T const &DegVal) -> decltype(DegVal *(PI/180.f)) |
| | Converts degrees to radians. 更多...
|
| |
|
template<class T > |
| static FORCEINLINE T | DivideAndRoundDown (T Dividend, T Divisor) |
| | Divides two integers and rounds down
|
| |
|
template<class T > |
| static FORCEINLINE T | DivideAndRoundNearest (T Dividend, T Divisor) |
| | Divides two integers and rounds to nearest
|
| |
|
template<class T > |
| static FORCEINLINE T | DivideAndRoundUp (T Dividend, T Divisor) |
| | Divides two integers and rounds up
|
| |
| static CORE_API float | DynamicWeightedMovingAverage (float CurrentSample, float PreviousSample, float MaxDistance, float MinWeight, float MaxWeight) |
| | Calculates the new value in a weighted moving average series using the previous value and a weight range. 更多...
|
| |
| static CORE_API bool | Eval (FString Str, float &OutValue) |
| | Evaluates a numerical equation. 更多...
|
| |
|
static bool | ExtractBoolFromBitfield (uint8 *Ptr, uint32 Index) |
| | Get a bit in memory created from bitflags (uint32 Value:1), used for EngineShowFlags, TestBitFieldFunctions() tests the implementation
|
| |
| static FORCEINLINE float | FastAsin (float Value) |
| | Computes the ASin of a scalar value. 更多...
|
| |
|
static float | FindDeltaAngleDegrees (float A1, float A2) |
| | Find the smallest angle between two headings (in degrees)
|
| |
|
static float | FindDeltaAngleRadians (float A1, float A2) |
| | Find the smallest angle between two headings (in radians)
|
| |
|
static CORE_API float | FInterpConstantTo (float Current, float Target, float DeltaTime, float InterpSpeed) |
| | Interpolate float from Current to Target with constant step
|
| |
| static CORE_API float | FInterpTo (float Current, float Target, float DeltaTime, float InterpSpeed) |
| | Interpolate float from Current to Target. 更多...
|
| |
| static CORE_API float | FixedTurn (float InCurrent, float InDesired, float InDeltaRate) |
| | Returns a new rotation component value 更多...
|
| |
|
static FORCEINLINE double | Floor (double F) |
| | Converts a double to a nearest less or equal integer.
|
| |
|
static FORCEINLINE float | Floor (float F) |
| | Converts a float to a nearest less or equal integer.
|
| |
| template<typename IntegralType , typename TEnableIf< TIsIntegral< IntegralType >::Value >::Type * = nullptr> |
| static FORCEINLINE IntegralType | Floor (IntegralType I) |
| | Converts an integral type to a nearest less or equal integer. 更多...
|
| |
| static CORE_API FString | FormatIntToHumanReadable (int32 Val) |
| | Formats an integer value into a human readable string (i.e. 更多...
|
| |
|
static FORCEINLINE float | FRandRange (float InMin, float InMax) |
| | Util to generate a random number in a range.
|
| |
| static CORE_API FVector2D | GetAzimuthAndElevation (const FVector &Direction, const FVector &AxisX, const FVector &AxisY, const FVector &AxisZ) |
| | Returns Azimuth and Elevation of vector 'Direction' in coordinate system O(AxisX,AxisY,AxisZ). 更多...
|
| |
| static CORE_API FVector | GetBaryCentric2D (const FVector &Point, const FVector &A, const FVector &B, const FVector &C) |
| | Computes the barycentric coordinates for a given point in a triangle - simpler version 更多...
|
| |
| static CORE_API bool | GetDistanceWithinConeSegment (FVector Point, FVector ConeStartPoint, FVector ConeLine, float RadiusAtStart, float RadiusAtEnd, float &PercentageOut) |
| | Calculates whether a Point is within a cone segment, and also what percentage within the cone (100% is along the center line, whereas 0% is along the edge) 更多...
|
| |
| static CORE_API bool | GetDotDistance (FVector2D &OutDotDist, const FVector &Direction, const FVector &AxisX, const FVector &AxisY, const FVector &AxisZ) |
| | Calculates the dotted distance of vector 'Direction' to coordinate system O(AxisX,AxisY,AxisZ). 更多...
|
| |
|
static FORCEINLINE float | GetMappedRangeValueClamped (const FVector2D &InputRange, const FVector2D &OutputRange, const float Value) |
| | For the given Value clamped to the [Input:Range] inclusive, returns the corresponding percentage in [Output:Range] Inclusive.
|
| |
|
static FORCEINLINE float | GetMappedRangeValueUnclamped (const FVector2D &InputRange, const FVector2D &OutputRange, const float Value) |
| | Transform the given Value relative to the input range to the Output Range.
|
| |
|
static float | GetRangePct (FVector2D const &Range, float Value) |
| | Same as above, but taking a 2d vector as the range.
|
| |
|
template<typename T > |
| static FORCEINLINE TEnableIf< TIsFloatingPoint< T >::Value, T >::Type | GetRangePct (T MinValue, T MaxValue, T Value) |
| | Calculates the percentage along a line from MinValue to MaxValue that Value is.
|
| |
|
static float | GetRangeValue (FVector2D const &Range, float Pct) |
| | Basically a Vector2d version of Lerp.
|
| |
| static CORE_API FVector | GetReflectionVector (const FVector &Direction, const FVector &SurfaceNormal) |
| | Given a direction vector and a surface normal, returns the vector reflected across the surface normal. 更多...
|
| |
| static CORE_API float | GetTForSegmentPlaneIntersect (const FVector &StartPoint, const FVector &EndPoint, const FPlane &Plane) |
| | returns the time (t) of the intersection of the passed segment and a plane (could be <0 or >1) 更多...
|
| |
|
template<class T > |
| static FORCEINLINE T | GridSnap (T Location, T Grid) |
| | Snaps a value to the nearest grid multiple
|
| |
|
template<class T > |
| static FORCEINLINE_DEBUGGABLE T | InterpCircularIn (const T &A, const T &B, float Alpha) |
| | Interpolation between A and B, applying a circular in function.
|
| |
|
template<class T > |
| static FORCEINLINE_DEBUGGABLE T | InterpCircularInOut (const T &A, const T &B, float Alpha) |
| | Interpolation between A and B, applying a circular in/out function.
|
| |
|
template<class T > |
| static FORCEINLINE_DEBUGGABLE T | InterpCircularOut (const T &A, const T &B, float Alpha) |
| | Interpolation between A and B, applying a circular out function.
|
| |
| template<class T > |
| static FORCEINLINE_DEBUGGABLE T | InterpEaseIn (const T &A, const T &B, float Alpha, float Exp) |
| | Interpolate between A and B, applying an ease in function. 更多...
|
| |
| template<class T > |
| static FORCEINLINE_DEBUGGABLE T | InterpEaseInOut (const T &A, const T &B, float Alpha, float Exp) |
| | Interpolate between A and B, applying an ease in/out function. 更多...
|
| |
| template<class T > |
| static FORCEINLINE_DEBUGGABLE T | InterpEaseOut (const T &A, const T &B, float Alpha, float Exp) |
| | Interpolate between A and B, applying an ease out function. 更多...
|
| |
|
template<class T > |
| static FORCEINLINE_DEBUGGABLE T | InterpExpoIn (const T &A, const T &B, float Alpha) |
| | Interpolation between A and B, applying an exponential in function.
|
| |
|
template<class T > |
| static FORCEINLINE_DEBUGGABLE T | InterpExpoInOut (const T &A, const T &B, float Alpha) |
| | Interpolation between A and B, applying an exponential in/out function.
|
| |
|
template<class T > |
| static FORCEINLINE_DEBUGGABLE T | InterpExpoOut (const T &A, const T &B, float Alpha) |
| | Interpolation between A and B, applying an exponential out function.
|
| |
|
template<class T > |
| static FORCEINLINE_DEBUGGABLE T | InterpSinIn (const T &A, const T &B, float Alpha) |
| | Interpolation between A and B, applying a sinusoidal in function.
|
| |
|
template<class T > |
| static FORCEINLINE_DEBUGGABLE T | InterpSinInOut (const T &A, const T &B, float Alpha) |
| | Interpolation between A and B, applying a sinusoidal in/out function.
|
| |
|
template<class T > |
| static FORCEINLINE_DEBUGGABLE T | InterpSinOut (const T &A, const T &B, float Alpha) |
| | Interpolation between A and B, applying a sinusoidal out function.
|
| |
|
template<class T > |
| static FORCEINLINE_DEBUGGABLE T | InterpStep (const T &A, const T &B, float Alpha, int32 Steps) |
| | Interpolation between A and B, applying a step function.
|
| |
| static bool | IntersectPlanes2 (FVector &I, FVector &D, const FPlane &P1, const FPlane &P2) |
| | Compute intersection point and direction of line joining two planes. 更多...
|
| |
| static bool | IntersectPlanes3 (FVector &I, const FPlane &P1, const FPlane &P2, const FPlane &P3) |
| | Compute intersection point of three planes. 更多...
|
| |
| static FORCEINLINE bool | IsNearlyEqual (double A, double B, double ErrorTolerance=SMALL_NUMBER) |
| | Checks if two floating point numbers are nearly equal. 更多...
|
| |
| static FORCEINLINE bool | IsNearlyEqual (float A, float B, float ErrorTolerance=SMALL_NUMBER) |
| | Checks if two floating point numbers are nearly equal. 更多...
|
| |
| static FORCEINLINE bool | IsNearlyEqualByULP (double A, double B, int32 MaxUlps=4) |
| | Check if two floating point numbers are nearly equal to within specific number of units of last place (ULP). 更多...
|
| |
| static FORCEINLINE bool | IsNearlyEqualByULP (float A, float B, int32 MaxUlps=4) |
| | Check if two floating point numbers are nearly equal to within specific number of units of last place (ULP). 更多...
|
| |
| static FORCEINLINE bool | IsNearlyZero (double Value, double ErrorTolerance=SMALL_NUMBER) |
| | Checks if a floating point number is nearly zero. 更多...
|
| |
| static FORCEINLINE bool | IsNearlyZero (float Value, float ErrorTolerance=SMALL_NUMBER) |
| | Checks if a floating point number is nearly zero. 更多...
|
| |
| template<typename T > |
| static FORCEINLINE bool | IsPowerOfTwo (T Value) |
| | Checks whether a number is a power of two. 更多...
|
| |
|
template<class U > |
| static FORCEINLINE bool | IsWithin (const U &TestValue, const U &MinValue, const U &MaxValue) |
| | Checks if value is within a range, exclusive on MaxValue)
|
| |
|
template<class U > |
| static FORCEINLINE bool | IsWithinInclusive (const U &TestValue, const U &MinValue, const U &MaxValue) |
| | Checks if value is within a range, inclusive on MaxValue)
|
| |
|
template<class T , class U > |
| static FORCEINLINE_DEBUGGABLE T | Lerp (const T &A, const T &B, const U &Alpha) |
| | Performs a linear interpolation between two values, Alpha ranges from 0-1
|
| |
| template<class T > |
| static FORCEINLINE_DEBUGGABLE T | LerpStable (const T &A, const T &B, double Alpha) |
| | Performs a linear interpolation between two values, Alpha ranges from 0-1. 更多...
|
| |
| template<class T > |
| static FORCEINLINE_DEBUGGABLE T | LerpStable (const T &A, const T &B, float Alpha) |
| | Performs a linear interpolation between two values, Alpha ranges from 0-1. 更多...
|
| |
|
static bool | LineBoxIntersection (const FBox &Box, const FVector &Start, const FVector &End, const FVector &Direction) |
| | Determines whether a line intersects a box.
|
| |
| static bool | LineBoxIntersection (const FBox &Box, const FVector &Start, const FVector &End, const FVector &Direction, const FVector &OneOverDirection) |
| | Determines whether a line intersects a box. 更多...
|
| |
| static FVector | LinePlaneIntersection (const FVector &Point1, const FVector &Point2, const FPlane &Plane) |
| | Find the intersection of a line and a plane. 更多...
|
| |
| static FVector | LinePlaneIntersection (const FVector &Point1, const FVector &Point2, const FVector &PlaneOrigin, const FVector &PlaneNormal) |
| | Find the intersection of a line and an offset plane. 更多...
|
| |
|
static bool | LineSphereIntersection (const FVector &Start, const FVector &Dir, float Length, const FVector &Origin, float Radius) |
| | Determines whether a line intersects a sphere.
|
| |
| static FORCEINLINE float | Log2 (float Value) |
| | Computes the base 2 logarithm of the specified value 更多...
|
| |
| static float | MakePulsatingValue (const double InCurrentTime, const float InPulsesPerSecond, const float InPhase=0.0f) |
| | Simple function to create a pulsating scalar value 更多...
|
| |
|
template<class T > |
| static FORCEINLINE T | Max3 (const T A, const T B, const T C) |
| | Returns highest of 3 values
|
| |
| static CORE_API bool | MemoryTest (void *BaseAddress, uint32 NumBytes) |
| | Tests a memory region to see that it's working properly. 更多...
|
| |
|
template<class T > |
| static FORCEINLINE T | Min3 (const T A, const T B, const T C) |
| | Returns lowest of 3 values
|
| |
| static CORE_API float | PerlinNoise1D (float Value) |
| | Generates a 1D Perlin noise from the given value. 更多...
|
| |
| static CORE_API float | PerlinNoise2D (const FVector2D &Location) |
| | Generates a 1D Perlin noise sample at the given location. 更多...
|
| |
| static CORE_API float | PerlinNoise3D (const FVector &Location) |
| | Generates a 3D Perlin noise sample at the given location. 更多...
|
| |
| static CORE_API bool | PlaneAABBIntersection (const FPlane &P, const FBox &AABB) |
| | Determine if a plane and an AABB intersect 更多...
|
| |
| static CORE_API int32 | PlaneAABBRelativePosition (const FPlane &P, const FBox &AABB) |
| | Determine the position of an AABB relative to a plane: completely above (in the direction of the normal of the plane), completely below or intersects it 更多...
|
| |
|
static bool | PointBoxIntersection (const FVector &Point, const FBox &Box) |
| | Determines whether a point is inside a box.
|
| |
| static CORE_API float | PointDistToLine (const FVector &Point, const FVector &Direction, const FVector &Origin, FVector &OutClosestPoint) |
| | Calculates the distance of a given Point in world space to a given line, defined by the vector couple (Origin, Direction). 更多...
|
| |
| static CORE_API float | PointDistToSegment (const FVector &Point, const FVector &StartPoint, const FVector &EndPoint) |
| | Returns distance from a point to the closest point on a segment. 更多...
|
| |
| static CORE_API float | PointDistToSegmentSquared (const FVector &Point, const FVector &StartPoint, const FVector &EndPoint) |
| | Returns square of the distance from a point to the closest point on a segment. 更多...
|
| |
| static CORE_API bool | PointsAreCoplanar (const TArray< FVector > &Points, const float Tolerance=0.1f) |
| | Determines whether a given set of points are coplanar, with a tolerance. 更多...
|
| |
|
static FORCEINLINE void | PolarToCartesian (const float Rad, const float Ang, float &OutX, float &OutY) |
| | Converts given Polar coordinate pair to Cartesian coordinate system.
|
| |
|
static FORCEINLINE void | PolarToCartesian (const FVector2D InPolar, FVector2D &OutCart) |
| | Converts given Polar coordinate pair to Cartesian coordinate system.
|
| |
|
static CORE_API FQuat | QInterpConstantTo (const FQuat &Current, const FQuat &Target, float DeltaTime, float InterpSpeed) |
| | Interpolate quaternion from Current to Target with constant step (in radians)
|
| |
| static CORE_API FQuat | QInterpTo (const FQuat &Current, const FQuat &Target, float DeltaTime, float InterpSpeed) |
| | Interpolate quaternion from Current to Target. 更多...
|
| |
| template<class T > |
| static FORCEINLINE auto | RadiansToDegrees (T const &RadVal) -> decltype(RadVal *(180.f/PI)) |
| | Converts radians to degrees. 更多...
|
| |
|
static FORCEINLINE bool | RandBool () |
| | Util to generate a random boolean.
|
| |
| static FORCEINLINE int32 | RandHelper (int32 A) |
| | Helper function for rand implementations. 更多...
|
| |
|
static CORE_API FVector | RandPointInBox (const FBox &Box) |
| | Returns a random point within the passed in bounding box
|
| |
|
static CORE_API FVector2D | RandPointInCircle (float CircleRadius) |
| | Returns a random point, uniformly distributed, within the specified radius
|
| |
| static FORCEINLINE float | RandRange (float InMin, float InMax) |
| | Util to generate a random number in a range. 更多...
|
| |
| static FORCEINLINE int32 | RandRange (int32 Min, int32 Max) |
| | Helper function for rand implementations. 更多...
|
| |
| static FVector | RayPlaneIntersection (const FVector &RayOrigin, const FVector &RayDirection, const FPlane &Plane) |
| | Find the intersection of a ray and a plane. 更多...
|
| |
|
static CORE_API FRotator | RInterpConstantTo (const FRotator &Current, const FRotator &Target, float DeltaTime, float InterpSpeed) |
| | Interpolate rotator from Current to Target with constant step
|
| |
| static CORE_API FRotator | RInterpTo (const FRotator &Current, const FRotator &Target, float DeltaTime, float InterpSpeed) |
| | Interpolate rotator from Current to Target. 更多...
|
| |
| static FORCEINLINE float | RoundFromZero (float F) |
| | Converts a floating point number to an integer which is further from zero, "larger" in absolute value: 0.1 becomes 1, -0.1 becomes -1 更多...
|
| |
| static CORE_API float | RoundHalfFromZero (float F) |
| | Converts a floating point number to the nearest integer, equidistant ties go to the value which is further from zero: -0.5 becomes -1.0, 0.5 becomes 1.0 更多...
|
| |
| static CORE_API float | RoundHalfToEven (float F) |
| | Converts a floating point number to the nearest integer, equidistant ties go to the value which is closest to an even value: 1.5 becomes 2, 0.5 becomes 0 更多...
|
| |
| static CORE_API float | RoundHalfToZero (float F) |
| | Converts a floating point number to the nearest integer, equidistant ties go to the value which is closer to zero: -0.5 becomes 0, 0.5 becomes 0 更多...
|
| |
| static FORCEINLINE float | RoundToNegativeInfinity (float F) |
| | Converts a floating point number to an integer which is more negative: 0.1 becomes 0, -0.1 becomes -1 更多...
|
| |
| static FORCEINLINE float | RoundToPositiveInfinity (float F) |
| | Converts a floating point number to an integer which is more positive: 0.1 becomes 1, -0.1 becomes 0 更多...
|
| |
| static FORCEINLINE float | RoundToZero (float F) |
| | Converts a floating point number to an integer which is closer to zero, "smaller" in absolute value: 0.1 becomes 0, -0.1 becomes 0 更多...
|
| |
| static CORE_API void | SegmentDistToSegment (FVector A1, FVector B1, FVector A2, FVector B2, FVector &OutP1, FVector &OutP2) |
| | Find closest points between 2 segments. 更多...
|
| |
| static CORE_API void | SegmentDistToSegmentSafe (FVector A1, FVector B1, FVector A2, FVector B2, FVector &OutP1, FVector &OutP2) |
| | Find closest points between 2 segments. 更多...
|
| |
| static CORE_API bool | SegmentIntersection2D (const FVector &SegmentStartA, const FVector &SegmentEndA, const FVector &SegmentStartB, const FVector &SegmentEndB, FVector &out_IntersectionPoint) |
| | Returns true if there is an intersection between the segment specified by SegmentStartA and SegmentEndA, and the segment specified by SegmentStartB and SegmentEndB, in 2D space. 更多...
|
| |
| static CORE_API bool | SegmentPlaneIntersection (const FVector &StartPoint, const FVector &EndPoint, const FPlane &Plane, FVector &out_IntersectionPoint) |
| | Returns true if there is an intersection between the segment specified by StartPoint and Endpoint, and the plane on which polygon Plane lies. 更多...
|
| |
| static CORE_API bool | SegmentTriangleIntersection (const FVector &StartPoint, const FVector &EndPoint, const FVector &A, const FVector &B, const FVector &C, FVector &OutIntersectPoint, FVector &OutTriangleNormal) |
| | Returns true if there is an intersection between the segment specified by StartPoint and Endpoint, and the Triangle defined by A, B and C. 更多...
|
| |
|
static void | SetBoolInBitField (uint8 *Ptr, uint32 Index, bool bSet) |
| | Set a bit in memory created from bitflags (uint32 Value:1), used for EngineShowFlags, TestBitFieldFunctions() tests the implementation
|
| |
| static FORCEINLINE void | SinCos (float *ScalarSin, float *ScalarCos, float Value) |
| | Computes the sine and cosine of a scalar value. 更多...
|
| |
| static float | SmoothStep (float A, float B, float X) |
| | Returns a smooth Hermite interpolation between 0 and 1 for the value X (where X ranges between A and B) Clamped to 0 for X <= A and 1 for X >= B. 更多...
|
| |
|
static bool | SphereAABBIntersection (const FSphere &Sphere, const FBox &AABB) |
| | Converts a sphere into a point plus radius squared for the test above
|
| |
| static bool | SphereAABBIntersection (const FVector &SphereCenter, const float RadiusSquared, const FBox &AABB) |
| | Performs a sphere vs box intersection test using Arvo's algorithm: 更多...
|
| |
| static CORE_API bool | SphereConeIntersection (const FVector &SphereCenter, float SphereRadius, const FVector &ConeAxis, float ConeAngleSin, float ConeAngleCos) |
| | Assumes the cone tip is at 0,0,0 (means the SphereCenter is relative to the cone tip) 更多...
|
| |
| static CORE_API void | SphereDistToLine (FVector SphereOrigin, float SphereRadius, FVector LineOrigin, FVector LineDir, FVector &OutClosestPoint) |
| | Find closest point on a Sphere to a Line. 更多...
|
| |
|
template<class T > |
| static FORCEINLINE T | Square (const T A) |
| | Multiples value by itself
|
| |
| static CORE_API float | TruncateToHalfIfClose (float F, float Tolerance=SMALL_NUMBER) |
| | Truncates a floating point number to half if closer than the given tolerance. 更多...
|
| |
|
static float | UnwindDegrees (float A) |
| | Utility to ensure angle is between +/- 180 degrees by unwinding.
|
| |
|
static float | UnwindRadians (float A) |
| | Given a heading which may be outside the +/- PI range, 'unwind' it back into that range.
|
| |
|
static CORE_API FVector2D | Vector2DInterpConstantTo (const FVector2D &Current, const FVector2D &Target, float DeltaTime, float InterpSpeed) |
| | Interpolate vector2D from Current to Target with constant step
|
| |
| static CORE_API FVector2D | Vector2DInterpTo (const FVector2D &Current, const FVector2D &Target, float DeltaTime, float InterpSpeed) |
| | Interpolate vector2D from Current to Target. 更多...
|
| |
|
static CORE_API FVector | VInterpConstantTo (const FVector &Current, const FVector &Target, float DeltaTime, float InterpSpeed) |
| | Interpolate vector from Current to Target with constant step
|
| |
|
static CORE_API FVector | VInterpNormalRotationTo (const FVector &Current, const FVector &Target, float DeltaTime, float RotationSpeedDegrees) |
| | Interpolate a normal vector Current to Target, by interpolating the angle between those vectors with constant step.
|
| |
| static CORE_API FVector | VInterpTo (const FVector &Current, const FVector &Target, float DeltaTime, float InterpSpeed) |
| | Interpolate vector from Current to Target. 更多...
|
| |
|
static FVector | VRand () |
| | Return a uniformly distributed random unit length vector = point on the unit sphere surface.
|
| |
| static CORE_API FVector | VRandCone (FVector const &Dir, float ConeHalfAngleRad) |
| | Returns a random unit vector, uniformly distributed, within the specified cone ConeHalfAngleRad is the half-angle of cone, in radians. 更多...
|
| |
| static CORE_API FVector | VRandCone (FVector const &Dir, float HorizontalConeHalfAngleRad, float VerticalConeHalfAngleRad) |
| | This is a version of VRandCone that handles "squished" cones, i.e. 更多...
|
| |
| static CORE_API float | WeightedMovingAverage (float CurrentSample, float PreviousSample, float Weight) |
| | Calculates the new value in a weighted moving average series using the previous value and the weight 更多...
|
| |
| static CORE_API void | WindRelativeAnglesDegrees (float InAngle0, float &InOutAngle1) |
| | Given two angles in degrees, 'wind' the rotation in Angle1 so that it avoids >180 degree flips. 更多...
|
| |
|
template<class T > |
| static FORCEINLINE T | Wrap (const T X, const T Min, const T Max) |
| | Wraps X to be between Min and Max, inclusive
|
| |
| static FORCEINLINE uint32 | CountLeadingZeros (uint32 Value) |
| | Counts the number of leading zeros in the bit representation of the value 更多...
|
| |
| static FORCEINLINE uint64 | CountLeadingZeros64 (uint64 Value) |
| | Counts the number of leading zeros in the bit representation of the value 更多...
|
| |
| static FORCEINLINE uint8 | CountLeadingZeros8 (uint8 Value) |
| | Counts the number of leading zeros in the bit representation of the value 更多...
|
| |
| static FORCEINLINE uint32 | CountTrailingZeros (uint32 Value) |
| | Counts the number of trailing zeros in the bit representation of the value 更多...
|
| |
| static FORCEINLINE uint64 | CountTrailingZeros64 (uint64 Value) |
| | Counts the number of trailing zeros in the bit representation of the value 更多...
|
| |
|
template<class T > |
| static CONSTEXPR FORCEINLINE T | Abs (const T A) |
| | Computes absolute value in a generic way
|
| |
| static FORCEINLINE uint32 | CeilLogTwo (uint32 Arg) |
| | Returns smallest N such that (1<<N)>=Arg. 更多...
|
| |
| static FORCEINLINE double | CeilToDouble (double F) |
| | Converts a double to the nearest greater or equal integer. 更多...
|
| |
| static FORCEINLINE float | CeilToFloat (float F) |
| | Converts a float to the nearest greater or equal integer. 更多...
|
| |
| static FORCEINLINE int32 | CeilToInt (float F) |
| | Converts a float to the nearest greater or equal integer. 更多...
|
| |
| static FORCEINLINE uint32 | CountLeadingZeros (uint32 Value) |
| | Counts the number of leading zeros in the bit representation of the 32-bit value 更多...
|
| |
| static FORCEINLINE uint64 | CountLeadingZeros64 (uint64 Value) |
| | Counts the number of leading zeros in the bit representation of the 64-bit value 更多...
|
| |
| static FORCEINLINE uint8 | CountLeadingZeros8 (uint8 Value) |
| | Counts the number of leading zeros in the bit representation of the 8-bit value 更多...
|
| |
| static FORCEINLINE uint32 | CountTrailingZeros (uint32 Value) |
| | Counts the number of trailing zeros in the bit representation of the value 更多...
|
| |
| static FORCEINLINE uint64 | CountTrailingZeros64 (uint64 Value) |
| | Counts the number of trailing zeros in the bit representation of the value 更多...
|
| |
| static CONSTEXPR FORCEINLINE double | FloatSelect (double Comparand, double ValueGEZero, double ValueLTZero) |
| | Returns value based on comparand. 更多...
|
| |
| static CONSTEXPR FORCEINLINE float | FloatSelect (float Comparand, float ValueGEZero, float ValueLTZero) |
| | Returns value based on comparand. 更多...
|
| |
| static FORCEINLINE uint32 | FloorLog2 (uint32 Value) |
| | Computes the base 2 logarithm for an integer value that is greater than 0. 更多...
|
| |
| static FORCEINLINE uint64 | FloorLog2_64 (uint64 Value) |
| | Computes the base 2 logarithm for a 64-bit value that is greater than 0. 更多...
|
| |
| static FORCEINLINE double | FloorToDouble (double F) |
| | Converts a double to a less or equal integer. 更多...
|
| |
| static FORCEINLINE float | FloorToFloat (float F) |
| | Converts a float to the nearest less or equal integer. 更多...
|
| |
| static FORCEINLINE int32 | FloorToInt (float F) |
| | Converts a float to a nearest less or equal integer. 更多...
|
| |
| static CORE_API FORCENOINLINE float | Fmod (float X, float Y) |
| | Returns the floating-point remainder of X / Y Warning: Always returns remainder toward 0, not toward the smaller multiple of Y. 更多...
|
| |
| static FORCEINLINE float | Frac (float Value) |
| | Returns the fractional part of a float. 更多...
|
| |
| static FORCEINLINE float | Fractional (float Value) |
| | Returns signed fractional part of a float. 更多...
|
| |
|
static FORCEINLINE float | FRand () |
| | Returns a random float between 0 and 1, inclusive.
|
| |
|
static CORE_API int32 | GetRandSeed () |
| | Returns the current seed for SRand().
|
| |
|
static FORCEINLINE float | InvSqrt (float F) |
| | Computes a fully accurate inverse square root
|
| |
|
static FORCEINLINE float | InvSqrtEst (float F) |
| | Computes a faster but less accurate inverse square root
|
| |
|
static FORCEINLINE bool | IsFinite (float A) |
| | Return true if value is finite (not NaN and not Infinity).
|
| |
|
static FORCEINLINE bool | IsNaN (float A) |
| | Return true if value is NaN (not a number).
|
| |
|
template<class T > |
| static CONSTEXPR FORCEINLINE T | Max (const T A, const T B) |
| | Returns higher value in a generic way
|
| |
| template<class T > |
| static FORCEINLINE T | Max (const TArray< T > &Values, int32 *MaxIndex=NULL) |
| | Max of Array 更多...
|
| |
|
template<class T > |
| static CONSTEXPR FORCEINLINE T | Min (const T A, const T B) |
| | Returns lower value in a generic way
|
| |
| template<class T > |
| static FORCEINLINE T | Min (const TArray< T > &Values, int32 *MinIndex=NULL) |
| | Min of Array 更多...
|
| |
| static FORCEINLINE double | Modf (const double InValue, double *OutIntPart) |
| | Breaks the given value into an integral and a fractional part. 更多...
|
| |
| static FORCEINLINE float | Modf (const float InValue, float *OutIntPart) |
| | Breaks the given value into an integral and a fractional part. 更多...
|
| |
|
static FORCEINLINE uint32 | MortonCode2 (uint32 x) |
| | Spreads bits to every other.
|
| |
|
static FORCEINLINE uint32 | MortonCode3 (uint32 x) |
| | Spreads bits to every 3rd.
|
| |
|
static FORCEINLINE int32 | Rand () |
| | Returns a random integer between 0 and RAND_MAX, inclusive
|
| |
|
static FORCEINLINE void | RandInit (int32 Seed) |
| | Seeds global random number functions Rand() and FRand()
|
| |
| static FORCEINLINE uint32 | ReverseMortonCode2 (uint32 x) |
| | Reverses MortonCode2. 更多...
|
| |
| static FORCEINLINE uint32 | ReverseMortonCode3 (uint32 x) |
| | Reverses MortonCode3. 更多...
|
| |
| static FORCEINLINE double | RoundToDouble (double F) |
| | Converts a double to the nearest integer. 更多...
|
| |
| static FORCEINLINE float | RoundToFloat (float F) |
| | Converts a float to the nearest integer. 更多...
|
| |
| static FORCEINLINE int32 | RoundToInt (float F) |
| | Converts a float to the nearest integer. 更多...
|
| |
| static FORCEINLINE uint32 | RoundUpToPowerOfTwo (uint32 Arg) |
| |
|
template<class T > |
| static CONSTEXPR FORCEINLINE T | Sign (const T A) |
| | Returns 1, 0, or -1 depending on relation of T to 0
|
| |
|
static CORE_API float | SRand () |
| | Returns a seeded random float in the range [0,1), using the seed from SRandInit().
|
| |
|
static CORE_API void | SRandInit (int32 Seed) |
| | Seeds future calls to SRand()
|
| |
| static FORCEINLINE double | TruncToDouble (double F) |
| | Converts a double to an integer value with truncation towards zero. 更多...
|
| |
| static FORCEINLINE float | TruncToFloat (float F) |
| | Converts a float to an integer value with truncation towards zero. 更多...
|
| |
| static CONSTEXPR FORCEINLINE int32 | TruncToInt (float F) |
| | Converts a float to an integer with truncation towards zero. 更多...
|
| |