Exemplo n.º 1
0
        public SubTrack(string id, SplittedRegion splitRegion, SubTrackGroup[] trackGroups)
        {
            SplittedRegion = splitRegion;
            TrackGroups = trackGroups;
            Id = id;

            foreach (SubTrackGroup trackGroup in trackGroups)
            {
                trackGroup.OnAttachToSubTrack(this);
            }
        }
Exemplo n.º 2
0
        public SplitBoundsBranch(string name, SplittedRegion splittedRegion, Vector3 pos, RotationData data, GroupBranch group) : base (name, pos, data, group)
        {
            BaseTree staticBranch = new BaseTree("Static", new Vector3(), this, NodeConfig.StaticAndPropogate);
            TracksLeaf = new BaseTree("Tracks", new Vector3(), staticBranch, NodeConfig.StaticAndPropogate);
            BlocksLeaf = new BaseTree("Blocks", new Vector3(), staticBranch, NodeConfig.StaticAndPropogate);
            OthersLeaf = new BaseTree("Others", new Vector3(), this, NodeConfig.Dynamic);

            SplittedRegion = splittedRegion;
            Group = group;
            group.AddSplitBoundsBranch(this);
            Name = name;
        }
Exemplo n.º 3
0
        public MeshBlock(string id, Type type, BlockBounds blockBounds, SplittedRegion splittedRegion, Quaternion rotation, int occludeOrder)
        {
            Id = id;
            BlockType = type;
            RotationQuat = rotation;

            OccludeOrder = occludeOrder;
            OriginalBounds = blockBounds;
            SplittedRegion = splittedRegion;
            RotatedBlockBounds = blockBounds.Copy();

            TypeCode = TypeToTypeCode[type];
            MeshSource = ProceduralMeshSource.GetInstance(TypeCode);
        }
Exemplo n.º 4
0
 public BlockRotationEvent(Group group, Transformation transformation, SplittedRegion splittedRegion)
 {
     Group = group;
     Transformation = transformation;
     SplittedRegion = splittedRegion;
 }
Exemplo n.º 5
0
 public MeshBlock CopyOf(BlockBounds blockBounds, SplittedRegion splittedRegion)
 {
     return new MeshBlock(Id, BlockType, blockBounds, splittedRegion, RotationQuat, OccludeOrder);
 }
Exemplo n.º 6
0
 public static SplitBoundsBranch CreateAndAttachTo(int count, SplittedRegion splittedRegion, GroupBranch groupBranch, RotationData rotationData)
 {
     string name = "split_" + count;
     return new SplitBoundsBranch(name, splittedRegion, new Vector3(), rotationData, groupBranch);
 }
Exemplo n.º 7
0
 private SplitBoundsBranch CreateNewSplitBounds(SplittedRegion splittedRegion)
 {
     return SplitBoundsBranch.CreateAndAttachTo(SplitBoundsBranches.Count, splittedRegion, this, new RotationData(splittedRegion.Bounds, true));
 }
Exemplo n.º 8
0
 public SplitBoundsBranch SplitBoundsBranchContaining(SplittedRegion splittedRegion)
 {
     return SplitBoundsBranches.FirstOrDefault(s => s.SplittedRegion == splittedRegion) ?? CreateNewSplitBounds(splittedRegion);
 }