Esempio n. 1
0
        private void CreateJointNode(Assimp.Scene aiScene, AssimpSceneContainer container)
        {
            var rootElement = this.scene.RootNode;
            var model       = new JointModel(aiScene, container.GetAllBoneInfos());
            var node        = JointNode.Create(model);

            node.DiffuseColor = Color.Red;
            this.jointNode    = node;
            rootElement.Children.Add(node);
        }
Esempio n. 2
0
        public static JointNode Create(JointModel model)
        {
            var vs    = new VertexShader(vertexCode);
            var fs    = new FragmentShader(fragmentCode);
            var array = new ShaderArray(vs, fs);
            var map   = new AttributeMap();

            map.Add("inPosition", JointModel.strPosition);
            map.Add("inBoneIndex", JointModel.strBoneIndex);
            var builder = new RenderMethodBuilder(array, map);
            var node    = new JointNode(model, builder);

            node.Initialize();

            return(node);
        }