Browse Source

SceneGraph: removed superfluous instantiation sources.

Moved almost everything into one file, instead of compiling ~50k LOC
seven times it is now compiling 56k LOC only once. This saves another ~5
seconds of compilation time (before ~4:11, now ~4:06).

Also explicitly saying that we are instantiating Float version of all
classes. In the future we might have compile switch for building also
Double one, this helps with consistency.
pull/278/head
Vladimír Vondruš 13 years ago
parent
commit
378ad878f3
  1. 8
      src/SceneGraph/Animable.cpp
  2. 11
      src/SceneGraph/CMakeLists.txt
  3. 35
      src/SceneGraph/DualComplexTransformation.cpp
  4. 35
      src/SceneGraph/DualQuaternionTransformation.cpp
  5. 35
      src/SceneGraph/MatrixTransformation2D.cpp
  6. 35
      src/SceneGraph/MatrixTransformation3D.cpp
  7. 41
      src/SceneGraph/Object.cpp
  8. 35
      src/SceneGraph/RigidMatrixTransformation2D.cpp
  9. 35
      src/SceneGraph/RigidMatrixTransformation3D.cpp
  10. 30
      src/SceneGraph/instantiation.cpp

8
src/SceneGraph/Animable.cpp

@ -27,10 +27,10 @@
namespace Magnum { namespace SceneGraph {
#ifndef DOXYGEN_GENERATING_OUTPUT
template class MAGNUM_SCENEGRAPH_EXPORT Animable<2>;
template class MAGNUM_SCENEGRAPH_EXPORT Animable<3>;
template class MAGNUM_SCENEGRAPH_EXPORT AnimableGroup<2>;
template class MAGNUM_SCENEGRAPH_EXPORT AnimableGroup<3>;
template class MAGNUM_SCENEGRAPH_EXPORT Animable<2, Float>;
template class MAGNUM_SCENEGRAPH_EXPORT Animable<3, Float>;
template class MAGNUM_SCENEGRAPH_EXPORT AnimableGroup<2, Float>;
template class MAGNUM_SCENEGRAPH_EXPORT AnimableGroup<3, Float>;
#endif
Debug operator<<(Debug debug, AnimationState value) {

11
src/SceneGraph/CMakeLists.txt

@ -24,18 +24,11 @@
# Files shared between main library and unit test library
set(MagnumSceneGraph_SRCS
Animable.cpp
Camera.cpp
DualComplexTransformation.cpp
DualQuaternionTransformation.cpp
RigidMatrixTransformation2D.cpp
RigidMatrixTransformation3D.cpp
Object.cpp)
Animable.cpp)
# Files compiled with different flags for main library and unit test library
set(MagnumSceneGraph_GracefulAssert_SRCS
MatrixTransformation2D.cpp
MatrixTransformation3D.cpp)
instantiation.cpp)
set(MagnumSceneGraph_HEADERS
AbstractCamera.h

35
src/SceneGraph/DualComplexTransformation.cpp

@ -1,35 +0,0 @@
/*
This file is part of Magnum.
Copyright © 2010, 2011, 2012, 2013 Vladimír Vondruš <mosra@centrum.cz>
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT 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.
*/
#include "DualComplexTransformation.h"
#include "Object.hpp"
namespace Magnum { namespace SceneGraph {
#ifndef DOXYGEN_GENERATING_OUTPUT
template class MAGNUM_SCENEGRAPH_EXPORT Object<DualComplexTransformation<>>;
#endif
}}

35
src/SceneGraph/DualQuaternionTransformation.cpp

@ -1,35 +0,0 @@
/*
This file is part of Magnum.
Copyright © 2010, 2011, 2012, 2013 Vladimír Vondruš <mosra@centrum.cz>
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT 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.
*/
#include "DualQuaternionTransformation.h"
#include "Object.hpp"
namespace Magnum { namespace SceneGraph {
#ifndef DOXYGEN_GENERATING_OUTPUT
template class MAGNUM_SCENEGRAPH_EXPORT Object<DualQuaternionTransformation<>>;
#endif
}}

35
src/SceneGraph/MatrixTransformation2D.cpp

@ -1,35 +0,0 @@
/*
This file is part of Magnum.
Copyright © 2010, 2011, 2012, 2013 Vladimír Vondruš <mosra@centrum.cz>
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT 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.
*/
#include "MatrixTransformation2D.h"
#include "Object.hpp"
namespace Magnum { namespace SceneGraph {
#ifndef DOXYGEN_GENERATING_OUTPUT
template class MAGNUM_SCENEGRAPH_EXPORT Object<MatrixTransformation2D<>>;
#endif
}}

35
src/SceneGraph/MatrixTransformation3D.cpp

@ -1,35 +0,0 @@
/*
This file is part of Magnum.
Copyright © 2010, 2011, 2012, 2013 Vladimír Vondruš <mosra@centrum.cz>
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT 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.
*/
#include "MatrixTransformation3D.h"
#include "Object.hpp"
namespace Magnum { namespace SceneGraph {
#ifndef DOXYGEN_GENERATING_OUTPUT
template class MAGNUM_SCENEGRAPH_EXPORT Object<MatrixTransformation3D<>>;
#endif
}}

41
src/SceneGraph/Object.cpp

@ -1,41 +0,0 @@
/*
This file is part of Magnum.
Copyright © 2010, 2011, 2012, 2013 Vladimír Vondruš <mosra@centrum.cz>
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT 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.
*/
#include "Object.hpp"
#include "AbstractFeature.hpp"
#include "FeatureGroup.hpp"
namespace Magnum { namespace SceneGraph {
template class AbstractObject<2>;
template class AbstractObject<3>;
template class AbstractTransformation<2>;
template class AbstractTransformation<3>;
template class AbstractFeature<2>;
template class AbstractFeature<3>;
template class AbstractFeatureGroup<2>;
template class AbstractFeatureGroup<3>;
}}

35
src/SceneGraph/RigidMatrixTransformation2D.cpp

@ -1,35 +0,0 @@
/*
This file is part of Magnum.
Copyright © 2010, 2011, 2012, 2013 Vladimír Vondruš <mosra@centrum.cz>
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT 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.
*/
#include "RigidMatrixTransformation2D.h"
#include "Object.hpp"
namespace Magnum { namespace SceneGraph {
#ifndef DOXYGEN_GENERATING_OUTPUT
template class MAGNUM_SCENEGRAPH_EXPORT Object<RigidMatrixTransformation2D<>>;
#endif
}}

35
src/SceneGraph/RigidMatrixTransformation3D.cpp

@ -1,35 +0,0 @@
/*
This file is part of Magnum.
Copyright © 2010, 2011, 2012, 2013 Vladimír Vondruš <mosra@centrum.cz>
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT 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.
*/
#include "RigidMatrixTransformation3D.h"
#include "Object.hpp"
namespace Magnum { namespace SceneGraph {
#ifndef DOXYGEN_GENERATING_OUTPUT
template class MAGNUM_SCENEGRAPH_EXPORT Object<RigidMatrixTransformation3D<>>;
#endif
}}

30
src/SceneGraph/Camera.cpp → src/SceneGraph/instantiation.cpp

@ -22,14 +22,40 @@
DEALINGS IN THE SOFTWARE.
*/
#include "Camera2D.hpp"
#include "Camera3D.hpp"
#include "SceneGraph/AbstractFeature.hpp"
#include "SceneGraph/Camera2D.hpp"
#include "SceneGraph/Camera3D.hpp"
#include "SceneGraph/DualComplexTransformation.h"
#include "SceneGraph/DualQuaternionTransformation.h"
#include "SceneGraph/FeatureGroup.hpp"
#include "SceneGraph/MatrixTransformation2D.h"
#include "SceneGraph/MatrixTransformation3D.h"
#include "SceneGraph/Object.hpp"
#include "SceneGraph/RigidMatrixTransformation2D.h"
#include "SceneGraph/RigidMatrixTransformation3D.h"
namespace Magnum { namespace SceneGraph {
template class AbstractObject<2, Float>;
template class AbstractObject<3, Float>;
template class AbstractTransformation<2, Float>;
template class AbstractTransformation<3, Float>;
template class MAGNUM_SCENEGRAPH_EXPORT AbstractFeature<2, Float>;
template class MAGNUM_SCENEGRAPH_EXPORT AbstractFeature<3, Float>;
template class AbstractFeatureGroup<2, Float>;
template class AbstractFeatureGroup<3, Float>;
template class AbstractCamera<2, Float>;
template class AbstractCamera<3, Float>;
template class Camera2D<Float>;
template class Camera3D<Float>;
template class MAGNUM_SCENEGRAPH_EXPORT Object<DualComplexTransformation<Float>>;
template class MAGNUM_SCENEGRAPH_EXPORT Object<DualQuaternionTransformation<Float>>;
template class MAGNUM_SCENEGRAPH_EXPORT Object<MatrixTransformation2D<Float>>;
template class MAGNUM_SCENEGRAPH_EXPORT Object<MatrixTransformation3D<Float>>;
template class MAGNUM_SCENEGRAPH_EXPORT Object<RigidMatrixTransformation2D<Float>>;
template class MAGNUM_SCENEGRAPH_EXPORT Object<RigidMatrixTransformation3D<Float>>;
}}
Loading…
Cancel
Save