C# 클래스 OpenMinecraft.Utils

파일 보기 프로젝트 열기: N3X15/MineEdit

공개 프로퍼티들

프로퍼티 타입 설명
DungeonSizeX int
DungeonSizeY int
DungeonSizeZ int

공개 메소드들

메소드 설명
CheckForDungeonSpace ( byte b, int x, int y, int z ) : bool
CheckForTreeSpace ( byte &b, int x, int y, int z ) : bool
Clamp ( double val, double min, double max ) : double
Clamp ( float val, float min, float max ) : float
Clamp ( int val, int min, int max ) : int
Clamp ( long val, long min, long max ) : long
Clamp ( short val, short min, short max ) : short

Ensure value is between min and max.

CopyFlat ( string from, string to ) : void
CopyRecursive ( string sourceFolder, string destFolder ) : void
CosineInterpolate ( double y1, double y2, double mu ) : double
DirSize ( DirectoryInfo d ) : long
FillRect ( byte &b, byte blk, Vector3i position, Vector3i size ) : void
FixPlayerPlacement ( IMapHandler &mh ) : void
GetMD5HashFromFile ( string fileName ) : string

For FileSystemWatcher stuff

GrowCactus ( byte &b, Random rand, int x, int y, int z ) : void
GrowTree ( byte &b, Random r, int x, int y, int z ) : void
IntToBase ( int i, int radix ) : string
Lerp ( double a, double b, double u ) : double
Lerp ( float a, float b, float u ) : float

Used for blending colors or line-drawing.

Lerp ( int a, int b, int u ) : int
MakeDungeon ( int CX, int CZ, byte &b, IMapHandler &mh, Random r ) : bool

Generate a chunk

MakeDungeonWalls ( byte &b, Random r, Vector3i position, Vector3i size ) : void
PointOnCurve ( PointF p0, PointF p1, PointF p2, PointF p3, float t ) : PointF

Calculates interpolated point between two points using Catmull-Rom Spline

Points calculated exist on the spline between points two and three.

PointOnCurve ( Vector3d p0, Vector3d p1, Vector3d p2, Vector3d p3, double t ) : Vector3d

Calculates interpolated point between two points using Catmull-Rom Spline

Points calculated exist on the spline between points two and three.

UnixTimestamp ( ) : double

비공개 메소드들

메소드 설명
FixLibnoiseOutput ( double p ) : double
GrowTreeFoliage ( byte &b, Random r, int x, int _y, int z, int height ) : void
GrowTreeTrunk ( byte &b, Random r, int x, int y, int z, int height ) : void
ObjectIsCompletelyUnderground ( byte b, Vector3i position, Vector3i size ) : bool
ObjectIsInChunk ( byte b, Vector3i position, Vector3i size ) : bool
ObjectIsIntersectingWithGround ( byte b, Vector3i position, Vector3i size ) : bool

메소드 상세

CheckForDungeonSpace() 공개 정적인 메소드

public static CheckForDungeonSpace ( byte b, int x, int y, int z ) : bool
b byte
x int
y int
z int
리턴 bool

CheckForTreeSpace() 공개 정적인 메소드

public static CheckForTreeSpace ( byte &b, int x, int y, int z ) : bool
b byte
x int
y int
z int
리턴 bool

Clamp() 공개 정적인 메소드

public static Clamp ( double val, double min, double max ) : double
val double
min double
max double
리턴 double

Clamp() 공개 정적인 메소드

public static Clamp ( float val, float min, float max ) : float
val float
min float
max float
리턴 float

Clamp() 공개 정적인 메소드

public static Clamp ( int val, int min, int max ) : int
val int
min int
max int
리턴 int

Clamp() 공개 정적인 메소드

public static Clamp ( long val, long min, long max ) : long
val long
min long
max long
리턴 long

Clamp() 공개 정적인 메소드

Ensure value is between min and max.
public static Clamp ( short val, short min, short max ) : short
val short value
min short
max short
리턴 short

CopyFlat() 공개 정적인 메소드

public static CopyFlat ( string from, string to ) : void
from string
to string
리턴 void

CopyRecursive() 공개 정적인 메소드

public static CopyRecursive ( string sourceFolder, string destFolder ) : void
sourceFolder string
destFolder string
리턴 void

CosineInterpolate() 공개 정적인 메소드

public static CosineInterpolate ( double y1, double y2, double mu ) : double
y1 double
y2 double
mu double
리턴 double

DirSize() 공개 정적인 메소드

public static DirSize ( DirectoryInfo d ) : long
d System.IO.DirectoryInfo
리턴 long

FillRect() 공개 정적인 메소드

public static FillRect ( byte &b, byte blk, Vector3i position, Vector3i size ) : void
b byte
blk byte
position Vector3i
size Vector3i
리턴 void

FixPlayerPlacement() 공개 정적인 메소드

public static FixPlayerPlacement ( IMapHandler &mh ) : void
mh IMapHandler
리턴 void

GetMD5HashFromFile() 공개 정적인 메소드

For FileSystemWatcher stuff
public static GetMD5HashFromFile ( string fileName ) : string
fileName string
리턴 string

GrowCactus() 공개 정적인 메소드

public static GrowCactus ( byte &b, Random rand, int x, int y, int z ) : void
b byte
rand System.Random
x int
y int
z int
리턴 void

GrowTree() 공개 정적인 메소드

public static GrowTree ( byte &b, Random r, int x, int y, int z ) : void
b byte
r System.Random
x int
y int
z int
리턴 void

IntToBase() 공개 정적인 메소드

public static IntToBase ( int i, int radix ) : string
i int
radix int
리턴 string

Lerp() 공개 정적인 메소드

public static Lerp ( double a, double b, double u ) : double
a double
b double
u double
리턴 double

Lerp() 공개 정적인 메소드

Used for blending colors or line-drawing.
public static Lerp ( float a, float b, float u ) : float
a float
b float
u float
리턴 float

Lerp() 공개 정적인 메소드

public static Lerp ( int a, int b, int u ) : int
a int
b int
u int
리턴 int

MakeDungeon() 공개 정적인 메소드

Generate a chunk
public static MakeDungeon ( int CX, int CZ, byte &b, IMapHandler &mh, Random r ) : bool
CX int Chunk X
CZ int Chunk Z
b byte Blocks
mh IMapHandler Map handler
r System.Random Random
리턴 bool

MakeDungeonWalls() 공개 정적인 메소드

public static MakeDungeonWalls ( byte &b, Random r, Vector3i position, Vector3i size ) : void
b byte
r System.Random
position Vector3i
size Vector3i
리턴 void

PointOnCurve() 공개 정적인 메소드

Calculates interpolated point between two points using Catmull-Rom Spline
Points calculated exist on the spline between points two and three.
public static PointOnCurve ( PointF p0, PointF p1, PointF p2, PointF p3, float t ) : PointF
p0 System.Drawing.PointF First Point
p1 System.Drawing.PointF Second Point
p2 System.Drawing.PointF Third Point
p3 System.Drawing.PointF Fourth Point
t float /// Normalised distance between second and third point /// where the spline point will be calculated ///
리턴 System.Drawing.PointF

PointOnCurve() 공개 정적인 메소드

Calculates interpolated point between two points using Catmull-Rom Spline
Points calculated exist on the spline between points two and three.
public static PointOnCurve ( Vector3d p0, Vector3d p1, Vector3d p2, Vector3d p3, double t ) : Vector3d
p0 Vector3d First Point
p1 Vector3d Second Point
p2 Vector3d Third Point
p3 Vector3d Fourth Point
t double /// Normalised distance between second and third point /// where the spline point will be calculated ///
리턴 Vector3d

UnixTimestamp() 공개 정적인 메소드

public static UnixTimestamp ( ) : double
리턴 double

프로퍼티 상세

DungeonSizeX 공개적으로 정적으로 프로퍼티

public static int DungeonSizeX
리턴 int

DungeonSizeY 공개적으로 정적으로 프로퍼티

public static int DungeonSizeY
리턴 int

DungeonSizeZ 공개적으로 정적으로 프로퍼티

public static int DungeonSizeZ
리턴 int