Beispiel #1
0
        public bool Read(BinaryReader reader)
        {
            try
            {
                m_textureRef = reader.ReadUInt32();
                m_position.x = reader.ReadSingle();
                m_position.z = reader.ReadSingle();
                m_position.y = reader.ReadSingle();

                float angle = reader.ReadSingle();
                m_rotation = Quaternion.Euler(0, angle, 0);

                m_scale.x = reader.ReadSingle();
                m_scale.y = reader.ReadSingle();
                m_scale.z = reader.ReadSingle();
                m_ambient = reader.ReadSingle();
                m_flags   = new Wm3Flags(reader.ReadUInt32());
                m_loaded  = true;
            }
            catch (Exception e)
            {
                Debug.LogException(e);
                m_loaded = false;
            }
            return(m_loaded);
        }
Beispiel #2
0
        public bool Read(BinaryReader reader)
        {
            try
            {
                ReadPosition(reader);
                ReadCounters(reader);
                ReadVertices(reader);
                ReadTriangles(reader);
                ReadReferences(reader);

                //currently not used
                m_ambient = reader.ReadSingle();
                m_flags   = new Wm3Flags(reader.ReadUInt32());

                m_loaded = true;
            }
            catch (Exception e)
            {
                Debug.LogException(e);
                m_loaded = false;
            }
            return(m_loaded);
        }
Beispiel #3
0
        public bool Read(BinaryReader reader)
        {
            try
            {
                m_textureType = reader.ReadByte();
                m_flags       = new Wm3Flags(reader.ReadUInt32());
                m_ambient     = reader.ReadSingle();
                m_albedo      = reader.ReadSingle();
                m_bitmapCount = reader.ReadUInt16();

                m_bitmapRefId = new UInt32[m_bitmapCount];
                for (int i = 0; i < m_bitmapCount; i++)
                {
                    m_bitmapRefId[i] = reader.ReadUInt32();
                }
                m_loaded = true;
            }
            catch (Exception e)
            {
                Debug.LogException(e);
                m_loaded = false;
            }
            return(m_loaded);
        }