UnityUtilities
UnityUtilities.MeshVertex Class Reference

A vertex in a MeshTriangle. Can -and should!- be shared by multiple triangles. Used in a MeshCreator. Cannot be part of more than one MeshCreator. More...

Public Member Functions

 MeshVertex (Vector3 position, Vector3 normal=default(Vector3), Color color=new Color(), Vector2 uv=new Vector2())
 Creates a new MeshVertex. More...
 

Properties

Vector3 Position [get, set]
 The local position of the vertex inside the mesh. More...
 
Vector3 Normal [get, set]
 The normal of the vertex. More...
 
Color Color [get, set]
 The color of the vertex. More...
 
Vector2 UV [get, set]
 The first UV coordinates of the vertex. More...
 
int VertexIndex [get, set]
 The index of this vertex inside the MeshCreator.MeshVertices list. Automatically assigned by MeshCreator.AddVertex(), MeshCreator.AddTriangle() and MeshCreator.AddQuad(). Used to identify the vertex for actually creating the Mesh in MeshCreator.UpdateMesh(). More...
 

Detailed Description

A vertex in a MeshTriangle. Can -and should!- be shared by multiple triangles. Used in a MeshCreator. Cannot be part of more than one MeshCreator.

Constructor & Destructor Documentation

§ MeshVertex()

UnityUtilities.MeshVertex.MeshVertex ( Vector3  position,
Vector3  normal = default(Vector3),
Color  color = new Color(),
Vector2  uv = new Vector2() 
)

Creates a new MeshVertex.

Parameters
positionThe local position of the vertex inside the mesh.
normalThe normal of the vertex.
colorThe color of the vertex.
uvThe first UV coordinates of the vertex.

Property Documentation

§ Color

Color UnityUtilities.MeshVertex.Color
getset

The color of the vertex.

§ Normal

Vector3 UnityUtilities.MeshVertex.Normal
getset

The normal of the vertex.

§ Position

Vector3 UnityUtilities.MeshVertex.Position
getset

The local position of the vertex inside the mesh.

§ UV

Vector2 UnityUtilities.MeshVertex.UV
getset

The first UV coordinates of the vertex.

§ VertexIndex

int UnityUtilities.MeshVertex.VertexIndex
getset

The index of this vertex inside the MeshCreator.MeshVertices list. Automatically assigned by MeshCreator.AddVertex(), MeshCreator.AddTriangle() and MeshCreator.AddQuad(). Used to identify the vertex for actually creating the Mesh in MeshCreator.UpdateMesh().


The documentation for this class was generated from the following file: