C# 클래스 TerrainHelpers, tf_client

Utility class for working with terrains
상속: System.Object
파일 보기 프로젝트 열기: wids-eria/tf_client 1 사용 예제들

공개 메소드들

메소드 설명
Clone ( TerrainData source, int detailResolutionPerPatch ) : TerrainData

Clone TerrainData object

ControlTextureToFloatArray ( Texture2D tex, int xBase, int yBase, int width, int height, float scale ) : ].float[

Return a control texture as a float[height,width] for e.g., height or splat

ControlTextureToIntArray ( Texture2D tex, int xBase, int yBase, int width, int height, int res ) : ].int[

Return a control texture as an int[height,width] for e.g., detail distribution

SetTextureFromDetails ( Texture2D tex, int xBase, int yBase, int details, int res ) : void

Update a grayscale control texture using the supplied information

TerrainToTreePosition ( Terrain terrain, Vector3 terrainSpacePosition ) : Vector3

Convert terrainSpacePosition into a tree-space position

TerrainToTreePosition ( Vector3 inverseTerrainSize, Vector3 terrainSpacePosition ) : Vector3

Convert terrainSpacePosition into a tree-space position

TreeToTerrainPosition ( Terrain terrain, Vector3 treeSpacePosition ) : Vector3

Convert treeSpacePosition into a terrain-space position

메소드 상세

Clone() 공개 정적인 메소드

Clone TerrainData object
public static Clone ( TerrainData source, int detailResolutionPerPatch ) : TerrainData
source TerrainData /// A ///
detailResolutionPerPatch int /// A ///
리턴 TerrainData

ControlTextureToFloatArray() 공개 정적인 메소드

Return a control texture as a float[height,width] for e.g., height or splat
public static ControlTextureToFloatArray ( Texture2D tex, int xBase, int yBase, int width, int height, float scale ) : ].float[
tex UnityEngine.Texture2D /// A ///
xBase int /// A ///
yBase int /// A ///
width int /// A ///
height int /// A ///
scale float /// A ///
리턴 ].float[

ControlTextureToIntArray() 공개 정적인 메소드

Return a control texture as an int[height,width] for e.g., detail distribution
public static ControlTextureToIntArray ( Texture2D tex, int xBase, int yBase, int width, int height, int res ) : ].int[
tex UnityEngine.Texture2D /// A ///
xBase int /// A ///
yBase int /// A ///
width int /// A ///
height int /// A ///
res int /// A detail resolution ///
리턴 ].int[

SetTextureFromDetails() 공개 정적인 메소드

Update a grayscale control texture using the supplied information
public static SetTextureFromDetails ( Texture2D tex, int xBase, int yBase, int details, int res ) : void
tex UnityEngine.Texture2D /// A ///
xBase int /// A ///
yBase int /// A ///
details int /// A ///
res int /// A ///
리턴 void

TerrainToTreePosition() 공개 정적인 메소드

Convert terrainSpacePosition into a tree-space position
public static TerrainToTreePosition ( Terrain terrain, Vector3 terrainSpacePosition ) : Vector3
terrain Terrain /// A ///
terrainSpacePosition Vector3 /// A in terrain's local space ///
리턴 Vector3

TerrainToTreePosition() 공개 정적인 메소드

Convert terrainSpacePosition into a tree-space position
public static TerrainToTreePosition ( Vector3 inverseTerrainSize, Vector3 terrainSpacePosition ) : Vector3
inverseTerrainSize Vector3 /// A inverse of the size of the terrain of interest (e.g., (1/x, 1/y, 1/z)) ///
terrainSpacePosition Vector3 /// A in the local space of the terrain of interest ///
리턴 Vector3

TreeToTerrainPosition() 공개 정적인 메소드

Convert treeSpacePosition into a terrain-space position
public static TreeToTerrainPosition ( Terrain terrain, Vector3 treeSpacePosition ) : Vector3
terrain Terrain /// A ///
treeSpacePosition Vector3 /// A homogenous coordinate ///
리턴 Vector3