コード例 #1
0
        private void SetInfluences(params InfluenceDef[] influences)
        {
            Remapper remap = new Remapper();

            remap.Remap(influences);
            for (int i = 0; i < remap.RemapTable.Length; ++i)
            {
                _facePoints[i].InfluenceIndex = remap.RemapTable[i];
            }
            _influences = new InfluenceDef[remap.ImplementationLength];
            for (int i = 0; i < remap.ImplementationLength; ++i)
            {
                _influences[i] = influences[remap.ImplementationTable[i]];
            }

            HashSet <string> utilized = new HashSet <string>();

            foreach (InfluenceDef inf in _influences)
            {
                if (inf != null)
                {
                    for (int i = 0; i < inf.WeightCount; ++i)
                    {
                        utilized.Add(inf.Weights[i].Bone);
                    }
                }
            }
            _utilizedBones = utilized.ToArray();
        }
コード例 #2
0
        public override bool Equals(object obj)
        {
            InfluenceDef other = obj as InfluenceDef;

            if (other == null || WeightCount == other.WeightCount)
            {
                return(false);
            }

            for (int i = 0; i < WeightCount; ++i)
            {
                if (Weights[i] != other.Weights[i])
                {
                    return(false);
                }
            }

            return(true);
        }
コード例 #3
0
 public Vertex(Vec3 position, InfluenceDef inf, Vec2 texCoord)
     : this(position, inf)
 {
     TexCoord = texCoord;
 }
コード例 #4
0
 public Vertex(Vec3 position, InfluenceDef inf, Vec3 normal, Vec3 binormal, Vec3 tangent, Vec2 texCoord, ColorF4 color)
     : this(position, inf, normal, texCoord, color)
 {
     Binormal = binormal; Tangent = tangent;
 }
コード例 #5
0
 public Vertex(Vec3 position, InfluenceDef inf, Vec3 normal, Vec2 texCoord, ColorF4 color)
     : this(position, inf, normal, texCoord)
 {
     Color = color;
 }
コード例 #6
0
 public Vertex(Vec3 position, InfluenceDef inf, Vec3 normal)
     : this(position, inf)
 {
     Normal = normal;
 }
コード例 #7
0
 public Vertex(Vec3 position, InfluenceDef inf)
     : this(position) { Influence = inf; }
コード例 #8
0
 public Vertex(InfluenceDef inf)
 {
     Influence = inf;
 }