From c36bf421f5469d378bf8d3a8c9f2430e9ff4dd8d Mon Sep 17 00:00:00 2001 From: castano Date: Thu, 22 Nov 2007 01:52:10 +0000 Subject: [PATCH] rename normalize to normalizeNormalMap --- src/nvimage/NormalMap.cpp | 2 +- src/nvimage/NormalMap.h | 68 +++++++++++++++++++-------------------- src/nvtt/nvtt.cpp | 2 +- 3 files changed, 36 insertions(+), 36 deletions(-) diff --git a/src/nvimage/NormalMap.cpp b/src/nvimage/NormalMap.cpp index acd5737..1433a8f 100644 --- a/src/nvimage/NormalMap.cpp +++ b/src/nvimage/NormalMap.cpp @@ -130,7 +130,7 @@ FloatImage * nv::createNormalMap(const Image * img, FloatImage::WrapMode wm, Vec } /// Normalize the given image in place. -void nv::normalize(FloatImage * img) +void nv::normalizeNormalMap(FloatImage * img) { nvCheck(img != NULL); img->expandNormals(0); diff --git a/src/nvimage/NormalMap.h b/src/nvimage/NormalMap.h index 9ec81a0..541e7b5 100644 --- a/src/nvimage/NormalMap.h +++ b/src/nvimage/NormalMap.h @@ -19,37 +19,37 @@ // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -// OTHER DEALINGS IN THE SOFTWARE. - -#ifndef NV_IMAGE_NORMALMAP_H -#define NV_IMAGE_NORMALMAP_H - -#include -#include -#include - - -namespace nv -{ - class Image; - - enum NormalMapFilter - { - NormalMapFilter_Sobel3x3, // fine detail - NormalMapFilter_Sobel5x5, // medium detail - NormalMapFilter_Sobel7x7, // large detail - NormalMapFilter_Sobel9x9, // very large - }; - - FloatImage * createNormalMap(const Image * img, FloatImage::WrapMode wm, Vector4::Arg heightWeights, NormalMapFilter filter = NormalMapFilter_Sobel3x3); - - FloatImage * createNormalMap(const Image * img, FloatImage::WrapMode wm, Vector4::Arg heightWeights, Vector4::Arg filterWeights); - - void normalize(FloatImage * img); - - // @@ Add generation of DU/DV maps. - - -} // nv namespace - -#endif // NV_IMAGE_NORMALMAP_H +// OTHER DEALINGS IN THE SOFTWARE. + +#ifndef NV_IMAGE_NORMALMAP_H +#define NV_IMAGE_NORMALMAP_H + +#include +#include +#include + + +namespace nv +{ + class Image; + + enum NormalMapFilter + { + NormalMapFilter_Sobel3x3, // fine detail + NormalMapFilter_Sobel5x5, // medium detail + NormalMapFilter_Sobel7x7, // large detail + NormalMapFilter_Sobel9x9, // very large + }; + + FloatImage * createNormalMap(const Image * img, FloatImage::WrapMode wm, Vector4::Arg heightWeights, NormalMapFilter filter = NormalMapFilter_Sobel3x3); + + FloatImage * createNormalMap(const Image * img, FloatImage::WrapMode wm, Vector4::Arg heightWeights, Vector4::Arg filterWeights); + + void normalizeNormalMap(FloatImage * img); + + // @@ Add generation of DU/DV maps. + + +} // nv namespace + +#endif // NV_IMAGE_NORMALMAP_H diff --git a/src/nvtt/nvtt.cpp b/src/nvtt/nvtt.cpp index f32abcd..74fde81 100644 --- a/src/nvtt/nvtt.cpp +++ b/src/nvtt/nvtt.cpp @@ -339,7 +339,7 @@ static FloatImage * createMipmap(const FloatImage * floatImage, const InputOptio // Normalize mipmap. if (inputOptions.normalizeMipmaps) { - normalize(result); + normalizeNormalMap(result); } return result;