Esempio n. 1
0
        private void CompositionNoise()
        {
            if (_previewTexture == null)
            {
                return;
            }

            _finalTexture = SceneInfoCalculation.CompositionNoise(_previewTexture, _noise, _noiseThreshold);
        }
Esempio n. 2
0
        private void Generate()
        {
            if (_clearParent && _parent != null)
            {
                for (int i = _parent.childCount - 1; i >= 0; i--)
                {
                    var child = _parent.GetChild(i);
                    Object.DestroyImmediate(child.gameObject);
                }
            }

            SceneInfoCalculation.GenerateBySceneInfo(_scenePrefabs, _parent, _finalTexture != null ? _finalTexture : _previewTexture, _sceneRaycastInfo, _space);
        }
Esempio n. 3
0
        private void Refresh()
        {
            var tranes = GetSelections();

            if (tranes.Length == 0)
            {
                return;
            }

            var bounds      = GenerateBounds(tranes);
            var arrayWidth  = Mathf.FloorToInt(bounds.size.x) + 1 + TextureEdgeSize * 2;
            var arrayHeight = Mathf.FloorToInt(bounds.size.z) + 1 + TextureEdgeSize * 2;

            var hits = SceneJobUtility.RaycastGrid(bounds.center, arrayWidth, arrayHeight, _checkLayerMask, _maxHits);

            DebugRaycast(hits);

            _sceneRaycastInfo.UpdateData(arrayWidth, arrayHeight, hits, _maxHits, bounds.center);
            _previewTexture =
                SceneInfoCalculation.GetTexture(_sceneRaycastInfo, _calculateType, _minRange, _maxRange, _generateLayerMask);
        }