Animation sample used in skeletal animation Thread safety - This class is thread safe.
示例#1
0
文件: Track.cs 项目: tpb3d/TPB3D
        public Track(Sample sample)
        {
            if (sample == null) throw new ArgumentNullException();
            this.sample = sample;

            Reset();
        }
示例#2
0
文件: Sample.cs 项目: tpb3d/TPB3D
		public static Sample FindSample(Sample[] samples, string name)
        {
            if (samples == null) return null;

            for (int i = 0; i < samples.Length; i++)
            {
                if (samples[i].name == name) return samples[i];
            }
            return null;
        }
示例#3
0
文件: Model.cs 项目: tpb3d/TPB3D
		public Model(ShaderProgram shader, Group[] groups, Bone[] bones, Sample[] samples)
		{
			this.shader = shader;
			this.groups = groups;
			this.bones = bones;
            this.samples = samples;
			
			this.vertexTransformations = new Matrix4[maxBones];
			for (int i = 0; i < maxBones ; i++ ) 
			{
				this.vertexTransformations[i] = Matrix4.Identity;
			}
			
			Console.WriteLine(string.Format("Model created with {0} bones and {1} groups.", bones.Length, groups.Length));
			
			shader.Use();
			shader.SetSamplerUniform(sampler0UniformName, 0);
			this.boneAttribIndex = shader.FindAttribIndex(boneAttributeName);
		}