예제 #1
0
        public override AbstractConstruct Clone(ConstructCollection newcol)
        {
            var newc = new LooseConstruct(this);

            newc.constructs = constructs;
            return(newc);
        }
예제 #2
0
        protected AbstractConstruct(BinaryReader reader, ConstructCollection constructs)
        {
            if (reader == null)
            {
                throw new ArgumentNullException("reader");
            }
            if (constructs == null)
            {
                throw new ArgumentNullException("construct");
            }

            this.constructs = constructs;

            byte[] buffer = new byte[STR_LENGTH];

            reader.Read(buffer, 0, STR_LENGTH);
            ParentName = Encoding.ASCII.GetString(buffer);
            ParentName = ParentName.Substring(0, ParentName.IndexOf('\0'));

            reader.Read(buffer, 0, STR_LENGTH);
            ChildName = Encoding.ASCII.GetString(buffer);
            ChildName = ChildName.Substring(0, ChildName.IndexOf('\0'));

            Origin = ConvertData.ToVector3(reader);
        }
예제 #3
0
        public override AbstractConstruct Clone(ConstructCollection newcol)
        {
            var newc = new FixConstruct(this);

            newc.constructs   = newcol;
            newc.fixtransform = fixtransform;
            return(newc);
        }
예제 #4
0
        public PrisConstruct(BinaryReader reader, ConstructCollection constructs)
            : base(reader, constructs)
        {
            Offset          = ConvertData.ToVector3(reader);
            Rotation        = ConvertData.ToMatrix3x3(reader);
            AxisTranslation = ConvertData.ToVector3(reader);

            Min = reader.ReadSingle();
            Max = reader.ReadSingle();
        }
예제 #5
0
        public ConstructCollection CloneAll()
        {
            var newcol = new ConstructCollection();

            foreach (var c in constructs)
            {
                newcol.constructs.Add(c.Clone(newcol));
            }
            return(newcol);
        }
예제 #6
0
        public override AbstractConstruct Clone(ConstructCollection newcol)
        {
            var newc = new PrisConstruct(this);

            newc.constructs      = newcol;
            newc.Offset          = Offset;
            newc.AxisTranslation = AxisTranslation;
            newc.Min             = Min;
            newc.Max             = Max;
            return(newc);
        }
예제 #7
0
        public SphereConstruct(BinaryReader reader, ConstructCollection constructs)
            : base(reader, constructs)
        {
            Offset   = ConvertData.ToVector3(reader);
            Rotation = ConvertData.ToMatrix3x3(reader);

            Min1 = reader.ReadSingle();
            Max1 = reader.ReadSingle();
            Min2 = reader.ReadSingle();
            Max2 = reader.ReadSingle();
            Min3 = reader.ReadSingle();
            Max3 = reader.ReadSingle();
        }
예제 #8
0
        public override AbstractConstruct Clone(ConstructCollection newcol)
        {
            var newc = new SphereConstruct(this);

            newc.constructs = newcol;
            newc.Offset     = Offset;
            newc.Min1       = Min1;
            newc.Min2       = Min2;
            newc.Min3       = Min3;
            newc.Max1       = Max1;
            newc.Max2       = Max2;
            newc.Max3       = Max3;
            return(newc);
        }
예제 #9
0
 public FixConstruct(BinaryReader reader, ConstructCollection constructs)
     : base(reader, constructs)
 {
     Rotation     = ConvertData.ToMatrix3x3(reader);
     fixtransform = Rotation * Matrix4.CreateTranslation(Origin);
 }
예제 #10
0
 public FixConstruct(ConstructCollection constructs) : base(constructs)
 {
 }
예제 #11
0
 public RevConstruct(ConstructCollection constructs) : base(constructs)
 {
 }
예제 #12
0
 public LooseConstruct(BinaryReader reader, ConstructCollection constructs)
     : base(reader, constructs)
 {
     Rotation = ConvertData.ToMatrix3x3(reader);
 }
예제 #13
0
 public PrisConstruct(ConstructCollection constructs) : base(constructs)
 {
 }
예제 #14
0
 public SphereConstruct(ConstructCollection constructs) : base(constructs)
 {
 }
예제 #15
0
 public abstract AbstractConstruct Clone(ConstructCollection newcol);
예제 #16
0
 protected AbstractConstruct(ConstructCollection constructs)
 {
     this.constructs = constructs;
 }