コード例 #1
0
        public FourierTask(WaveSpectrumBufferCPU buffer, FourierCPU fourier, int index, int numGrids)
            : base(true)
        {
            if (m_index == -1)
            {
                throw new InvalidOperationException("Index can be -1. Fourier for multiple buffers is not being used");
            }

            if (!(buffer is DisplacementBufferCPU)) //TODO - fix me
            {
                throw new InvalidOperationException("Fourier task currently only designed for displacement buffers");
            }

            m_buffer = buffer as DisplacementBufferCPU;

            m_fourier = fourier;

            m_index = index;

            m_numGrids = numGrids;

            WaveSpectrumBufferCPU.Buffer b = m_buffer.GetBuffer(m_index);

            m_data         = b.data;
            m_results      = b.results;
            m_map          = b.map;
            m_doublePacked = b.doublePacked;
        }
コード例 #2
0
 public InitSpectrumDisplacementsTask(DisplacementBufferCPU buffer, WaveSpectrumCondition condition, float time) : base(true)
 {
     this.Buffer       = buffer;
     this.NumGrids     = condition.Key.NumGrids;
     this.Size         = condition.Key.Size;
     this.SpectrumType = condition.Key.SpectrumType;
     this.TimeValue    = time;
     this.Reset(condition, time);
     this.CreateKTables(condition.InverseGridSizes());
 }
コード例 #3
0
        public InitSpectrumDisplacementsTask(DisplacementBufferCPU buffer, WaveSpectrumCondition condition, float time)
            : base(true)
        {
            Buffer = buffer;
            NumGrids = condition.Key.NumGrids;
            Size = condition.Key.Size;
            SpectrumType = condition.Key.SpectrumType;
            TimeValue = time;

            Reset(condition, time);

            CreateKTables(condition.InverseGridSizes());
        }
コード例 #4
0
ファイル: FourierTask.cs プロジェクト: GameDiffs/TheForest
 public FourierTask(WaveSpectrumBufferCPU buffer, FourierCPU fourier, int index, int numGrids)
     : base(true)
 {
     if (this.m_index == -1)
     {
         throw new InvalidOperationException("Index can be -1. Fourier for multiple buffers is not being used");
     }
     if (!(buffer is DisplacementBufferCPU))
     {
         throw new InvalidOperationException("Fourier task currently only designed for displacement buffers");
     }
     this.m_buffer = (buffer as DisplacementBufferCPU);
     this.m_fourier = fourier;
     this.m_index = index;
     this.m_numGrids = numGrids;
     WaveSpectrumBufferCPU.Buffer buffer2 = this.m_buffer.GetBuffer(this.m_index);
     this.m_data = buffer2.data;
     this.m_results = buffer2.results;
     this.m_map = buffer2.map;
     this.m_doublePacked = buffer2.doublePacked;
 }
コード例 #5
0
 public InitSpectrumDisplacementsTask GetInitSpectrumDisplacementsTask(DisplacementBufferCPU buffer, float time)
 {
     return(new InitSpectrumDisplacementsTask(buffer, this, time));
 }
コード例 #6
0
 public InitSpectrumDisplacementsTask GetInitSpectrumDisplacementsTask(DisplacementBufferCPU buffer, float time)
 {
     return new InitSpectrumDisplacementsTask(buffer, this, time);
 }