C# 클래스 FarseerPhysics.Common.TextureTools.Terrain

Simple class to maintain a terrain. It can keep track
파일 보기 프로젝트 열기: prime31/Nez 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
cellSize int
center Microsoft.Xna.Framework.Vector2
decomposer TriangulationAlgorithm
height float
iterations int
pointsPerUnit int
subCellSize int
width float
world FarseerPhysics.Dynamics.World

공개 메소드들

메소드 설명
Terrain ( World world, AABB area ) : System.Collections.Generic

Creates a new terrain.

Terrain ( World world, Vector2 position, float width, float height ) : System.Collections.Generic

Creates a new terrain

applyData ( sbyte data, Vector2 offset = default(Vector2) ) : void

Apply the specified texture data to the terrain.

generateTerrain ( int gx, int gy ) : void
initialize ( ) : void

Initialize the terrain for use.

modifyTerrain ( Vector2 location, sbyte value ) : void

Modify a single point in the terrain.

regenerateTerrain ( ) : void

Regenerate the terrain.

removeOldData ( int xStart, int xEnd, int yStart, int yEnd ) : void

메소드 상세

Terrain() 공개 메소드

Creates a new terrain.
public Terrain ( World world, AABB area ) : System.Collections.Generic
world FarseerPhysics.Dynamics.World The World
area FarseerPhysics.Collision.AABB The area of the terrain.
리턴 System.Collections.Generic

Terrain() 공개 메소드

Creates a new terrain
public Terrain ( World world, Vector2 position, float width, float height ) : System.Collections.Generic
world FarseerPhysics.Dynamics.World The World
position Microsoft.Xna.Framework.Vector2 The position (center) of the terrain.
width float The width of the terrain.
height float The height of the terrain.
리턴 System.Collections.Generic

applyData() 공개 메소드

Apply the specified texture data to the terrain.
public applyData ( sbyte data, Vector2 offset = default(Vector2) ) : void
data sbyte
offset Microsoft.Xna.Framework.Vector2
리턴 void

generateTerrain() 공개 메소드

public generateTerrain ( int gx, int gy ) : void
gx int
gy int
리턴 void

initialize() 공개 메소드

Initialize the terrain for use.
public initialize ( ) : void
리턴 void

modifyTerrain() 공개 메소드

Modify a single point in the terrain.
public modifyTerrain ( Vector2 location, sbyte value ) : void
location Microsoft.Xna.Framework.Vector2 World location to modify. Automatically clipped.
value sbyte -1 = inside terrain, 1 = outside terrain
리턴 void

regenerateTerrain() 공개 메소드

Regenerate the terrain.
public regenerateTerrain ( ) : void
리턴 void

removeOldData() 공개 메소드

public removeOldData ( int xStart, int xEnd, int yStart, int yEnd ) : void
xStart int
xEnd int
yStart int
yEnd int
리턴 void

프로퍼티 상세

cellSize 공개적으로 프로퍼티

Points per cell.
public int cellSize
리턴 int

center 공개적으로 프로퍼티

Center of terrain in world units.
public Vector2,Microsoft.Xna.Framework center
리턴 Microsoft.Xna.Framework.Vector2

decomposer 공개적으로 프로퍼티

Decomposer to use when regenerating terrain. Can be changed on the fly without consequence. Note: Some decomposerers are unstable.
public TriangulationAlgorithm decomposer
리턴 TriangulationAlgorithm

height 공개적으로 프로퍼티

Height of terrain in world units.
public float height
리턴 float

iterations 공개적으로 프로퍼티

Number of iterations to perform in the Marching Squares algorithm. Note: More then 3 has almost no effect on quality.
public int iterations
리턴 int

pointsPerUnit 공개적으로 프로퍼티

Points per each world unit used to define the terrain in the point cloud.
public int pointsPerUnit
리턴 int

subCellSize 공개적으로 프로퍼티

Points per sub cell.
public int subCellSize
리턴 int

width 공개적으로 프로퍼티

Width of terrain in world units.
public float width
리턴 float

world 공개적으로 프로퍼티

World to manage terrain in.
public World,FarseerPhysics.Dynamics world
리턴 FarseerPhysics.Dynamics.World