예제 #1
0
        public CTrisVertex GetVertex(CIwVec3 p, CIwAnimSkinSetKey bonesKey, IList<float> w, CIwVec3 n, CIwVec2 uv0, CIwVec2 uv1, CIwColour col)
        {
            int vertexIndex = GetPositionIndex(p,bonesKey,w);

            return new CTrisVertex(vertexIndex, GetNormalIndex(n), GetUV0Index(uv0), GetUV1Index(uv1), GetColorIndex(col));
        }
예제 #2
0
 public int GetUV1Index(CIwVec2 v)
 {
     int i;
     if (uv1s.TryGetValue(v, out i))
         return i;
     while (TargetMesh.UVs.Count <= 1)
         TargetMesh.UVs.Add(new CUVs() { SetID = TargetMesh.UVs.Count });
     i = TargetMesh.UVs[1].UVs.Count;
     TargetMesh.UVs[1].UVs.Add(v);
     uv1s[v] = i;
     return i;
 }