private void PackVector4()
        {
            Vector4[] ar;

            if (SameSizeValue != null)
            {
                //if (FilterOutSameSizeData)
                //  return;

                SameSizeValue.GenerateIfNull();

                ar = SameSizeValue.GetV4(Destination);
            }
            else
            {
                ar = new Vector4[VertexDataTypes.vCnt];

                for (var i = 0; i < VertexDataTypes.vCnt; i++)
                {
                    ar[i] = new Vector4();
                }

                for (var i = 0; i < 4; i++)
                {
                    var v   = links[i];
                    var tmp = v.GetDataArray();

                    if (tmp == null)
                    {
                        continue;
                    }

                    for (var j = 0; j < VertexDataTypes.vCnt; j++)
                    {
                        ar[j][i] = tmp[j];
                    }
                }
            }

            if (ar != null)
            {
                Destination.Set(ar);
            }
        }
Example #2
0
        void PackVector4()
        {
            Vector4[] ar;

            if (SameSizeValue != null)
            {
                if (MeshSolutions.dataTypeFilter != null && SameSizeValue.GetType() != MeshSolutions.dataTypeFilter)
                {
                    return;
                }

                SameSizeValue.GenerateIfNull();

                ar = SameSizeValue.GetV4(Target);
            }
            else
            {
                ar = new Vector4[MeshSolutions.vcnt];

                for (int i = 0; i < MeshSolutions.vcnt; i++)
                {
                    ar[i] = new Vector4();
                }

                for (int i = 0; i < 4; i++)
                {
                    VertexDataValue v   = vals[i];
                    float[]         tmp = v.GetDataArray();

                    if (tmp != null)
                    {
                        for (int j = 0; j < MeshSolutions.vcnt; j++)
                        {
                            ar[j][i] = tmp[j];
                        }
                    }
                }
            }

            if (ar != null)
            {
                Target.Set(ar);
            }
        }