C# Class TerrainEngine.TerrainTile

Mostrar archivo Open project: geofftnz/TestBench1 Class Usage Examples

Public Methods

Method Description
Draw ( GameTime gameTime, GraphicsDevice device, Effect effect, Vector3 eyePos, Matrix viewMatrix, Matrix worldMatrix, Matrix projectionMatrix, Vector3 lightDirection ) : void
DrawBox ( GameTime gameTime, GraphicsDevice device, Effect effect, Vector3 eyePos, Matrix viewMatrix, Matrix worldMatrix, Matrix projectionMatrix, Vector3 lightDirection ) : void
IsInBox ( Vector3 p ) : bool
LoadContent ( GraphicsDevice device ) : void
SetDataFromCells ( TerrainEngine.Terrain cells, int xofs, int yofs, int stride ) : void
SetTransformMatrix ( Matrix worldMatrix ) : void

Creates the transform and inv-transform matrices.

Setup ( GraphicsDevice device ) : void
TerrainTile ( int width, int height, Vector3 offset, float scale ) : System
UpdateHeights ( GraphicsDevice device ) : void
UpdateShadeTexture ( Color dummydata ) : void

Protected Methods

Method Description
LoadContent ( ) : void

Upload textures

UnloadContent ( ) : void

Private Methods

Method Description
CreateHeightTexture ( GraphicsDevice device ) : void
CreateNormalTexture ( GraphicsDevice device ) : void

Creates the normal texture for this tile.

CreateShadeTexture ( GraphicsDevice device ) : void
RenderBoundingBox ( GraphicsDevice device ) : void
RenderTile ( GraphicsDevice device ) : void
SetupBoundingBox ( ) : void
SetupTestData ( ) : void
UpdateHeightTexture ( ) : void

Method Details

Draw() public method

public Draw ( GameTime gameTime, GraphicsDevice device, Effect effect, Vector3 eyePos, Matrix viewMatrix, Matrix worldMatrix, Matrix projectionMatrix, Vector3 lightDirection ) : void
gameTime Microsoft.Xna.Framework.GameTime
device GraphicsDevice
effect Microsoft.Xna.Framework.Graphics.Effect
eyePos Vector3
viewMatrix Matrix
worldMatrix Matrix
projectionMatrix Matrix
lightDirection Vector3
return void

DrawBox() public method

public DrawBox ( GameTime gameTime, GraphicsDevice device, Effect effect, Vector3 eyePos, Matrix viewMatrix, Matrix worldMatrix, Matrix projectionMatrix, Vector3 lightDirection ) : void
gameTime Microsoft.Xna.Framework.GameTime
device GraphicsDevice
effect Microsoft.Xna.Framework.Graphics.Effect
eyePos Vector3
viewMatrix Matrix
worldMatrix Matrix
projectionMatrix Matrix
lightDirection Vector3
return void

IsInBox() public method

public IsInBox ( Vector3 p ) : bool
p Vector3
return bool

LoadContent() protected method

Upload textures
protected LoadContent ( ) : void
return void

LoadContent() public method

public LoadContent ( GraphicsDevice device ) : void
device GraphicsDevice
return void

SetDataFromCells() public method

public SetDataFromCells ( TerrainEngine.Terrain cells, int xofs, int yofs, int stride ) : void
cells TerrainEngine.Terrain
xofs int
yofs int
stride int
return void

SetTransformMatrix() public method

Creates the transform and inv-transform matrices.
public SetTransformMatrix ( Matrix worldMatrix ) : void
worldMatrix Matrix
return void

Setup() public method

public Setup ( GraphicsDevice device ) : void
device GraphicsDevice
return void

TerrainTile() public method

public TerrainTile ( int width, int height, Vector3 offset, float scale ) : System
width int
height int
offset Vector3
scale float
return System

UnloadContent() protected method

protected UnloadContent ( ) : void
return void

UpdateHeights() public method

public UpdateHeights ( GraphicsDevice device ) : void
device GraphicsDevice
return void

UpdateShadeTexture() public method

public UpdateShadeTexture ( Color dummydata ) : void
dummydata Color
return void