public void ReadTechnique( Controller controller, Source source, XmlNode node, ColladaMeshInfo meshInfo ) { foreach( XmlNode childNode in node.ChildNodes ) { switch( childNode.Name ) { case "accessor": { // default the accessor id to the source id string accessorId = source.SourceId; if( childNode.Attributes[ "id" ] != null ) accessorId = childNode.Attributes[ "id" ].Value; string arrayId = childNode.Attributes[ "source" ].Value; // Get the part after the '#' if( arrayId.StartsWith( "#" ) ) arrayId = arrayId.Substring( 1 ); else log.InfoFormat( "Array Id {0} does not start with '#'", arrayId ); Debug.Assert( DataSources.ContainsKey( arrayId ) ); DataSource dataSource = DataSources[ arrayId ]; // TODO: Check stride and offset Accessor accessor = new Accessor( dataSource, accessorId ); int stride = -1; if( childNode.Attributes[ "stride" ] != null ) stride = int.Parse( childNode.Attributes[ "stride" ].Value ); accessor.Stride = stride; ReadAccessor( accessor, childNode ); // Link this accessor in both as the source, and the id, which // allows us to reference it by either name Accessors[ accessorId ] = accessor; Accessors[ source.SourceId ] = accessor; source.AddAccessor( accessor ); } break; case "combiner": ReadCombiner( source.SourceId, childNode, meshInfo ); break; case "joints": { SkinController skinController = controller as SkinController; Debug.Assert( skinController != null ); ReadJoints( skinController, childNode, meshInfo ); } break; default: DebugMessage( childNode ); break; } } }