"Fossies" - the Fresh Open Source Software Archive

Member "aqsis-1.8.2/libs/core/isampler.h" (24 Aug 2012, 2939 Bytes) of package /linux/privat/aqsis-1.8.2.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 // Aqsis
    2 // Copyright (C) 1997 - 2001, Paul C. Gregory
    3 //
    4 // Contact: pgregory@aqsis.org
    5 //
    6 // This library is free software; you can redistribute it and/or
    7 // modify it under the terms of the GNU General Public
    8 // License as published by the Free Software Foundation; either
    9 // version 2 of the License, or (at your option) any later version.
   10 //
   11 // This library is distributed in the hope that it will be useful,
   12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
   13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   14 // General Public License for more details.
   15 //
   16 // You should have received a copy of the GNU General Public
   17 // License along with this library; if not, write to the Free Software
   18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
   19 
   20 
   21 /** \file
   22         \brief Defines the interface to objects that can provide sample patterns.
   23         \author Paul C. Gregory (pgregory@aqsis.org)
   24 */
   25 
   26 #ifndef ISAMPLER_H_INCLUDED //{
   27 #define ISAMPLER_H_INCLUDED 1
   28 
   29 #include    <aqsis/aqsis.h>
   30 
   31 namespace Aqsis {
   32 
   33 class CqVector2D;
   34 
   35 //------------------------------------------------------------------------------
   36 /** \brief An interface to sample distribution patterns generation.
   37  *
   38  * This interface provides sample distribution information for functions in Aqsis
   39  * that need to sample signals effectively.
   40  *
   41  */
   42 class IqSampler
   43 {
   44     public:
   45         virtual ~IqSampler() {}
   46         /** \brief Return a set of 2D sample positions over the default region.
   47          *
   48          * Return an array of unit sample positions. The coordinate space is a canonical
   49          * unit square, centered around the origin, the caller is responsible for
   50          * transforming the point into the appropriate coordinate space.
   51          * The returned value points to array storage owned by the sampler, the caller
   52          * is not responsible for disposing of the array.
   53          *
   54          * \note Currently this is expected to return a pixels worth of samples.
   55          *
   56          * \returns - a constant pointer to an array of sample positions.
   57          */
   58         virtual const CqVector2D* get2DSamples() = 0;       
   59         /** \brief Return a set of 1D sample positions over the specified region.
   60          *
   61          * Returns a set of 1D values for the number of samples requested.
   62          * The returned value points to array storage owned by the sampler, the caller
   63          * is not responsible for disposing of the array.
   64          *
   65          * \note Currently this is expected to return a pixels worth of samples.
   66          *
   67          * \returns - a constant pointer to an array of sample times.
   68          */
   69         virtual const TqFloat* get1DSamples() = 0;  
   70         /** \brief Return a set of 1D shuffle offsets over the specified sample range.
   71          *
   72          *  Returns a set of integer indices between 0 and the number of samples, randomly
   73          *  shuffled for jittering array indices.
   74          *
   75          * \returns - a constant pointer to an array of integer indices.
   76          */
   77         virtual const TqInt* getShuffledIndices() = 0;
   78 };
   79 
   80 } // namespace Aqsis
   81 
   82 #endif //} ISAMPLER_H_INCLUDED