Class VertexData
- Namespace
- TMPEffects.CharacterData
- Assembly
- TMPEffects.dll
Holds data about a character's mesh.
public class VertexData
- Inheritance
-
VertexData
- Inherited Members
Constructors
VertexData(TMP_CharacterInfo)
public VertexData(TMP_CharacterInfo info)
Parameters
info
TMP_CharacterInfo
VertexData(TMP_Vertex, TMP_Vertex, TMP_Vertex, TMP_Vertex)
public VertexData(TMP_Vertex bl, TMP_Vertex tl, TMP_Vertex tr, TMP_Vertex br)
Parameters
bl
TMP_Vertextl
TMP_Vertextr
TMP_Vertexbr
TMP_Vertex
Fields
initial
The initial vertex of the character.
public readonly ReadOnlyVertexData initial
Field Value
Properties
BL_Alpha
Get or set the alpha of the bottom left vertex.
public byte BL_Alpha { get; set; }
Property Value
BL_Color
Get or set the color of the bottom left vertex.
Note that this will mark both colors and alphas as dirty.
Use SetColor(int, Color32, bool) if you want to only set color.
public Color32 BL_Color { get; set; }
Property Value
- Color32
BL_Position
Get or set the position of the bottom left vertex.
public Vector3 BL_Position { get; set; }
Property Value
- Vector3
BL_UV0
Get or set the UV0 of the bottom left vertex.
public Vector3 BL_UV0 { get; set; }
Property Value
- Vector3
BL_UV2
Get or set the UV2 of the bottom left vertex.
public Vector3 BL_UV2 { get; set; }
Property Value
- Vector3
BR_Alpha
Get or set the alpha of the bottom right vertex.
public byte BR_Alpha { get; set; }
Property Value
BR_Color
Get or set the color of the bottom right vertex.
Note that this will mark both colors and alphas as dirty.
Use SetColor(int, Color32, bool) if you want to only set color.
public Color32 BR_Color { get; set; }
Property Value
- Color32
BR_Position
Get or set the position of the bottom right vertex.
public Vector3 BR_Position { get; set; }
Property Value
- Vector3
BR_UV0
Get or set the UV0 of the bottom right vertex.
public Vector3 BR_UV0 { get; set; }
Property Value
- Vector3
BR_UV2
Get or set the UV2 of the bottom right vertex.
public Vector3 BR_UV2 { get; set; }
Property Value
- Vector3
TL_Alpha
Get or set the alpha of the top left vertex.
public byte TL_Alpha { get; set; }
Property Value
TL_Color
Get or set the color of the top left vertex.
Note that this will mark both colors and alphas as dirty.
Use SetColor(int, Color32, bool) if you want to only set color.
public Color32 TL_Color { get; set; }
Property Value
- Color32
TL_Position
Get or set the position of the top left vertex.
public Vector3 TL_Position { get; set; }
Property Value
- Vector3
TL_UV0
Get or set the UV0 of the bottom right vertex.
public Vector3 TL_UV0 { get; set; }
Property Value
- Vector3
TL_UV2
Get or set the UV2 of the bottom right vertex.
public Vector3 TL_UV2 { get; set; }
Property Value
- Vector3
TR_Alpha
Get or set the alpha of the top right vertex.
public byte TR_Alpha { get; set; }
Property Value
TR_Color
Get or set the color of the top right vertex.
Note that this will mark both colors and alphas as dirty.
Use SetColor(int, Color32, bool) if you want to only set color.
public Color32 TR_Color { get; set; }
Property Value
- Color32
TR_Position
Get or set the position of the top right vertex.
public Vector3 TR_Position { get; set; }
Property Value
- Vector3
TR_UV0
Get or set the UV0 of the top right vertex.
public Vector3 TR_UV0 { get; set; }
Property Value
- Vector3
TR_UV2
Get or set the UV2 of the top right vertex.
public Vector3 TR_UV2 { get; set; }
Property Value
- Vector3
alphasDirty
Whether the vertex alphas have been manipulated.
public bool alphasDirty { get; }
Property Value
colorsDirty
Whether the vertex colors have been manipulated.
public bool colorsDirty { get; }
Property Value
positionsDirty
Whether the positions have been manipulated.
public bool positionsDirty { get; }
Property Value
uvsDirty
Whether the UVs have been manipulated.
public bool uvsDirty { get; }
Property Value
Methods
GetAlpha(int)
Get the alpha of the vertex associated with the index.
0 => bottom left
1 => top left
2 => top right
3 => bottom right
public byte GetAlpha(int i)
Parameters
i
intThe index.
Returns
- byte
The alpha of the vertex associated with the index.
Exceptions
GetColor(int)
Get the color of the vertex associated with the index.
0 => bottom left
1 => top left
2 => top right
3 => bottom right
public Color32 GetColor(int i)
Parameters
i
intThe index.
Returns
- Color32
The color of the vertex associated with the index.
Exceptions
GetPosition(int)
Get the position of the vertex associated with the index.
0 => bottom left
1 => top left
2 => top right
3 => bottom right
public Vector3 GetPosition(int i)
Parameters
i
intThe index.
Returns
- Vector3
The position of the vertex associated with the index.
Exceptions
GetUV0(int)
Get the UV0 of the vertex associated with the index.
0 => bottom left
1 => top left
2 => top right
3 => bottom right
public Vector2 GetUV0(int i)
Parameters
i
intThe index.
Returns
- Vector2
The UV0 of the vertex associated with the index.
Exceptions
GetUV2(int)
Get the UV2 of the vertex associated with the index.
0 => bottom left
1 => top left
2 => top right
3 => bottom right
public Vector2 GetUV2(int i)
Parameters
i
intThe index.
Returns
- Vector2
The UV2 of the vertex associated with the index.
Exceptions
Reset()
Reset the mesh to initial.
public void Reset()
ResetAlphas()
public void ResetAlphas()
ResetColors()
Reset the vertex colors to initial.
public void ResetColors()
ResetPositions()
Reset the vertices to initial.
public void ResetPositions()
ResetUVs()
Reset the UVs to initial.
public void ResetUVs()
SetAlpha(int, float)
Set the alpha of the vertex associated with the index.
0 => bottom left
1 => top left
2 => top right
3 => bottom right
public void SetAlpha(int i, float value)
Parameters
Exceptions
SetColor(int, Color32, bool)
Set the color of the vertex associated with the index.
0 => bottom left
1 => top left
2 => top right
3 => bottom right
public void SetColor(int i, Color32 value, bool ignoreAlpha = false)
Parameters
i
intThe index.
value
Color32The color to set the vertex too.
ignoreAlpha
boolWhether to ignore the alpha of the passed in color.
Exceptions
SetPosition(int, Vector3)
Set the position of the vertex associated with the index.
0 => bottom left
1 => top left
2 => top right
3 => bottom right
public void SetPosition(int i, Vector3 value)
Parameters
i
intThe index.
value
Vector3
Exceptions
SetUV0(int, Vector2)
Set the UV0 of the vertex associated with the index.
0 => bottom left
1 => top left
2 => top right
3 => bottom right
public void SetUV0(int i, Vector2 value)
Parameters
i
intThe index.
value
Vector2
Exceptions
SetUV2(int, Vector2)
Set the UV2 of the vertex associated with the index.
0 => bottom left
1 => top left
2 => top right
3 => bottom right
public void SetUV2(int i, Vector2 value)
Parameters
i
intThe index.
value
Vector2