From: Mikko Rasa Date: Wed, 22 May 2013 19:56:21 +0000 (+0300) Subject: Put the common #includes in shape.h X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=7353dc087872cdb93bd57cbaf2b6f0dcc21f9a03;p=libs%2Fmath.git 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. --- 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 {