예제 #1
0
 public TerrainModelContentBuilder(int patchSize, HeightMapContent heightMap, MaterialContent material, int detailTextureTiling, int horizontalScale)
 {
     _patchSize = patchSize;
     _heightMap = heightMap;
     _material = material;
     _detailTextureTiling = detailTextureTiling;
     _horizontalScale = horizontalScale;
 }
		public PatchContentBuilder(int patchSize, int patchOffsetX, int patchOffsetY, HeightMapContent heightMap, int numLevels, int detailTextureTiling, int horizontalScale)
		{
			_patchSize = patchSize;
			_patchOffsetX = patchOffsetX;
			_patchOffsetY = patchOffsetY;
			_heightMap = heightMap;
			_numLevels = numLevels;
			_detailTextureTiling = detailTextureTiling;
			_horizontalScale = horizontalScale;
		}
예제 #3
0
 public LevelContentBuilder(HeightMapContent heightMap, int patchSize, int numLevels, int level, int startX, int endX, int startY, int endY)
 {
     _heightMap = heightMap;
     _patchSize = patchSize;
     _numLevels = numLevels;
     _level = level;
     _startX = startX;
     _endX = endX;
     _startY = startY;
     _endY = endY;
 }
예제 #4
0
		public NormalMap(HeightMapContent heightMap)
		{
			_heightMap = heightMap;
			m_nWidth = heightMap.Width;
			m_nHeight = heightMap.Height;

			m_pNormals = new Vector3[m_nWidth, m_nHeight];
			for (int x = 0; x < m_nWidth; ++x)
				for (int y = 0; y < m_nHeight; ++y)
					m_pNormals[x, y] = CalculateNormal(x, y);
		}