예제 #1
0
        static void Main(string[] args)
        {
            ManagedManager manager = new ManagedManager();
            ManagedScene   scene   = new ManagedScene(manager, "test");

            if (manager.ImportScene(ref scene, "E:\\u3dmodel\\ttj.FBX\0"))
            {
                Console.WriteLine(scene.GetName());
                ManagedSceneNode root = scene.GetRootNode();
                loopTheNodes(root);
            }
            Console.ReadLine();
        }
예제 #2
0
        static void loopTheNodes(ManagedSceneNode node)
        {
            ManagedMesh lMesh = node.GetMesh();

            Console.WriteLine(node.GetName() + ":");
            if (lMesh.IsValid)
            {
                Console.WriteLine("mesh:" + lMesh.GetName() + " control points count: " + lMesh.GetControlPointCount());
                Console.WriteLine("polygon count: " + lMesh.GetPolygonCount());
                for (int i = 0; i < lMesh.GetControlPointCount(); i++)
                {
                    double[] vector4 = lMesh.GetControlPointAt(i);
                }
            }
            int count = node.GetChildCount();

            for (int i = 0; i < count; i++)
            {
                ManagedSceneNode current = node.GetChild(i);
                loopTheNodes(current);
            }
        }
예제 #3
0
 public ManagedMesh(ManagedSceneNode pNode, string pName)
 {
     m_nativeObject = Mesh_Create(pNode.NativeObject, pName);
 }