C# Class Infiniminer.BlockEngine

Mostrar archivo Open project: bobisfat/Infiniminer Class Usage Examples

Public Properties

Property Type Description
Light float[,,]
blockList BlockType[,,]
blockTextures IMTexture[]
downloadList BlockType[,,]
vertexListDirty ].bool[

Public Methods

Method Description
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

Private Methods

Method Description
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

Method Details

AddBlock() public method

public AddBlock ( ushort x, ushort y, ushort z, BlockType blockType ) : void
x ushort
y ushort
z ushort
blockType BlockType
return void

BlockAtPoint() public method

public BlockAtPoint ( Vector3 point ) : BlockType
point Vector3
return BlockType

BlockEngine() public method

public BlockEngine ( InfiniminerGame gameInstance ) : System
gameInstance InfiniminerGame
return System

DownloadComplete() public method

public DownloadComplete ( ) : void
return void

DrawLine() public method

public DrawLine ( GraphicsDevice graphicsDevice, Vector3 posStart, Vector3 posEnd, Color color, short points ) : void
graphicsDevice GraphicsDevice
posStart Vector3
posEnd Vector3
color Color
points short
return void

GetLighting() public method

public GetLighting ( ushort &x, ushort &y, ushort &z ) : float
x ushort
y ushort
z ushort
return float

GetRegion() public method

public GetRegion ( ushort x, ushort y, ushort z ) : uint
x ushort
y ushort
z ushort
return uint

MakeRegionDirty() public method

public MakeRegionDirty ( int texture, int region ) : void
texture int
region int
return void

RayCollision() public method

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
return bool

RayCollision() public method

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
return bool

RayCollision() public method

public RayCollision ( Vector3 startPosition, Vector3 src, int searchGranularity ) : bool
startPosition Vector3
src Vector3
searchGranularity int
return bool

RegenerateDirtyVertexLists() public method

public RegenerateDirtyVertexLists ( ) : void
return void

RemoveBlock() public method

public RemoveBlock ( ushort x, ushort y, ushort z ) : void
x ushort
y ushort
z ushort
return void

Render() public method

public Render ( GraphicsDevice graphicsDevice, GameTime gameTime ) : void
graphicsDevice GraphicsDevice
gameTime GameTime
return void

SolidAtPoint() public method

public SolidAtPoint ( Vector3 point ) : bool
point Vector3
return bool

SolidAtPointForPlayer() public method

public SolidAtPointForPlayer ( Vector3 point ) : bool
point Vector3
return bool

vertexBuffer_ContentLost() public method

public vertexBuffer_ContentLost ( object sender, EventArgs e ) : void
sender object
e EventArgs
return void

Property Details

Light public_oe property

public float[,,] Light
return float[,,]

blockList public_oe property

public BlockType[,,] blockList
return BlockType[,,]

blockTextures public_oe property

public IMTexture[] blockTextures
return IMTexture[]

downloadList public_oe property

public BlockType[,,] downloadList
return BlockType[,,]

vertexListDirty public_oe property

public bool[,] vertexListDirty
return ].bool[