Example #1
0
        /// <summary>
        /// Returns the "features" string  for passing to the MoModel converter.
        /// </summary>
        /// <param name="inOptions"></param>
        /// <returns></returns>
        private string GetFeaturesString(CSModelOptions inOptions)
        {
            string output = "";

            if (inOptions.mbHasAnimationData == true)
            {
                output += "a";
            }

            if (output.Length == 0)
            {
                output = "0";
            }

            return(output);
        }
Example #2
0
        /// <summary>
        /// Takes each of the passed in files and runs them through the ColladaToMoStaticConverter, with the user selected options.
        /// </summary>
        /// <param name="inastrFilenames"></param>
        public void ConvertToCSModel(string[] inastrFilenames, CSModelOptions inOptions)
        {
            if (mbTaskActive == false)
            {
                //start progress bar
                mMainWindow.StartProgressBar((double)inastrFilenames.Length);

                //clear the current output window
                mMainWindow.ClearOutputWindow();

                //take a copy of the data to be used for conversion
                mOptions       = inOptions;
                mastrFilenames = new string[inastrFilenames.Length];
                inastrFilenames.CopyTo(mastrFilenames, 0);

                //start the task and flag the background task as running.
                mbTaskActive = true;
                ThreadPool.QueueUserWorkItem(this.CSModelConversionTask);
            }
        }
Example #3
0
        /// <summary>
        /// Returns the "transforms" string for passing to the MoModel converter.
        /// </summary>
        /// <param name="inOptions"></param>
        /// <returns></returns>
        private string GetTransformsString(CSModelOptions inOptions)
        {
            string output = "";

            if (inOptions.mbSwapYAndZ == true)
            {
                output += "y";
            }
            if (inOptions.mbFlipVerticalTexCoords == true)
            {
                output += "f";
            }
            if (inOptions.mbCombineMeshes == true)
            {
                output += "c";
            }

            if (output.Length == 0)
            {
                output = "0";
            }

            return(output);
        }
Example #4
0
        /// <summary>
        /// Returns the "vertex declaration" string for passing to the MoModel converter.
        /// </summary>
        /// <param name="inOptions"></param>
        /// <returns></returns>
        private string GetVertexDeclarationString(CSModelOptions inOptions)
        {
            string output = "";

            if (inOptions.mbVertexHasPosition == true)
            {
                output += "p";
            }
            if (inOptions.mbVertexHasTextureCoordinates == true)
            {
                output += "t";
            }
            if (inOptions.mbVertexHasNormals == true)
            {
                output += "n";
            }
            if (inOptions.mbVertexHasVertexColours == true)
            {
                output += "c";
            }
            if (inOptions.mbVertexHasWeights == true)
            {
                output += "w";
            }
            if (inOptions.mbVertexHasJointIndices == true)
            {
                output += "j";
            }

            if (output.Length == 0)
            {
                output = "0";
            }

            return(output);
        }