Exemple #1
0
        /// <summary>
        /// Calculate and upload the final projection
        /// </summary>
        void ExecuteTransform()
        {
            if (_visualizer == null)
            {
                return;
            }


            if (viewer4.projector.IsCullable(_bounds))
            {
                _visualizer.Clear(_mesh);
                return;
            }

            if (viewer4.background)
            {
                if (_hyperState == 3)
                {
                    ExecuteVisualizer();
                }

                if (_hyperState == 0)
                {
                    _visualizer.Initialize(_helper);
                    _hyperState = 1;
                    viewer4.projectorJob.AddJob(new ProjectUnit(_buffer, transform4.localToWorldMatrix.ToTRS(transform4.localScale), _visualizer, this));
                }
                else
                {
                    _hyperState = 2;
                }
            }
            else
            {
                _visualizer.Initialize(_helper);
                viewer4.projector.Project(_buffer, transform4.localToWorldMatrix.ToTRS(transform4.localScale), _visualizer);
            }
        }