#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... |
|
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 } |