~ubuntu-branches/ubuntu/quantal/aqsis/quantal

« back to all changes in this revision

Viewing changes to libs/core/isampler.h

  • Committer: Bazaar Package Importer
  • Author(s): Fabrice Coutadeur
  • Date: 2009-08-06 04:53:26 UTC
  • mfrom: (1.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20090806045326-z6xeaaao62idxcc6
Tags: 1.6.0-0ubuntu1
* New upstream release
* debian/control:
  - changed name of lib package to libaqsis1 instead of aqsis-libsc2a
  - changed name of dev package to libaqsis-dev instead of aqsis-libs-dev
  - Added aqsis-data package
  - Revised summary text according to that specified by the RISpec (Pixar)
* Moved examples installation from aqsis.install to aqsis-data.install
* debian/rules: 
  - added content to binary-indep target
* debian/rules: added explicit name of mime file to force dh_installmime
  to generate postinst and prerm scripts

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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