C# Класс Infiniminer.BlockEngine

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
Light float[,,]
blockList BlockType[,,]
blockTextures IMTexture[]
downloadList BlockType[,,]
vertexListDirty ].bool[

Открытые методы

Метод Описание
AddBlock ( ushort x, ushort y, ushort z, BlockType blockType ) : void
BlockAtPoint ( Vector3 point ) : BlockType
BlockEngine ( InfiniminerGame gameInstance ) : System
DownloadComplete ( ) : void
DrawLine ( GraphicsDevice graphicsDevice, Vector3 posStart, Vector3 posEnd, Color color, short points ) : void
GetLighting ( ushort &x, ushort &y, ushort &z ) : float
GetRegion ( ushort x, ushort y, ushort z ) : uint
MakeRegionDirty ( int texture, int region ) : void
RayCollision ( Vector3 startPosition, Vector3 rayDirection, float distance, int searchGranularity, Vector3 &hitPoint, Vector3 &buildPoint ) : bool
RayCollision ( Vector3 startPosition, Vector3 rayDirection, float distance, int searchGranularity, Vector3 &hitPoint, Vector3 &buildPoint, BlockType block ) : bool
RayCollision ( Vector3 startPosition, Vector3 src, int searchGranularity ) : bool
RegenerateDirtyVertexLists ( ) : void
RemoveBlock ( ushort x, ushort y, ushort z ) : void
Render ( GraphicsDevice graphicsDevice, GameTime gameTime ) : void
SolidAtPoint ( Vector3 point ) : bool
SolidAtPointForPlayer ( Vector3 point ) : bool
vertexBuffer_ContentLost ( object sender, EventArgs e ) : void

Приватные методы

Метод Описание
BlockPassibleForPlayer ( BlockType blockType ) : bool
BuildFaceVertices ( VertexPositionTextureShade &vertexList, ulong vertexPointer, uint faceInfo, bool isShockBlock ) : void
CreateVertexBufferFromFaceList ( bool>.Dictionary faceList, int texture, int region ) : DynamicVertexBuffer
DecodeBlockFace ( uint faceCode, ushort &x, ushort &y, ushort &z, BlockFaceDirection &faceDir ) : void
EncodeBlockFace ( ushort x, ushort y, ushort z, BlockFaceDirection faceDir ) : uint
GetRegionCenter ( uint regionNumber ) : Vector3
HideQuad ( ushort x, ushort y, ushort z, BlockFaceDirection faceDir, BlockType blockType ) : void
RenderVertexList ( GraphicsDevice graphicsDevice, DynamicVertexBuffer vertexBuffer, Texture2D blockTexture, Color lodColor, bool renderTranslucent, BlockTexture blocktex, float elapsedTime ) : void
ShowQuad ( ushort x, ushort y, ushort z, BlockFaceDirection faceDir, BlockType blockType ) : void
_AddBlock ( ushort x, ushort y, ushort z, BlockFaceDirection dir, BlockType type, int x2, int y2, int z2, BlockFaceDirection dir2 ) : void
_RemoveBlock ( ushort x, ushort y, ushort z, BlockFaceDirection dir, int x2, int y2, int z2, BlockFaceDirection dir2 ) : void

Описание методов

AddBlock() публичный Метод

public AddBlock ( ushort x, ushort y, ushort z, BlockType blockType ) : void
x ushort
y ushort
z ushort
blockType BlockType
Результат void

BlockAtPoint() публичный Метод

public BlockAtPoint ( Vector3 point ) : BlockType
point Vector3
Результат BlockType

BlockEngine() публичный Метод

public BlockEngine ( InfiniminerGame gameInstance ) : System
gameInstance InfiniminerGame
Результат System

DownloadComplete() публичный Метод

public DownloadComplete ( ) : void
Результат void

DrawLine() публичный Метод

public DrawLine ( GraphicsDevice graphicsDevice, Vector3 posStart, Vector3 posEnd, Color color, short points ) : void
graphicsDevice GraphicsDevice
posStart Vector3
posEnd Vector3
color Color
points short
Результат void

GetLighting() публичный Метод

public GetLighting ( ushort &x, ushort &y, ushort &z ) : float
x ushort
y ushort
z ushort
Результат float

GetRegion() публичный Метод

public GetRegion ( ushort x, ushort y, ushort z ) : uint
x ushort
y ushort
z ushort
Результат uint

MakeRegionDirty() публичный Метод

public MakeRegionDirty ( int texture, int region ) : void
texture int
region int
Результат void

RayCollision() публичный Метод

public RayCollision ( Vector3 startPosition, Vector3 rayDirection, float distance, int searchGranularity, Vector3 &hitPoint, Vector3 &buildPoint ) : bool
startPosition Vector3
rayDirection Vector3
distance float
searchGranularity int
hitPoint Vector3
buildPoint Vector3
Результат bool

RayCollision() публичный Метод

public RayCollision ( Vector3 startPosition, Vector3 rayDirection, float distance, int searchGranularity, Vector3 &hitPoint, Vector3 &buildPoint, BlockType block ) : bool
startPosition Vector3
rayDirection Vector3
distance float
searchGranularity int
hitPoint Vector3
buildPoint Vector3
block BlockType
Результат bool

RayCollision() публичный Метод

public RayCollision ( Vector3 startPosition, Vector3 src, int searchGranularity ) : bool
startPosition Vector3
src Vector3
searchGranularity int
Результат bool

RegenerateDirtyVertexLists() публичный Метод

public RegenerateDirtyVertexLists ( ) : void
Результат void

RemoveBlock() публичный Метод

public RemoveBlock ( ushort x, ushort y, ushort z ) : void
x ushort
y ushort
z ushort
Результат void

Render() публичный Метод

public Render ( GraphicsDevice graphicsDevice, GameTime gameTime ) : void
graphicsDevice GraphicsDevice
gameTime GameTime
Результат void

SolidAtPoint() публичный Метод

public SolidAtPoint ( Vector3 point ) : bool
point Vector3
Результат bool

SolidAtPointForPlayer() публичный Метод

public SolidAtPointForPlayer ( Vector3 point ) : bool
point Vector3
Результат bool

vertexBuffer_ContentLost() публичный Метод

public vertexBuffer_ContentLost ( object sender, EventArgs e ) : void
sender object
e EventArgs
Результат void

Описание свойств

Light публичное свойство

public float[,,] Light
Результат float[,,]

blockList публичное свойство

public BlockType[,,] blockList
Результат BlockType[,,]

blockTextures публичное свойство

public IMTexture[] blockTextures
Результат IMTexture[]

downloadList публичное свойство

public BlockType[,,] downloadList
Результат BlockType[,,]

vertexListDirty публичное свойство

public bool[,] vertexListDirty
Результат ].bool[