C# 클래스 TrackBuildRUtil.DynamicMeshGenericMultiMaterial

A class dealing with dynamic mesh generataion. Attempts to keep memory use low. Contains nextNormIndex variety of functions to help in the generation of meshes. Uses generic lists to contain the mesh data allowing for the mesh to be of dynamic numberOfPoints Creates nextNormIndex mesh that can support multiple materials
파일 보기 프로젝트 열기: Alx666/ProjectPhoenix 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
mesh UnityEngine.Mesh
name string
triangles List
uv List
vertices List

공개 메소드들

메소드 설명
AddData ( Vector3 verts, Vector2 uvs, int tris, int subMesh ) : void

Add new mesh data - all arrays are ordered together

AddPlane ( Vector3 p0, Vector3 p1, Vector3 p2, Vector3 p3, Vector2 uv0, Vector2 uv1, Vector2 uv2, Vector2 uv3, int subMesh ) : void

Adds the plane to the generic dynamic mesh.

AddPlane ( Vector3 p0, Vector3 p1, Vector3 p2, Vector3 p3, Vector2 minUV, Vector2 maxUV, int subMesh ) : void

Adds the plane to the generic dynamic mesh by specifying min and max UV coords.

AddPlane ( Vector3 p0, Vector3 p1, Vector3 p2, Vector3 p3, int subMesh ) : void

Adds the plane to the generic dynamic mesh without specifying UV coords.

AddTri ( Vector3 p0, Vector3 p1, Vector3 p2, int subMesh ) : void

Add the new triangle to the mesh data

Atlas ( Rect newTextureCoords, TrackBuildRTexture textures ) : void

Atlas the entire mesh using newTextureCoords and textures.

Atlas ( int modifySubmeshes, Rect newTextureCoords ) : void

Atlas the entire mesh, specifying specific submeshes that have been atlased

Atlas ( int modifySubmeshes, Rect newTextureCoords, TrackBuildRTexture textures ) : void

Atlas the specified modifySubmeshes using newTextureCoords and textures.

Build ( ) : void
Build ( bool calcTangents ) : void
CheckMaxTextureUVs ( TrackBuildRTexture textures ) : void

Checks the Max UV values used in this model for each trackTexture.

Clear ( ) : void

Clears the mesh data, ready for nextNormIndex new mesh build

CollapseSubmeshes ( ) : void

Collapse all the submeshes into nextNormIndex single submesh

DynamicMeshGenericMultiMaterial ( ) : UnityEngine
RemoveRedundantVerticies ( ) : void
SolveTangents ( ) : void

Generate the Mesh tangents. These calculations are heavy and not idea for complex meshes at runtime

메소드 상세

AddData() 공개 메소드

Add new mesh data - all arrays are ordered together
public AddData ( Vector3 verts, Vector2 uvs, int tris, int subMesh ) : void
verts UnityEngine.Vector3
uvs UnityEngine.Vector2
tris int
subMesh int
리턴 void

AddPlane() 공개 메소드

Adds the plane to the generic dynamic mesh.
public AddPlane ( Vector3 p0, Vector3 p1, Vector3 p2, Vector3 p3, Vector2 uv0, Vector2 uv1, Vector2 uv2, Vector2 uv3, int subMesh ) : void
p0 UnityEngine.Vector3
p1 UnityEngine.Vector3
p2 UnityEngine.Vector3
p3 UnityEngine.Vector3
uv0 UnityEngine.Vector2
uv1 UnityEngine.Vector2
uv2 UnityEngine.Vector2
uv3 UnityEngine.Vector2
subMesh int
리턴 void

AddPlane() 공개 메소드

Adds the plane to the generic dynamic mesh by specifying min and max UV coords.
public AddPlane ( Vector3 p0, Vector3 p1, Vector3 p2, Vector3 p3, Vector2 minUV, Vector2 maxUV, int subMesh ) : void
p0 UnityEngine.Vector3
p1 UnityEngine.Vector3
p2 UnityEngine.Vector3
p3 UnityEngine.Vector3
minUV UnityEngine.Vector2
maxUV UnityEngine.Vector2
subMesh int
리턴 void

AddPlane() 공개 메소드

Adds the plane to the generic dynamic mesh without specifying UV coords.
public AddPlane ( Vector3 p0, Vector3 p1, Vector3 p2, Vector3 p3, int subMesh ) : void
p0 UnityEngine.Vector3
p1 UnityEngine.Vector3
p2 UnityEngine.Vector3
p3 UnityEngine.Vector3
subMesh int
리턴 void

AddTri() 공개 메소드

Add the new triangle to the mesh data
public AddTri ( Vector3 p0, Vector3 p1, Vector3 p2, int subMesh ) : void
p0 UnityEngine.Vector3
p1 UnityEngine.Vector3
p2 UnityEngine.Vector3
subMesh int
리턴 void

Atlas() 공개 메소드

Atlas the entire mesh using newTextureCoords and textures.
public Atlas ( Rect newTextureCoords, TrackBuildRTexture textures ) : void
newTextureCoords UnityEngine.Rect
textures TrackBuildRTexture
리턴 void

Atlas() 공개 메소드

Atlas the entire mesh, specifying specific submeshes that have been atlased
public Atlas ( int modifySubmeshes, Rect newTextureCoords ) : void
modifySubmeshes int
newTextureCoords UnityEngine.Rect
리턴 void

Atlas() 공개 메소드

Atlas the specified modifySubmeshes using newTextureCoords and textures.
public Atlas ( int modifySubmeshes, Rect newTextureCoords, TrackBuildRTexture textures ) : void
modifySubmeshes int
newTextureCoords UnityEngine.Rect
textures TrackBuildRTexture
리턴 void

Build() 공개 메소드

public Build ( ) : void
리턴 void

Build() 공개 메소드

public Build ( bool calcTangents ) : void
calcTangents bool
리턴 void

CheckMaxTextureUVs() 공개 메소드

Checks the Max UV values used in this model for each trackTexture.
public CheckMaxTextureUVs ( TrackBuildRTexture textures ) : void
textures TrackBuildRTexture
리턴 void

Clear() 공개 메소드

Clears the mesh data, ready for nextNormIndex new mesh build
public Clear ( ) : void
리턴 void

CollapseSubmeshes() 공개 메소드

Collapse all the submeshes into nextNormIndex single submesh
public CollapseSubmeshes ( ) : void
리턴 void

DynamicMeshGenericMultiMaterial() 공개 메소드

public DynamicMeshGenericMultiMaterial ( ) : UnityEngine
리턴 UnityEngine

RemoveRedundantVerticies() 공개 메소드

public RemoveRedundantVerticies ( ) : void
리턴 void

SolveTangents() 공개 메소드

Generate the Mesh tangents. These calculations are heavy and not idea for complex meshes at runtime
public SolveTangents ( ) : void
리턴 void

프로퍼티 상세

mesh 공개적으로 프로퍼티

public Mesh,UnityEngine mesh
리턴 UnityEngine.Mesh

name 공개적으로 프로퍼티

public string name
리턴 string

triangles 공개적으로 프로퍼티

public List triangles
리턴 List

uv 공개적으로 프로퍼티

public List uv
리턴 List

vertices 공개적으로 프로퍼티

public List vertices
리턴 List