Skip to content

Commit

Permalink
Fix: add missing include guards
Browse files Browse the repository at this point in the history
  • Loading branch information
mandyedi committed Dec 1, 2024
1 parent 415217b commit 0076f07
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 10 deletions.
7 changes: 5 additions & 2 deletions src/Textures/ConeChecker.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
// This C++ code is licensed under the GNU General Public License Version 2.
// See the file COPYING.txt for the full license.

#pragma once
#ifndef __CONE_CHECKER__
#define __CONE_CHECKER__

#include "Texture.h"
#include "../Utilities/RGBColor.h"
Expand Down Expand Up @@ -68,4 +69,6 @@ inline void ConeChecker::set_color2(const RGBColor &c) {

inline void ConeChecker::set_line_color(const RGBColor &c) {
line_color.r = c.r; line_color.g = c.g; line_color.b = c.b;
}
}

#endif
7 changes: 5 additions & 2 deletions src/Textures/CylinderChecker.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
// This C++ code is licensed under the GNU General Public License Version 2.
// See the file COPYING.txt for the full license.

#pragma once
#ifndef __CYLINDER_CHECKER__
#define __CYLINDER_CHECKER__

#include "Texture.h"
#include "../Utilities/RGBColor.h"
Expand Down Expand Up @@ -68,4 +69,6 @@ inline void CylinderChecker::set_color2(const RGBColor &c) {

inline void CylinderChecker::set_line_color(const RGBColor &c) {
line_color.r = c.r; line_color.g = c.g; line_color.b = c.b;
}
}

#endif
7 changes: 5 additions & 2 deletions src/Textures/DiskChecker.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
// This C++ code is licensed under the GNU General Public License Version 2.
// See the file COPYING.txt for the full license.

#pragma once
#ifndef __DISK_CHECKER__
#define __DISK_CHECKER__

#include "Texture.h"
#include "../Utilities/RGBColor.h"
Expand Down Expand Up @@ -68,4 +69,6 @@ inline void DiskChecker::set_color2(const RGBColor &c) {

inline void DiskChecker::set_line_color(const RGBColor &c) {
line_color.r = c.r; line_color.g = c.g; line_color.b = c.b;
}
}

#endif
2 changes: 1 addition & 1 deletion src/Textures/FBmTexture.h
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// Copyright (C) Kevin Suffern 2000-2007.// This C++ code is for non-commercial purposes only.// This C++ code is licensed under the GNU General Public License Version 2.// See the file COPYING.txt for the full license.// Copyright notice for changes since the originally published version:// Copyright (C) Eduárd Mándy 2019-2021// Though this C++ code was change in a large measure it still has the original copyright notice.// This C++ code is for non-commercial purposes only.// This C++ code is licensed under the GNU General Public License Version 2.// See the file COPYING.txt for the full license.#include "Texture.h"#include "../Utilities/RGBColor.h"class ShadeRec;class LatticeNoise;class FBmTexture: public Texture {public: FBmTexture() = default; FBmTexture(LatticeNoise *ln_ptr); void set_color(const float r, const float g, const float b); void set_min_value(const float min); void set_max_value(const float max); virtual RGBColor get_color(const ShadeRec& sr) const;private: LatticeNoise* noise_ptr = nullptr; RGBColor color = RGBColor::black; float min_value = 0.0f; float max_value = 1.0f;};inline void FBmTexture::set_color(const float r, const float g, const float b) { color.r = r; color.g = g; color.b = b;}inline void FBmTexture::set_min_value(const float min) { min_value = min;}inline void FBmTexture::set_max_value(const float max) { max_value = max;}
// Copyright (C) Kevin Suffern 2000-2007.// This C++ code is for non-commercial purposes only.// This C++ code is licensed under the GNU General Public License Version 2.// See the file COPYING.txt for the full license.// Copyright notice for changes since the originally published version:// Copyright (C) Eduárd Mándy 2019-2021// Though this C++ code was change in a large measure it still has the original copyright notice.// This C++ code is for non-commercial purposes only.// This C++ code is licensed under the GNU General Public License Version 2.// See the file COPYING.txt for the full license.#ifndef __FBM_TEXTURE__#define __FBM_TEXTURE__#include "Texture.h"#include "../Utilities/RGBColor.h"class ShadeRec;class LatticeNoise;class FBmTexture: public Texture {public: FBmTexture() = default; FBmTexture(LatticeNoise *ln_ptr); void set_color(const float r, const float g, const float b); void set_min_value(const float min); void set_max_value(const float max); virtual RGBColor get_color(const ShadeRec& sr) const;private: LatticeNoise* noise_ptr = nullptr; RGBColor color = RGBColor::black; float min_value = 0.0f; float max_value = 1.0f;};inline void FBmTexture::set_color(const float r, const float g, const float b) { color.r = r; color.g = g; color.b = b;}inline void FBmTexture::set_min_value(const float min) { min_value = min;}inline void FBmTexture::set_max_value(const float max) { max_value = max;}#endif
Expand Down
7 changes: 6 additions & 1 deletion src/Textures/TInstance.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
// This C++ code is licensed under the GNU General Public License Version 2.
// See the file COPYING.txt for the full license.

#ifndef __T_INSTANCE__
#define __T_INSTANCE__

#include "Texture.h"
#include "../Utilities/Matrix.h"

Expand Down Expand Up @@ -42,4 +45,6 @@ class TInstance: public Texture {

inline void TInstance::set_texture(Texture *t_ptr) {
texture_ptr = t_ptr;
}
}

#endif
2 changes: 1 addition & 1 deletion src/Textures/WrappedFBmTexture.h
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// Copyright (C) Kevin Suffern 2000-2007.// This C++ code is for non-commercial purposes only.// This C++ code is licensed under the GNU General Public License Version 2.// See the file COPYING.txt for the full license.// Copyright notice for changes since the originally published version:// Copyright (C) Eduárd Mándy 2019-2021// Though this C++ code was change in a large measure it still has the original copyright notice.// This C++ code is for non-commercial purposes only.// This C++ code is licensed under the GNU General Public License Version 2.// See the file COPYING.txt for the full license.#include "Texture.h"#include "../Utilities/RGBColor.h"class ShadeRec;class LatticeNoise;class WrappedFBmTexture: public Texture {public: WrappedFBmTexture() = default; WrappedFBmTexture(LatticeNoise *ln_ptr); void set_color(const float r, const float g, const float b); void set_min_value(const float min); void set_max_value(const float max); void set_expansion_value(const float expansion); virtual RGBColor get_color(const ShadeRec& sr) const;private: LatticeNoise* noise_ptr = nullptr; RGBColor color = RGBColor::black; float min_value = 0.0f; float max_value = 1.0f; float expansion_number = 2.0;};inline void WrappedFBmTexture::set_color(const float r, const float g, const float b) { color.r = r; color.g = g; color.b = b;}inline void WrappedFBmTexture::set_min_value(const float min) { min_value = min;}inline void WrappedFBmTexture::set_max_value(const float max) { max_value = max;}inline void WrappedFBmTexture::set_expansion_value(const float expansion) { expansion_number = expansion;}
// Copyright (C) Kevin Suffern 2000-2007.// This C++ code is for non-commercial purposes only.// This C++ code is licensed under the GNU General Public License Version 2.// See the file COPYING.txt for the full license.// Copyright notice for changes since the originally published version:// Copyright (C) Eduárd Mándy 2019-2021// Though this C++ code was change in a large measure it still has the original copyright notice.// This C++ code is for non-commercial purposes only.// This C++ code is licensed under the GNU General Public License Version 2.// See the file COPYING.txt for the full license.#ifndef __WRAPPED_FBM_TEXTURE__#define __WRAPPED_FBM_TEXTURE__#include "Texture.h"#include "../Utilities/RGBColor.h"class ShadeRec;class LatticeNoise;class WrappedFBmTexture: public Texture {public: WrappedFBmTexture() = default; WrappedFBmTexture(LatticeNoise *ln_ptr); void set_color(const float r, const float g, const float b); void set_min_value(const float min); void set_max_value(const float max); void set_expansion_value(const float expansion); virtual RGBColor get_color(const ShadeRec& sr) const;private: LatticeNoise* noise_ptr = nullptr; RGBColor color = RGBColor::black; float min_value = 0.0f; float max_value = 1.0f; float expansion_number = 2.0;};inline void WrappedFBmTexture::set_color(const float r, const float g, const float b) { color.r = r; color.g = g; color.b = b;}inline void WrappedFBmTexture::set_min_value(const float min) { min_value = min;}inline void WrappedFBmTexture::set_max_value(const float max) { max_value = max;}inline void WrappedFBmTexture::set_expansion_value(const float expansion) { expansion_number = expansion;}#endif
Expand Down
2 changes: 1 addition & 1 deletion src/Textures/WrappedTwoColors.h
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// Copyright (C) Kevin Suffern 2000-2007.// This C++ code is for non-commercial purposes only.// This C++ code is licensed under the GNU General Public License Version 2.// See the file COPYING.txt for the full license.// Copyright notice for changes since the originally published version:// Copyright (C) Eduárd Mándy 2019-2021// Though this C++ code was change in a large measure it still has the original copyright notice.// This C++ code is for non-commercial purposes only.// This C++ code is licensed under the GNU General Public License Version 2.// See the file COPYING.txt for the full license.#include "Texture.h"#include "../Utilities/RGBColor.h"class ShadeRec;class LatticeNoise;class WrappedTwoColors: public Texture {public: WrappedTwoColors() = default; WrappedTwoColors(LatticeNoise *ln_ptr); void set_color1(const float r, const float g, const float b); void set_color2(const float r, const float g, const float b); void set_min_value(const float min); void set_max_value(const float max); void set_expansion_value(const float expansion); virtual RGBColor get_color(const ShadeRec& sr) const;private: LatticeNoise* noise_ptr = nullptr; RGBColor color1 = RGBColor::black; RGBColor color2 = RGBColor::darkGreen; float min_value = 0.0f; float max_value = 1.0f; float expansion_number = 2.0;};inline void WrappedTwoColors::set_color1(const float r, const float g, const float b) { color1.r = r; color1.g = g; color1.b = b;}inline void WrappedTwoColors::set_color2(const float r, const float g, const float b) { color2.r = r; color2.g = g; color2.b = b;}inline void WrappedTwoColors::set_min_value(const float min) { min_value = min;}inline void WrappedTwoColors::set_max_value(const float max) { max_value = max;}inline void WrappedTwoColors::set_expansion_value(const float expansion) { expansion_number = expansion;}
// Copyright (C) Kevin Suffern 2000-2007.// This C++ code is for non-commercial purposes only.// This C++ code is licensed under the GNU General Public License Version 2.// See the file COPYING.txt for the full license.// Copyright notice for changes since the originally published version:// Copyright (C) Eduárd Mándy 2019-2021// Though this C++ code was change in a large measure it still has the original copyright notice.// This C++ code is for non-commercial purposes only.// This C++ code is licensed under the GNU General Public License Version 2.// See the file COPYING.txt for the full license.#ifndef __WRAPPED_TWO_COLORS__#define __WRAPPED_TWO_COLORS__#include "Texture.h"#include "../Utilities/RGBColor.h"class ShadeRec;class LatticeNoise;class WrappedTwoColors: public Texture {public: WrappedTwoColors() = default; WrappedTwoColors(LatticeNoise *ln_ptr); void set_color1(const float r, const float g, const float b); void set_color2(const float r, const float g, const float b); void set_min_value(const float min); void set_max_value(const float max); void set_expansion_value(const float expansion); virtual RGBColor get_color(const ShadeRec& sr) const;private: LatticeNoise* noise_ptr = nullptr; RGBColor color1 = RGBColor::black; RGBColor color2 = RGBColor::darkGreen; float min_value = 0.0f; float max_value = 1.0f; float expansion_number = 2.0;};inline void WrappedTwoColors::set_color1(const float r, const float g, const float b) { color1.r = r; color1.g = g; color1.b = b;}inline void WrappedTwoColors::set_color2(const float r, const float g, const float b) { color2.r = r; color2.g = g; color2.b = b;}inline void WrappedTwoColors::set_min_value(const float min) { min_value = min;}inline void WrappedTwoColors::set_max_value(const float max) { max_value = max;}inline void WrappedTwoColors::set_expansion_value(const float expansion) { expansion_number = expansion;}#endif
Expand Down

0 comments on commit 0076f07

Please sign in to comment.