From 7353dc087872cdb93bd57cbaf2b6f0dcc21f9a03 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Wed, 22 May 2013 22:56:21 +0300 Subject: [PATCH] Put the common #includes in shape.h Almost every shape needs these, so it's not worth it to try and avoid unnecessary headers in the base class. --- source/geometry/compositeshape.h | 1 - source/geometry/halfspace.h | 1 - source/geometry/hyperbox.h | 3 --- source/geometry/hypersphere.h | 3 --- source/geometry/negation.h | 1 - source/geometry/shape.h | 12 +++--------- source/geometry/transformedshape.h | 2 -- 7 files changed, 3 insertions(+), 20 deletions(-) diff --git a/source/geometry/compositeshape.h b/source/geometry/compositeshape.h index 4c640be..8466076 100644 --- a/source/geometry/compositeshape.h +++ b/source/geometry/compositeshape.h @@ -3,7 +3,6 @@ #include #include -#include "boundingbox.h" #include "shape.h" namespace Msp { diff --git a/source/geometry/halfspace.h b/source/geometry/halfspace.h index 60f0403..5fdea34 100644 --- a/source/geometry/halfspace.h +++ b/source/geometry/halfspace.h @@ -1,7 +1,6 @@ #ifndef MSP_GEOMETRY_HALFSPACE_H_ #define MSP_GEOMETRY_HALFSPACE_H_ -#include "boundingbox.h" #include "shape.h" namespace Msp { diff --git a/source/geometry/hyperbox.h b/source/geometry/hyperbox.h index da50091..e45fadc 100644 --- a/source/geometry/hyperbox.h +++ b/source/geometry/hyperbox.h @@ -5,10 +5,7 @@ #include #include #include -#include "boundingbox.h" -#include "ray.h" #include "shape.h" -#include "surfacepoint.h" namespace Msp { namespace Geometry { diff --git a/source/geometry/hypersphere.h b/source/geometry/hypersphere.h index 3c04125..e2e3102 100644 --- a/source/geometry/hypersphere.h +++ b/source/geometry/hypersphere.h @@ -4,10 +4,7 @@ #include #include #include -#include "boundingbox.h" -#include "ray.h" #include "shape.h" -#include "surfacepoint.h" namespace Msp { namespace Geometry { diff --git a/source/geometry/negation.h b/source/geometry/negation.h index beb3e4e..c01763d 100644 --- a/source/geometry/negation.h +++ b/source/geometry/negation.h @@ -1,7 +1,6 @@ #ifndef MSP_GEOMETRY_NEGATION_H_ #define MSP_GEOMETRY_NEGATION_H_ -#include "boundingbox.h" #include "shape.h" namespace Msp { diff --git a/source/geometry/shape.h b/source/geometry/shape.h index bbe255f..22b1887 100644 --- a/source/geometry/shape.h +++ b/source/geometry/shape.h @@ -3,19 +3,13 @@ #include #include +#include "boundingbox.h" +#include "ray.h" +#include "surfacepoint.h" namespace Msp { namespace Geometry { -template -class BoundingBox; - -template -class Ray; - -template -class SurfacePoint; - /** Base class and interface for geometric shapes. Shapes may be bounded or unbounded. They are always considered to be solid, i.e. have a distinct inside diff --git a/source/geometry/transformedshape.h b/source/geometry/transformedshape.h index 58e571a..74912aa 100644 --- a/source/geometry/transformedshape.h +++ b/source/geometry/transformedshape.h @@ -2,8 +2,6 @@ #define MSP_GEOMETRY_TRANSFORMEDSHAPE_H_ #include "affinetransformation.h" -#include "boundingbox.h" -#include "ray.h" #include "shape.h" namespace Msp { -- 2.43.0