/// <summary>
        /// Create the uv set from the UV type selected
        /// </summary>
        /// <param name="uvSet">The UV set to use</param>
        /// <returns>The property bag of the UV set</returns>
        internal static Dictionary <string, float> CreateUVSet(UV_SET uvSet)
        {
            Dictionary <string, float> array = new Dictionary <string, float>();

            switch (uvSet)
            {
            case UV_SET.RoadPavement:
                array = SetRoadsWithPavments();
                break;

            case UV_SET.RoadOnly:
                array = SetRoadsWithOutPavments();
                break;

            case UV_SET.RoadPavementExtended:
                array = SetRoadsWithPavments_Extended();
                break;

            case UV_SET.RoadPavementInnerCurveA:
                array = SetRoadsWithPavments_CurveA();
                break;

            case UV_SET.RoadPavementInnerCurveB:
                array = SetRoadsWithPavments_CurveB();
                break;

            case UV_SET.RoadPavementInnerCurveC:
                array = SetRoadsWithPavments_CurveC();
                break;
            }

            return(array);
        }
Example #2
0
            public void Read( BinaryReader R )
            {
                m_diffuse = R.ReadBoolean() ? new Texture( R ) : null;
                m_diffuseReUse = (REUSE_MODE) R.ReadInt32();

                m_normal = R.ReadBoolean() ? new Texture( R ) : null;
                m_normalReUse = (REUSE_MODE) R.ReadInt32();

                m_gloss = R.ReadBoolean() ? new Texture( R ) : null;
                m_glossReUse = (REUSE_MODE) R.ReadInt32();

                m_metal = R.ReadBoolean() ? new Texture( R ) : null;
                m_metalReUse = (REUSE_MODE) R.ReadInt32();

                m_specular = R.ReadBoolean() ? new Texture( R ) : null;
                m_specularReUse = (REUSE_MODE) R.ReadInt32();

                m_maskingMode = (MASKING_MODE) R.ReadInt32();
                m_mask = R.ReadBoolean() ? new Texture( R ) : null;
                m_maskReUse = (REUSE_MODE) R.ReadInt32();

                // Single textures
                m_AO = R.ReadBoolean() ? new Texture( R ) : null;
                m_translucency = R.ReadBoolean() ? new Texture( R ) : null;
                m_emissive = R.ReadBoolean() ? new Texture( R ) : null;

                // UV sets
                m_UVSet = (UV_SET) R.ReadInt32();
                m_UVOffset.x = R.ReadSingle();
                m_UVOffset.y = R.ReadSingle();
                m_UVScale.x = R.ReadSingle();
                m_UVScale.y = R.ReadSingle();

                m_maskUVSet = (UV_SET) R.ReadInt32();
                m_maskUVOffset.x = R.ReadSingle();
                m_maskUVOffset.y = R.ReadSingle();
                m_maskUVScale.x = R.ReadSingle();
                m_maskUVScale.y = R.ReadSingle();

                m_useColorConstant = R.ReadBoolean();
                m_colorConstant.x = R.ReadSingle();
                m_colorConstant.y = R.ReadSingle();
                m_colorConstant.z = R.ReadSingle();
                m_colorConstant.w = R.ReadSingle();

                m_errorLevel = (ERROR_LEVEL) R.ReadInt32();
                m_errors = R.ReadString();
                if ( m_errors == string.Empty )
                    m_errors = null;
                m_warnings = R.ReadString();
                if ( m_warnings == string.Empty )
                    m_warnings = null;
            }
Example #3
0
 /// <summary>
 /// The the UV set to use
 /// </summary>
 /// <param name="uvSet">The uv set to use</param>
 public static void SetUVValues(UV_SET uvSet)
 {
     RoadUVSet = uvSet;
     UVSET     = UVSetBuilder.CreateUVSet(uvSet);
 }