C# Class Pathfinding.AstarMath

显示文件 Open project: henryj41043/TheUnseen Class Usage Examples

Public Methods

Method Description
Abs ( float a ) : float
Abs ( int a ) : int
Bit ( int a, int b ) : int
Clamp ( float a, float b, float c ) : float
Clamp ( int a, int b, int c ) : int
Clamp01 ( float a ) : float
Clamp01 ( int a ) : int
ComputeVertexHash ( int x, int y, int z ) : int
CubicBezier ( Vector3 p0, Vector3 p1, Vector3 p2, Vector3 p3, float t ) : Vector3
DistancePointSegment ( Int3 a, Int3 b, Int3 p ) : float
DistancePointSegment ( int x, int z, int px, int pz, int qx, int qz ) : float
DistancePointSegment2 ( Vector3 a, Vector3 b, Vector3 p ) : float
DistancePointSegment2 ( int x, int z, int px, int pz, int qx, int qz ) : float
DistancePointSegmentStrict ( Vector3 a, Vector3 b, Vector3 p ) : float
FormatBytes ( int bytes ) : string
FormatBytesBinary ( int bytes ) : string
Hermite ( float start, float end, float value ) : float
IntToColor ( int i, float a ) : Color
Lerp ( float a, float b, float t ) : float
MagnitudeXZ ( Vector3 a, Vector3 b ) : float
MapTo ( float startMin, float startMax, float value ) : float
MapTo ( float startMin, float startMax, float targetMin, float targetMax, float value ) : float
MapToRange ( float targetMin, float targetMax, float value ) : float
Max ( float a, float b ) : float
Max ( int a, int b ) : int
Max ( uint a, uint b ) : uint
Max ( ushort a, ushort b ) : ushort
Min ( float a, float b ) : float
Min ( int a, int b ) : int
Min ( uint a, uint b ) : uint
NearestPoint ( Vector3 lineStart, Vector3 lineEnd, Vector3 point ) : Vector3
NearestPointFactor ( Int2 lineStart, Int2 lineEnd, Int2 point ) : float
NearestPointFactor ( Int3 lineStart, Int3 lineEnd, Int3 point ) : float
NearestPointFactor ( Vector3 lineStart, Vector3 lineEnd, Vector3 point ) : float
NearestPointStrict ( Vector3 lineStart, Vector3 lineEnd, Vector3 point ) : Vector3
NearestPointStrictXZ ( Vector3 lineStart, Vector3 lineEnd, Vector3 point ) : Vector3
Repeat ( int i, int n ) : int
RoundToInt ( double v ) : int
RoundToInt ( float v ) : int
Sign ( float a ) : float
Sign ( int a ) : int
SqrMagnitudeXZ ( Vector3 a, Vector3 b ) : float

Method Details

Abs() public static method

public static Abs ( float a ) : float
a float
return float

Abs() public static method

public static Abs ( int a ) : int
a int
return int

Bit() public static method

public static Bit ( int a, int b ) : int
a int
b int
return int

Clamp() public static method

public static Clamp ( float a, float b, float c ) : float
a float
b float
c float
return float

Clamp() public static method

public static Clamp ( int a, int b, int c ) : int
a int
b int
c int
return int

Clamp01() public static method

public static Clamp01 ( float a ) : float
a float
return float

Clamp01() public static method

public static Clamp01 ( int a ) : int
a int
return int

ComputeVertexHash() public static method

public static ComputeVertexHash ( int x, int y, int z ) : int
x int
y int
z int
return int

CubicBezier() public static method

public static CubicBezier ( Vector3 p0, Vector3 p1, Vector3 p2, Vector3 p3, float t ) : Vector3
p0 Vector3
p1 Vector3
p2 Vector3
p3 Vector3
t float
return Vector3

DistancePointSegment() public static method

public static DistancePointSegment ( Int3 a, Int3 b, Int3 p ) : float
a Int3
b Int3
p Int3
return float

DistancePointSegment() public static method

public static DistancePointSegment ( int x, int z, int px, int pz, int qx, int qz ) : float
x int
z int
px int
pz int
qx int
qz int
return float

DistancePointSegment2() public static method

public static DistancePointSegment2 ( Vector3 a, Vector3 b, Vector3 p ) : float
a Vector3
b Vector3
p Vector3
return float

DistancePointSegment2() public static method

public static DistancePointSegment2 ( int x, int z, int px, int pz, int qx, int qz ) : float
x int
z int
px int
pz int
qx int
qz int
return float

DistancePointSegmentStrict() public static method

public static DistancePointSegmentStrict ( Vector3 a, Vector3 b, Vector3 p ) : float
a Vector3
b Vector3
p Vector3
return float

FormatBytes() public static method

public static FormatBytes ( int bytes ) : string
bytes int
return string

FormatBytesBinary() public static method

public static FormatBytesBinary ( int bytes ) : string
bytes int
return string

Hermite() public static method

public static Hermite ( float start, float end, float value ) : float
start float
end float
value float
return float

IntToColor() public static method

public static IntToColor ( int i, float a ) : Color
i int
a float
return Color

Lerp() public static method

public static Lerp ( float a, float b, float t ) : float
a float
b float
t float
return float

MagnitudeXZ() public static method

public static MagnitudeXZ ( Vector3 a, Vector3 b ) : float
a Vector3
b Vector3
return float

MapTo() public static method

public static MapTo ( float startMin, float startMax, float value ) : float
startMin float
startMax float
value float
return float

MapTo() public static method

public static MapTo ( float startMin, float startMax, float targetMin, float targetMax, float value ) : float
startMin float
startMax float
targetMin float
targetMax float
value float
return float

MapToRange() public static method

public static MapToRange ( float targetMin, float targetMax, float value ) : float
targetMin float
targetMax float
value float
return float

Max() public static method

public static Max ( float a, float b ) : float
a float
b float
return float

Max() public static method

public static Max ( int a, int b ) : int
a int
b int
return int

Max() public static method

public static Max ( uint a, uint b ) : uint
a uint
b uint
return uint

Max() public static method

public static Max ( ushort a, ushort b ) : ushort
a ushort
b ushort
return ushort

Min() public static method

public static Min ( float a, float b ) : float
a float
b float
return float

Min() public static method

public static Min ( int a, int b ) : int
a int
b int
return int

Min() public static method

public static Min ( uint a, uint b ) : uint
a uint
b uint
return uint

NearestPoint() public static method

public static NearestPoint ( Vector3 lineStart, Vector3 lineEnd, Vector3 point ) : Vector3
lineStart Vector3
lineEnd Vector3
point Vector3
return Vector3

NearestPointFactor() public static method

public static NearestPointFactor ( Int2 lineStart, Int2 lineEnd, Int2 point ) : float
lineStart Int2
lineEnd Int2
point Int2
return float

NearestPointFactor() public static method

public static NearestPointFactor ( Int3 lineStart, Int3 lineEnd, Int3 point ) : float
lineStart Int3
lineEnd Int3
point Int3
return float

NearestPointFactor() public static method

public static NearestPointFactor ( Vector3 lineStart, Vector3 lineEnd, Vector3 point ) : float
lineStart Vector3
lineEnd Vector3
point Vector3
return float

NearestPointStrict() public static method

public static NearestPointStrict ( Vector3 lineStart, Vector3 lineEnd, Vector3 point ) : Vector3
lineStart Vector3
lineEnd Vector3
point Vector3
return Vector3

NearestPointStrictXZ() public static method

public static NearestPointStrictXZ ( Vector3 lineStart, Vector3 lineEnd, Vector3 point ) : Vector3
lineStart Vector3
lineEnd Vector3
point Vector3
return Vector3

Repeat() public static method

public static Repeat ( int i, int n ) : int
i int
n int
return int

RoundToInt() public static method

public static RoundToInt ( double v ) : int
v double
return int

RoundToInt() public static method

public static RoundToInt ( float v ) : int
v float
return int

Sign() public static method

public static Sign ( float a ) : float
a float
return float

Sign() public static method

public static Sign ( int a ) : int
a int
return int

SqrMagnitudeXZ() public static method

public static SqrMagnitudeXZ ( Vector3 a, Vector3 b ) : float
a Vector3
b Vector3
return float