Exemple #1
0
 private void Awake()
 {
     _cube        = transform;
     _mainCamera  = Camera.main;
     _pivotCamera = _mainCamera.transform.parent;
     _config      = ToolBox.CubeManager.Config;
 }
Exemple #2
0
        public static Cube <T> Create <T>(this CubeBuilder cubebuilder)
            where T : struct, IComparable
        {
            CubeConfig cube = cubebuilder.CreateConfig();

            return(new Cube <T>(cube));
        }
Exemple #3
0
 public CubeBuilder()
 {
     _root              = new CubeConfig();
     _storeconfig       = new StorageConfigBuilder();
     _datasourceconfigs = new List <DataSourceBuilder>();
     _metadataconfig    = new MetaDataBuilder();
     _cubeSource        = new CubeSourceBuilder();
 }
Exemple #4
0
 public void Init(CubeConfig config)
 {
     _config = config;
     if (_audioSource != null)
     {
         _audioSource.clip = _config.Audio.ClickPlatform;
     }
 }
Exemple #5
0
 public DataSchema(CubeConfig config,
                   DataSourceCollection datasources,
                   IMemberStorage <T, Dimension <T> > dimstorage,
                   IMemberStorage <T, Measure <T> > messtorage,
                   IMemberStorage <T, Metric <T> > metstorage) : this(dimstorage, messtorage, metstorage)
 {
     _datasources = datasources;
     this.Config  = config.MetaData;
     this.Initialize();
 }
Exemple #6
0
        public CubeConfig RandomCube()
        {
            var cube = new CubeConfig
            {
                Scale = Configuration.Get <double>("Scale")
            };

            for (var i = 0; i < 12; i++)
            {
                cube.Planes.Add(RandomCubePlane());
            }

            return(cube);
        }
Exemple #7
0
        internal CubeConfig CreateConfig()
        {
            CubeConfig cube = _root;

            cube.Name        = _name;
            cube.Storage     = _storeconfig.Create();
            cube.MetaData    = _metadataconfig.Create();
            cube.DataSources = new DataSourceConfigCollection();
            cube.Source      = _cubeSource.Create();

            foreach (var item in _datasourceconfigs)
            {
                cube.DataSources.Add(item.Create());
            }

            return(cube);
        }
Exemple #8
0
 public DataSourceCollection(CubeConfig config) : this()
 {
     this.Initialize(config.DataSources);
 }
Exemple #9
0
 public Cube(CubeConfig config)
 {
     this.Config = config;
     this.Init();
 }
Exemple #10
0
 internal CubeBuilder(CubeConfig root)
 {
     _root = root;
 }