Main Page   Class Overview   Pixels   Images   Geometry   Quick Index  

HxReflect.h File Reference

More...

#include "HxImageRep.h"

Go to the source code of this file.

Functions

HxImageRep L_HXIMAGEREP HxReflect (HxImageRep img, int doX, int doY, int doZ=1)
 Reflection. More...


Detailed Description


Function Documentation

HxImageRep L_HXIMAGEREP HxReflect HxImageRep    img,
int    doX,
int    doY,
int    doZ = 1
 

Reflection.

00014 {
00015     if (img.dimensionality() == 2) {
00016         HxMatrix m = 
00017             HxMatrix::translate2d(img.dimensionSize(1)/2 - 0.5, 
00018                                   img.dimensionSize(2)/2 - 0.5) * 
00019             HxMatrix::reflect2d(doX, doY) * 
00020             HxMatrix::translate2d(-img.dimensionSize(1)/2 + 0.5,
00021                                   -img.dimensionSize(2)/2 + 0.5);
00022         return img.geometricOp2d(m, NEAREST, FORWARD, 0, HxValue(0));
00023     } else {
00024         HxEnvironment::instance()->errorStream()
00025             << "3d reflection not implemented yet" << STD_ENDL;
00026         HxEnvironment::instance()->flush();
00027         return HxImageRep();
00028     }
00029 }


Generated on Tue Jan 8 13:59:21 2002 for C++Reference by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001