예제 #1
0
        /// <summary>
        /// Load a robot model from a rigid node and list of meshes
        /// </summary>
        /// <param name="node">The node to base the model off of</param>
        /// <param name="meshes">The meshes to render</param>
        public void LoadModel(RigidNode_Base node, List <BXDAMesh> meshes)
        {
            ModelLoaded = false;

            if (node == null || meshes == null)
            {
                return;
            }

            baseNode = new OGL_RigidNode(node);

            nodes = baseNode.ListAllNodes();

            for (int i = 0; i < meshes.Count; i++)
            {
                ((OGL_RigidNode)nodes[i]).LoadMeshes(meshes[i]);
            }
            Matrix4 mattest = Matrix4.Identity;

            try
            {
                cam.pose = Matrix4.Identity;
            }
            catch (Exception e)
            {
                MessageBox.Show(e.ToString());
                throw;
            }
            activeObjects = new List <RigidNode_Base>();

            ModelLoaded = true;
        }
예제 #2
0
        /// <summary>
        /// Load a robot model from a rigid node and list of meshes
        /// </summary>
        /// <param name="node">The node to base the model off of</param>
        /// <param name="meshes">The meshes to render</param>
        public void LoadModel(RigidNode_Base node, List <BXDAMesh> meshes)
        {
            modelLoaded = false;

            if (node == null || meshes == null)
            {
                return;
            }

            baseNode = (OGL_RigidNode)node;

            nodes = baseNode.ListAllNodes();

            for (int i = 0; i < meshes.Count; i++)
            {
                ((OGL_RigidNode)nodes[i]).loadMeshes(meshes[i]);
            }

            cam.pose = Matrix4.Identity;

            activeObjects = new List <RigidNode_Base>();

            modelLoaded = true;
        }