00001 //**************************************************************************/ 00002 // Copyright (c) 2008 Autodesk, Inc. 00003 // All rights reserved. 00004 // 00005 // Use of this software is subject to the terms of the Autodesk license 00006 // agreement provided at the time of installation or download, or which 00007 // otherwise accompanies this software in either electronic or hard copy form. 00008 // 00009 //**************************************************************************/ 00010 // DESCRIPTION: 00011 // CREATED: September 2009 00012 //**************************************************************************/ 00013 00014 #if !defined IMAGE_FILTER_H_ 00015 #define IMAGE_FILTER_H_ 00016 00017 namespace mudbox { 00018 00019 class Image; 00020 class Texture; 00021 class ImageFilter; 00022 00023 //------------------------------------------------------------------------------ 00045 class MBDLL_DECL ImageFilter : public Node 00046 { 00047 DECLARE_CLASS; 00048 00049 public: 00050 enum FilterType { 00051 kInvalid, kSpatial, kNonSpatial 00052 }; 00053 00054 enum Location { 00055 kCPUMemory = 1, kGPUTexture = 2, kCPUorGPU = 3 00056 }; 00057 00058 // Lets try using the node attribites for the filter parameters... 00059 00060 protected: 00061 ImageFilter( void ); 00062 00063 FilterType m_FilterType; 00064 Location m_LocationSupported; 00065 QString m_FilterName; 00066 00067 public: 00068 00070 FilterType getType() const { return m_FilterType; } 00071 Location getLocationSupported() const { return m_LocationSupported; } 00072 00074 const QString &getName() const { return m_FilterName; } 00075 00076 /* Hack to set the filter parameters... Imre, how can I get access to the attributes of a class 00077 * implemented in a plugin? Blur filter takes a single float. */ 00078 virtual void setParameterBlock(void *parmBlock, int size); 00079 virtual int getParameterBlockSize() const; 00080 virtual const void *getParameterBlockPtr() const; 00081 00083 virtual void ProcessFilter(Image *src, Image *dst); 00084 virtual void ProcessFilter(Texture *src, Texture *dst); 00085 }; 00086 00087 00088 00089 //- 00090 // ================================================================== 00091 // (C) Copyright 2009 by Autodesk, Inc. All Rights Reserved. By using 00092 // this code, you are agreeing to the terms and conditions of the 00093 // License Agreement included in the documentation for this code. 00094 // AUTODESK MAKES NO WARRANTIES, EXPRESS OR IMPLIED, AS TO THE 00095 // CORRECTNESS OF THIS CODE OR ANY DERIVATIVE WORKS WHICH INCORPORATE 00096 // IT. AUTODESK PROVIDES THE CODE ON AN 'AS-IS' BASIS AND EXPLICITLY 00097 // DISCLAIMS ANY LIABILITY, INCLUDING CONSEQUENTIAL AND INCIDENTAL 00098 // DAMAGES FOR ERRORS, OMISSIONS, AND OTHER PROBLEMS IN THE CODE. 00099 // 00100 // Use, duplication, or disclosure by the U.S. Government is subject 00101 // to restrictions set forth in FAR 52.227-19 (Commercial Computer 00102 // Software Restricted Rights) as well as DFAR 252.227-7013(c)(1)(ii) 00103 // (Rights in Technical Data and Computer Software), as applicable. 00104 // ================================================================== 00105 //+ 00106 00107 #endif 00108 //------------------------------------------------------------------------------ 00109 00110 }; // end of namespace mudbox 00111