コード例 #1
0
 public override void Serialize(System.IO.Stream stream, bool read)
 {
     if (read)
     {
         System.IO.BinaryReader r = new System.IO.BinaryReader(stream);
         SerializeOrient(stream, read);
         op_type = (TBoolOpType)r.ReadUInt32();
         int op_count = r.ReadInt32();
         for (int i = 0; i < op_count; i++)
         {
             TCSGObjectType type = (TCSGObjectType)r.ReadUInt32();
             TCSGObject     obj  = CreateObj(type);
             obj.Serialize(stream, true);
             AddOperand(obj);
         }
         need_update = true;
     }
     else
     {
         System.IO.BinaryWriter r = new System.IO.BinaryWriter(stream);
         r.Write((UInt32)TCSGObjectType.BOOL_OP);
         SerializeOrient(stream, read);
         r.Write((UInt32)op_type);
         r.Write(operand.Count);
         for (int i = 0; i < operand.Count; i++)
         {
             operand[i].Serialize(stream, false);
         }
     }
 }
コード例 #2
0
ファイル: CSGOpNot.cs プロジェクト: Alan-Baylis/CSG_prototype
 public void SetRight(TCSGObject use_right)
 {
     right = use_right;
 }
コード例 #3
0
ファイル: CSGOpNot.cs プロジェクト: Alan-Baylis/CSG_prototype
 public void  SetLeft(TCSGObject use_left)
 {
     left = use_left;
 }
コード例 #4
0
ファイル: CSGOpNot.cs プロジェクト: Alan-Baylis/CSG_prototype
 public TCSGOpNot(TCSGObject use_parent)
     : base(use_parent)
 {
 }
コード例 #5
0
 public void RemoveOperand(TCSGObject use_op)
 {
     operand.Remove(use_op);
     need_update = true;
 }
コード例 #6
0
        public void InsertOperand(TCSGObject insert_before, TCSGObject use_op)
        {
            int index = operand.IndexOf(insert_before);

            operand.Insert(index, use_op);
        }
コード例 #7
0
 public void AddOperand(TCSGObject use_op)
 {
     operand.Add(use_op);
     need_update = true;
 }