Exemple #1
0
        public SubTrack(string id, SplittedRegion splitRegion, SubTrackGroup[] trackGroups)
        {
            SplittedRegion = splitRegion;
            TrackGroups = trackGroups;
            Id = id;

            foreach (SubTrackGroup trackGroup in trackGroups)
            {
                trackGroup.OnAttachToSubTrack(this);
            }
        }
Exemple #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;
        }
Exemple #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);
        }
Exemple #4
0
 public BlockRotationEvent(Group group, Transformation transformation, SplittedRegion splittedRegion)
 {
     Group = group;
     Transformation = transformation;
     SplittedRegion = splittedRegion;
 }
Exemple #5
0
 public MeshBlock CopyOf(BlockBounds blockBounds, SplittedRegion splittedRegion)
 {
     return new MeshBlock(Id, BlockType, blockBounds, splittedRegion, RotationQuat, OccludeOrder);
 }
Exemple #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);
 }
Exemple #7
0
 private SplitBoundsBranch CreateNewSplitBounds(SplittedRegion splittedRegion)
 {
     return SplitBoundsBranch.CreateAndAttachTo(SplitBoundsBranches.Count, splittedRegion, this, new RotationData(splittedRegion.Bounds, true));
 }
Exemple #8
0
 public SplitBoundsBranch SplitBoundsBranchContaining(SplittedRegion splittedRegion)
 {
     return SplitBoundsBranches.FirstOrDefault(s => s.SplittedRegion == splittedRegion) ?? CreateNewSplitBounds(splittedRegion);
 }