C# Class TrackBuildRUtil.DynamicMesh

Show file Open project: Alx666/ProjectPhoenix Class Usage Examples

Public Properties

Property Type Description
bounds UnityEngine.Bounds
mesh UnityEngine.Mesh
tangents List
triangles List
uv List
vertices List

Public Methods

Method Description
AddData ( Vector3 verts, Vector2 uvs, int tris, Vector3 norms, Vector4 tan, int subMesh ) : void

Add new mesh data - all arrays are ordered together

AddPlane ( Vector3 verts, Vector2 uvs, int submesh ) : void
AddPlane ( Vector3 verts, Vector2 uvs, int tris, int submesh ) : void
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 uv0, Vector2 uv1, Vector2 uv2, Vector2 uv3, int tri0, int tri1, int tri2, int tri3, int tri4, int tri5, int subMesh ) : void
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.

Build ( ) : void
Clear ( ) : void

Clears the mesh data, ready for nextNormIndex new mesh build

DynamicMesh ( string newName = "dynmesh" ) : System.Collections.Generic

Private Methods

Method Description
BuildThisMesh ( ) : void
MeshOverflow ( int numberOfNewVerts ) : bool

Method Details

AddData() public method

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

AddPlane() public method

public AddPlane ( Vector3 verts, Vector2 uvs, int submesh ) : void
verts UnityEngine.Vector3
uvs UnityEngine.Vector2
submesh int
return void

AddPlane() public method

public AddPlane ( Vector3 verts, Vector2 uvs, int tris, int submesh ) : void
verts UnityEngine.Vector3
uvs UnityEngine.Vector2
tris int
submesh int
return void

AddPlane() public method

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
return void

AddPlane() public method

public AddPlane ( Vector3 p0, Vector3 p1, Vector3 p2, Vector3 p3, Vector2 uv0, Vector2 uv1, Vector2 uv2, Vector2 uv3, int tri0, int tri1, int tri2, int tri3, int tri4, int tri5, 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
tri0 int
tri1 int
tri2 int
tri3 int
tri4 int
tri5 int
subMesh int
return void

AddPlane() public method

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
return void

AddPlane() public method

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
return void

Build() public method

public Build ( ) : void
return void

Clear() public method

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

DynamicMesh() public method

public DynamicMesh ( string newName = "dynmesh" ) : System.Collections.Generic
newName string
return System.Collections.Generic

Property Details

bounds public property

public Bounds,UnityEngine bounds
return UnityEngine.Bounds

mesh public property

public Mesh,UnityEngine mesh
return UnityEngine.Mesh

tangents public property

public List tangents
return List

triangles public property

public List triangles
return List

uv public property

public List uv
return List

vertices public property

public List vertices
return List