~ubuntu-branches/debian/sid/ember/sid

« back to all changes in this revision

Viewing changes to src/components/ogre/environment/caelum/include/ImageHelper.h

  • Committer: Bazaar Package Importer
  • Author(s): Michael Koch
  • Date: 2009-07-23 07:46:40 UTC
  • Revision ID: james.westby@ubuntu.com-20090723074640-wh0ukzis0kda36qv
Tags: upstream-0.5.6
ImportĀ upstreamĀ versionĀ 0.5.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
This file is part of Caelum.
 
3
See http://www.ogre3d.org/wiki/index.php/Caelum 
 
4
 
 
5
Copyright (c) 2006-2007 Caelum team. See Contributors.txt for details.
 
6
 
 
7
Caelum is free software: you can redistribute it and/or modify
 
8
it under the terms of the GNU Lesser General Public License as published
 
9
by the Free Software Foundation, either version 3 of the License, or
 
10
(at your option) any later version.
 
11
 
 
12
Caelum is distributed in the hope that it will be useful,
 
13
but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
15
GNU Lesser General Public License for more details.
 
16
 
 
17
You should have received a copy of the GNU Lesser General Public License
 
18
along with Caelum. If not, see <http://www.gnu.org/licenses/>.
 
19
*/
 
20
 
 
21
#ifndef CAELUM_HEADER__IMAGE_HELPER_H
 
22
#define CAELUM_HEADER__IMAGE_HELPER_H
 
23
 
 
24
#include "CaelumPrerequisites.h"
 
25
 
 
26
namespace caelum
 
27
{
 
28
        /** Gets the interpolated colour between two pixels from an image.
 
29
        Interpolate a texture pixel by hand. (fx, fy) are in texture coordinates,
 
30
        ranging [0-1] across the entire texture.
 
31
        Smooth blending is only done on the x coordinate.
 
32
        Wrapping is only supported on X as well.
 
33
 
 
34
                @param fx Horizontal coordinate.
 
35
                @param fy Vertical coordiate.
 
36
                @param img The lookup image.
 
37
                @param wrapX To wrap the x coordinate.
 
38
                @return The interpolated colour.
 
39
         */
 
40
        CAELUM_EXPORT Ogre::ColourValue getInterpolatedColour (float fx, float fy, Ogre::Image *img,
 
41
            bool wrapX = true);
 
42
}
 
43
 
 
44
#endif // CAELUM_HEADER__IMAGE_HELPER_H