Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonique Dewanchand <m.dewanchand@atmind.nl>2013-02-06 12:40:12 +0400
committerMonique Dewanchand <m.dewanchand@atmind.nl>2013-02-06 12:40:12 +0400
commit23bf087338204b45e5b72c1269bd013a88cf3f9d (patch)
treeb90552717bd7c3af01697d33de29b3872d6d537a /source/blender/compositor/operations/COM_WrapOperation.h
parenta78cf854b4c811d5df24d10cf3b9a0d9d6679ca0 (diff)
Code clean up translate node
added constants. moved the code to a separate class. so it can be reused for other nodes
Diffstat (limited to 'source/blender/compositor/operations/COM_WrapOperation.h')
-rw-r--r--source/blender/compositor/operations/COM_WrapOperation.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/source/blender/compositor/operations/COM_WrapOperation.h b/source/blender/compositor/operations/COM_WrapOperation.h
new file mode 100644
index 00000000000..b84d85e7b5d
--- /dev/null
+++ b/source/blender/compositor/operations/COM_WrapOperation.h
@@ -0,0 +1,47 @@
+/*
+ * Copyright 2011, Blender Foundation.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Contributor:
+ * Jeroen Bakker
+ * Monique Dewanchand
+ */
+
+#ifndef _COM_WrapOperation_h_
+#define _COM_WrapOperation_h_
+
+#include "COM_NodeOperation.h"
+
+class WrapOperation : public NodeOperation {
+private:
+ SocketReader *m_inputOperation;
+ int m_wrappingType;
+public:
+ WrapOperation();
+ bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output);
+ void executePixel(float output[4], float x, float y, PixelSampler sampler);
+
+ void initExecution();
+ void deinitExecution();
+
+ void setWrapping(int wrapping_type);
+ float getWrappedOriginalXPos(float x);
+ float getWrappedOriginalYPos(float y);
+
+ void setFactorXY(float factorX, float factorY);
+};
+
+#endif