コード例 #1
0
        public void TestGetNextDocument()
        {
            var archive  = ThreeDXMLFile.Create(_stream);
            var document = archive.GetNextDocument("wheel.3drep");

            Assert.IsInstanceOfType(document, typeof(XDocument));
        }
コード例 #2
0
        public void TestListOfFiles()
        {
            var archive  = ThreeDXMLFile.Create(_stream);
            var fileList = archive.ContainedFiles;

            Assert.AreEqual(17, fileList.Count);
            Assert.IsTrue(fileList.Contains("manifest.xml"));
            Assert.IsTrue(fileList.Contains("quad.3dxml"));
            Assert.IsTrue(fileList.Contains("wheel.3drep"));
        }
コード例 #3
0
        public IModel Parse(Stream stream)
        {
            var fileArchive = ThreeDXMLFile.Create(stream);
            var xmlManifest = ReadManifest(fileArchive);
            // create 3dxml model and fill it with data
            var internalModel = new ThreeDXMLImplementation(ParseUtility.GetHeader(xmlManifest))
            {
                ReferenceReps    = ParseAssetRepresentation(xmlManifest, fileArchive),
                ThreeDReferences = ParseReference3D(xmlManifest),
                ThreeDInstances  = ParseInstance3D(xmlManifest),
                InstanceReps     = ParseInstanceRep(xmlManifest)
            };

            // return the model definition
            return(internalModel.ToModel());
        }
コード例 #4
0
        public void TestFailGetNextDocument()
        {
            var archive = ThreeDXMLFile.Create(_stream);

            archive.GetNextDocument("error.3drep");
        }
コード例 #5
0
 public void TestGetManifest()
 {
     var archive  = ThreeDXMLFile.Create(_stream);
     var manifest = archive.GetManifest();
 }
コード例 #6
0
        public void TestCreation()
        {
            var archive = ThreeDXMLFile.Create(_stream);

            Assert.IsInstanceOfType(archive, typeof(IThreeDXMLArchive));
        }