C# Класс MyGame.Terrain

This class represent the Terrain that draw the terrain and has utility methods to deal with the terrain
Наследование: Microsoft.Xna.Framework.DrawableGameComponent, IRenderable
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
DetailDistance float
DetailTexture Microsoft.Xna.Framework.Graphics.Texture2D
DetailTextureTiling float
RTexture Microsoft.Xna.Framework.Graphics.Texture2D

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

Метод Описание
Draw ( ) : void
Draw ( GameTime gameTime ) : void

This method renders the current state.

GetHeightAtPosition ( float X, float Z ) : float
GetHeightAtPosition ( float X, float Z, float &Steepness ) : float
SetClipPlane ( Vector4 Plane ) : void
Terrain ( Game game, Camera camera, Microsoft.Xna.Framework.Graphics.Texture2D HeightMap, float CellSize, float Height, Microsoft.Xna.Framework.Graphics.Texture2D BaseTexture, float TextureTiling, Vector3 LightDirection ) : System
Update ( GameTime gameTime ) : void

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

Метод Описание
createIndices ( ) : void
createVertices ( ) : void
genNormals ( ) : void
getHeights ( ) : void

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

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

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

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

This method renders the current state.
public Draw ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime The elapsed game time.
Результат void

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

public GetHeightAtPosition ( float X, float Z ) : float
X float
Z float
Результат float

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

public GetHeightAtPosition ( float X, float Z, float &Steepness ) : float
X float
Z float
Steepness float
Результат float

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

public SetClipPlane ( Vector4 Plane ) : void
Plane Vector4
Результат void

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

public Terrain ( Game game, Camera camera, Microsoft.Xna.Framework.Graphics.Texture2D HeightMap, float CellSize, float Height, Microsoft.Xna.Framework.Graphics.Texture2D BaseTexture, float TextureTiling, Vector3 LightDirection ) : System
game Game
camera Camera
HeightMap Microsoft.Xna.Framework.Graphics.Texture2D
CellSize float
Height float
BaseTexture Microsoft.Xna.Framework.Graphics.Texture2D
TextureTiling float
LightDirection Vector3
Результат System

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

public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
Результат void

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

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

public float DetailDistance
Результат float

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

public Texture2D,Microsoft.Xna.Framework.Graphics DetailTexture
Результат Microsoft.Xna.Framework.Graphics.Texture2D

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

public float DetailTextureTiling
Результат float

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

public Texture2D,Microsoft.Xna.Framework.Graphics RTexture
Результат Microsoft.Xna.Framework.Graphics.Texture2D