2
// Copyright (C) 1997 - 2001, Paul C. Gregory
4
// Contact: pgregory@aqsis.org
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.
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.
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
22
\brief Defines the interface to objects that can provide sample patterns.
23
\author Paul C. Gregory (pgregory@aqsis.org)
26
#ifndef ISAMPLER_H_INCLUDED //{
27
#define ISAMPLER_H_INCLUDED 1
29
#include <aqsis/aqsis.h>
35
//------------------------------------------------------------------------------
36
/** \brief An interface to sample distribution patterns generation.
38
* This interface provides sample distribution information for functions in Aqsis
39
* that need to sample signals effectively.
45
virtual ~IqSampler() {}
46
/** \brief Return a set of 2D sample positions over the default region.
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.
54
* \note Currently this is expected to return a pixels worth of samples.
56
* \returns - a constant pointer to an array of sample positions.
58
virtual const CqVector2D* get2DSamples() = 0;
59
/** \brief Return a set of 1D sample positions over the specified region.
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.
65
* \note Currently this is expected to return a pixels worth of samples.
67
* \returns - a constant pointer to an array of sample times.
69
virtual const TqFloat* get1DSamples() = 0;
70
/** \brief Return a set of 1D shuffle offsets over the specified sample range.
72
* Returns a set of integer indices between 0 and the number of samples, randomly
73
* shuffled for jittering array indices.
75
* \returns - a constant pointer to an array of integer indices.
77
virtual const TqInt* getShuffledIndices() = 0;
82
#endif //} ISAMPLER_H_INCLUDED