/// <summary> /// Import into the mesh, using the skeleton provided, and /// assigning the animation data to a new animation. /// </summary> /// <param name="transform">the world transform to apply to this object</param> /// <param name="mesh">the mesh we will populate</param> /// <param name="skeleton">the skeleton to which we will add animations (or null if we are creating one)</param> /// <param name="animationName">the name that will be used for the animation</param> /// <param name="materialNamespace">namespace used for generation of material names</param> public void Import(Matrix4 transform, Mesh mesh, Skeleton skeleton, string animationName, string materialNamespace) { ColladaMeshReader reader = null; XmlDocument document = new XmlDocument(); document.Load(m_Stream); XmlElement rootElement = document.DocumentElement; // This is slightly weird. The client calls this method on this object, // but then we determine which version of collada we're actually looking // at, and create a new instances of a derived collada reader. As an // outcome, we have to copy fields from the factory-created instance // back to this instance. // TODO: Need a static factory method on the base class to create the // collada reader instance, then call that instance from the client; // that way we'll only have one instance in the first place. reader = GetColladaParser(rootElement); reader.m_ColladaRootNode = rootElement; reader.m_Document = document; reader.m_MaterialBuilder = new MaterialScriptBuilder(materialNamespace); ColladaMeshInfo meshInfo = new ColladaMeshInfo(mesh); reader.ReadCollada(rootElement, meshInfo); meshInfo.NoRiggingCulling = NoRiggingCulling; meshInfo.Process(transform, skeleton, m_BaseFile, animationName); this.m_MaterialBuilder = reader.MaterialBuilder; }
public virtual void ReadCollada(XmlNode node, ColladaMeshInfo meshInfo) { throw new NotImplementedException(); }