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