Example #1
0
            /// <summary></summary>
            public static Polygon Read(BinaryReader reader, Package package)
            {
                int     vertexCount = UIndex.Read(reader);
                Polygon result      = new Polygon()
                {
                    Vertices = new Vector3f[vertexCount],
                    Base     = reader.ReadVector3f(),
                    Normal   = reader.ReadVector3f(),
                    TextureU = reader.ReadVector3f(),
                    TextureV = reader.ReadVector3f()
                };

                for (var index = 0; index < vertexCount; index++)
                {
                    result.Vertices[index] = reader.ReadVector3f();
                }
                result.Flags            = reader.ReadInt32();
                result.ActorReference   = package.ReadReference(reader);
                result.TextureReference = package.ReadReference(reader);
                result.ItemName         = package.ReadNameValue(reader);
                result.Link             = UIndex.Read(reader);
                result.BrushPolygon     = UIndex.Read(reader);
                result.PanU             = reader.ReadUInt16();
                result.PanV             = reader.ReadUInt16();

                return(result);
            }
Example #2
0
            public override object Read(object target, Package package, System.IO.BinaryReader reader, long end)
            {
                var count = UIndex.Read(reader);
                var list  = new List <Bounds>(count);

                while (count-- > 0)
                {
                    list.Add(Alexandria.Engines.Unreal.Bounds.Read(reader));
                }
                return(list);
            }
Example #3
0
            public override object Read(object target, Package package, System.IO.BinaryReader reader, long end)
            {
                int count = UIndex.Read(reader);

                if (count == 0)
                {
                    return(null);
                }
                var list = new Vertex[count];

                for (var index = 0; index < count; index++)
                {
                    list[index] = new Vertex()
                    {
                        VertexIndex = UIndex.Read(reader),
                        SideIndex   = UIndex.Read(reader)
                    }
                }
                ;
                return(list);
            }
        }