Ejemplo n.º 1
0
        protected void _PrintFbxScene(FbxScene obj, TextWriter writer)
        {
            writer.WriteLine("    RootNode = {0}", PrintObjectID(obj.GetRootNode()));
            writer.WriteLine("    AnimationEvaluator = {0}", PrintObjectID(obj.GetAnimationEvaluator()));
            writer.WriteLine("    CurrentAnimationStack = {0}", PrintObjectID(obj.GetCurrentAnimationStack()));
            writer.WriteLine("    Global Settings = {0}", PrintObjectID(obj.GetGlobalSettings()));

            int i;

            writer.WriteLine("    MaterialCount = {0}", obj.GetMaterialCount());
            for (i = 0; i < obj.GetMaterialCount(); i++)
            {
                FbxSurfaceMaterial mat = obj.GetMaterial(i);
                writer.WriteLine("        #{0} {1}", i, PrintObjectID(mat));
            }
            writer.WriteLine("    PoseCount = {0}", obj.GetPoseCount());
            for (i = 0; i < obj.GetPoseCount(); i++)
            {
                FbxPose pose = obj.GetPose(i);
                writer.WriteLine("        #{0} {1}", i, PrintObjectID(pose));
            }
            writer.WriteLine("    TextureCount = {0}", obj.GetTextureCount());
            for (i = 0; i < obj.GetTextureCount(); i++)
            {
                FbxTexture texture = obj.GetTexture(i);
                writer.WriteLine("        #{0} {1}", i, PrintObjectID(texture));
            }
            writer.WriteLine("    NodeCount = {0}", obj.GetNodeCount());
            for (i = 0; i < obj.GetNodeCount(); i++)
            {
                FbxNode node = obj.GetNode(i);
                writer.WriteLine("        #{0} {1}", i, PrintObjectID(node));
            }
        }
Ejemplo n.º 2
0
        protected void AcceptScene(FbxScene scene, ISet <object> visitedObjects)
        {
            AcceptDocument(scene, visitedObjects);
            Visit(scene);

            // GenericNodeCount
            // CharacterCount
            // CharacterPoseCount

            int i;

            for (i = 0; i < scene.GetPoseCount(); i++)
            {
                Accept(scene.GetPose(i), visitedObjects);
            }
            for (i = 0; i < scene.GetMaterialCount(); i++)
            {
                Accept(scene.GetMaterial(i), visitedObjects);
            }
            for (i = 0; i < scene.GetTextureCount(); i++)
            {
                Accept(scene.GetTexture(i), visitedObjects);
            }
            for (i = 0; i < scene.GetNodeCount(); i++)
            {
                Accept(scene.GetNode(i), visitedObjects);
            }
            //for (i = 0; i < scene.GetGeometryCount(); i++)
            //{
            //    Accept(scene.GetGeometry(i));
            //}
            //for (i = 0; i < scene.GetVideoCount(); i++)
            //{
            //    Accept(scene.GetVideo(i));
            //}

            if (scene.GetRootNode() != null)
            {
                Accept(scene.GetRootNode(), visitedObjects);
            }

            // other stuff
        }