Browse Source

Bring whole Corrade namespace into Magnum namespace.

These projects are tightly interconnected anyway, this means a lot less
typing (yay!).
pull/278/head
Vladimír Vondruš 13 years ago
parent
commit
db71a23e3c
  1. 4
      src/AbstractFramebuffer.h
  2. 12
      src/AbstractShaderProgram.h
  3. 2
      src/Buffer.h
  4. 2
      src/Context.cpp
  5. 2
      src/Context.h
  6. 2
      src/DebugTools/Test/ForceRendererTest.cpp
  7. 2
      src/DebugTools/Test/LineSegmentRendererTest.cpp
  8. 3
      src/Magnum.h
  9. 3
      src/MeshTools/Clean.h
  10. 2
      src/MeshTools/Test/CleanTest.cpp
  11. 2
      src/MeshTools/Test/CombineIndexedArraysTest.cpp
  12. 8
      src/MeshTools/Test/CompressIndicesTest.cpp
  13. 2
      src/MeshTools/Test/FlipNormalsTest.cpp
  14. 2
      src/MeshTools/Test/GenerateFlatNormalsTest.cpp
  15. 6
      src/MeshTools/Test/InterleaveTest.cpp
  16. 2
      src/MeshTools/Test/SubdivideTest.cpp
  17. 3
      src/MeshTools/Test/TipsifyTest.cpp
  18. 2
      src/MeshTools/Test/TransformTest.cpp
  19. 2
      src/Platform/AbstractXApplication.cpp
  20. 4
      src/Platform/AbstractXApplication.h
  21. 4
      src/Platform/NaClApplication.h
  22. 6
      src/Platform/Sdl2Application.h
  23. 3
      src/Primitives/Cylinder.h
  24. 16
      src/Primitives/Test/CapsuleTest.cpp
  25. 2
      src/Primitives/Test/CircleTest.cpp
  26. 18
      src/Primitives/Test/CylinderTest.cpp
  27. 16
      src/Primitives/Test/UVSphereTest.cpp
  28. 8
      src/Resource.h
  29. 2
      src/ResourceManager.h
  30. 22
      src/SceneGraph/AbstractFeature.h
  31. 2
      src/SceneGraph/AbstractFeature.hpp
  32. 16
      src/SceneGraph/AbstractObject.h
  33. 2
      src/SceneGraph/DualComplexTransformation.h
  34. 2
      src/SceneGraph/MatrixTransformation2D.h
  35. 30
      src/SceneGraph/Object.h
  36. 4
      src/SceneGraph/Object.hpp
  37. 2
      src/SceneGraph/RigidMatrixTransformation2D.h
  38. 2
      src/SceneGraph/Test/AnimableTest.cpp
  39. 2
      src/SceneGraph/Test/CameraTest.cpp
  40. 2
      src/SceneGraph/Test/DualComplexTransformationTest.cpp
  41. 2
      src/SceneGraph/Test/DualQuaternionTransformationTest.cpp
  42. 2
      src/SceneGraph/Test/MatrixTransformation2DTest.cpp
  43. 2
      src/SceneGraph/Test/MatrixTransformation3DTest.cpp
  44. 2
      src/SceneGraph/Test/ObjectTest.cpp
  45. 2
      src/SceneGraph/Test/RigidMatrixTransformation2DTest.cpp
  46. 2
      src/SceneGraph/Test/RigidMatrixTransformation3DTest.cpp
  47. 2
      src/SceneGraph/Test/SceneTest.cpp
  48. 2
      src/Shaders/DistanceFieldVector.cpp
  49. 2
      src/Shaders/Flat.cpp
  50. 2
      src/Shaders/MeshVisualizer.cpp
  51. 2
      src/Shaders/MeshVisualizer.h
  52. 2
      src/Shaders/Phong.cpp
  53. 2
      src/Shaders/Vector.cpp
  54. 2
      src/Shaders/VertexColor.cpp
  55. 2
      src/Shapes/Test/AxisAlignedBoxTest.cpp
  56. 2
      src/Shapes/Test/BoxTest.cpp
  57. 2
      src/Shapes/Test/CapsuleTest.cpp
  58. 2
      src/Shapes/Test/CompositionTest.cpp
  59. 2
      src/Shapes/Test/LineTest.cpp
  60. 2
      src/Shapes/Test/PlaneTest.cpp
  61. 2
      src/Shapes/Test/PointTest.cpp
  62. 2
      src/Shapes/Test/ShapeImplementationTest.cpp
  63. 2
      src/Shapes/Test/ShapeTest.cpp
  64. 2
      src/Shapes/Test/SphereTest.cpp
  65. 2
      src/Test/AbstractImageTest.cpp
  66. 2
      src/Test/AbstractShaderProgramTest.cpp
  67. 2
      src/Test/ArrayTest.cpp
  68. 4
      src/Test/ColorTest.cpp
  69. 6
      src/Test/MeshTest.cpp
  70. 2
      src/Test/ResourceManagerTest.cpp
  71. 2
      src/Test/SwizzleTest.cpp
  72. 2
      src/Text/AbstractFont.cpp
  73. 4
      src/Text/AbstractFont.h
  74. 2
      src/TextureTools/DistanceField.cpp
  75. 2
      src/TextureTools/Test/AtlasTest.cpp
  76. 4
      src/Timeline.cpp
  77. 2
      src/Trade/AbstractImageConverter.cpp
  78. 6
      src/Trade/AbstractImageConverter.h
  79. 2
      src/Trade/AbstractImporter.cpp
  80. 10
      src/Trade/AbstractImporter.h
  81. 2
      src/Trade/Test/ObjectData2DTest.cpp
  82. 2
      src/Trade/Test/ObjectData3DTest.cpp

4
src/AbstractFramebuffer.h

@ -51,7 +51,7 @@ enum class FramebufferClear: GLbitfield {
*
* @see AbstractFramebuffer::clear()
*/
typedef Corrade::Containers::EnumSet<FramebufferClear, GLbitfield,
typedef Containers::EnumSet<FramebufferClear, GLbitfield,
GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT|GL_STENCIL_BUFFER_BIT> FramebufferClearMask;
/**
@ -76,7 +76,7 @@ enum class FramebufferBlit: GLbitfield {
* @requires_gles30 %Extension @es_extension{ANGLE,framebuffer_blit} or
* @es_extension{NV,framebuffer_blit}
*/
typedef Corrade::Containers::EnumSet<FramebufferBlit, GLbitfield,
typedef Containers::EnumSet<FramebufferBlit, GLbitfield,
GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT|GL_STENCIL_BUFFER_BIT> FramebufferBlitMask;
/**

12
src/AbstractShaderProgram.h

@ -1096,7 +1096,7 @@ template<UnsignedInt location, class T> class AbstractShaderProgram::Attribute {
* @see Attribute()
*/
#ifdef DOXYGEN_GENERATING_OUTPUT
typedef typename Corrade::Containers::EnumSet<DataOption, UnsignedByte> DataOptions;
typedef typename Containers::EnumSet<DataOption, UnsignedByte> DataOptions;
#else
typedef typename Implementation::Attribute<T>::DataOptions DataOptions;
#endif
@ -1239,7 +1239,7 @@ struct FloatAttribute {
enum class DataOption: UnsignedByte {
Normalized = 1 << 0
};
typedef Corrade::Containers::EnumSet<DataOption, UnsignedByte> DataOptions;
typedef Containers::EnumSet<DataOption, UnsignedByte> DataOptions;
static std::size_t MAGNUM_EXPORT size(GLint components, DataType dataType);
};
@ -1264,7 +1264,7 @@ struct IntAttribute {
constexpr static DataType DefaultDataType = DataType::Int;
enum class DataOption: UnsignedByte {};
typedef Corrade::Containers::EnumSet<DataOption, UnsignedByte> DataOptions;
typedef Containers::EnumSet<DataOption, UnsignedByte> DataOptions;
static std::size_t MAGNUM_EXPORT size(GLint components, DataType dataType);
};
@ -1279,7 +1279,7 @@ struct UnsignedIntAttribute {
constexpr static DataType DefaultDataType = DataType::UnsignedInt;
typedef IntAttribute::DataOption DataOption;
typedef Corrade::Containers::EnumSet<DataOption, UnsignedByte> DataOptions;
typedef Containers::EnumSet<DataOption, UnsignedByte> DataOptions;
inline static std::size_t size(GLint components, DataType dataType) {
return IntAttribute::size(components, dataType);
@ -1298,7 +1298,7 @@ struct DoubleAttribute {
constexpr static DataType DefaultDataType = DataType::Double;
enum class DataOption: UnsignedByte {};
typedef Corrade::Containers::EnumSet<DataOption, UnsignedByte> DataOptions;
typedef Containers::EnumSet<DataOption, UnsignedByte> DataOptions;
static std::size_t MAGNUM_EXPORT size(GLint components, DataType dataType);
};
@ -1350,7 +1350,7 @@ template<> struct Attribute<Math::Vector<4, Float>> {
enum class DataOption: UnsignedByte {
Normalized = 1 << 0
};
typedef Corrade::Containers::EnumSet<DataOption, UnsignedByte> DataOptions;
typedef Containers::EnumSet<DataOption, UnsignedByte> DataOptions;
inline constexpr static std::size_t vectorCount() { return 1; }

2
src/Buffer.h

@ -428,7 +428,7 @@ class MAGNUM_EXPORT Buffer {
* @requires_gl30 %Extension @extension{ARB,map_buffer_range}
* @requires_gles30 %Extension @es_extension{EXT,map_buffer_range}
*/
typedef Corrade::Containers::EnumSet<MapFlag, GLbitfield> MapFlags;
typedef Containers::EnumSet<MapFlag, GLbitfield> MapFlags;
/**
* @brief Unbind any buffer from given target

2
src/Context.cpp

@ -359,7 +359,7 @@ Context::Context() {
/* Don't crash when glGetString() returns nullptr */
const char* e = reinterpret_cast<const char*>(glGetString(GL_EXTENSIONS));
if(e) {
std::vector<std::string> extensions = Corrade::Utility::String::split(e, ' ');
std::vector<std::string> extensions = Utility::String::split(e, ' ');
for(const std::string& extension: extensions) {
auto found = futureExtensions.find(extension);
if(found != futureExtensions.end()) {

2
src/Context.h

@ -181,7 +181,7 @@ class MAGNUM_EXPORT Context {
*
* @see flags()
*/
typedef Corrade::Containers::EnumSet<Flag, GLint> Flags;
typedef Containers::EnumSet<Flag, GLint> Flags;
/**
* @brief Constructor

2
src/DebugTools/Test/ForceRendererTest.cpp

@ -28,7 +28,7 @@
namespace Magnum { namespace DebugTools { namespace Implementation { namespace Test {
class ForceRendererTest: public Corrade::TestSuite::Tester {
class ForceRendererTest: public TestSuite::Tester {
public:
explicit ForceRendererTest();

2
src/DebugTools/Test/LineSegmentRendererTest.cpp

@ -31,7 +31,7 @@
namespace Magnum { namespace DebugTools { namespace Test {
class LineSegmentRendererTest: public Corrade::TestSuite::Tester {
class LineSegmentRendererTest: public TestSuite::Tester {
public:
explicit LineSegmentRendererTest();

3
src/Magnum.h

@ -63,6 +63,9 @@ namespace Math {
#endif
}
/* Bring whole Corrade namespace */
using namespace Corrade;
/* Bring debugging facility from Corrade::Utility namespace */
using Corrade::Utility::Debug;
using Corrade::Utility::Warning;

3
src/MeshTools/Clean.h

@ -33,6 +33,7 @@
#include <Utility/MurmurHash2.h>
#include "Math/Vector.h"
#include "Magnum.h"
namespace Magnum { namespace MeshTools {
@ -110,7 +111,7 @@ template<class Vertex, std::size_t vertexSize = Vertex::Size> class Clean {
class IndexHash {
public:
inline std::size_t operator()(const Math::Vector<vertexSize, std::size_t>& data) const {
return *reinterpret_cast<const std::size_t*>(Corrade::Utility::MurmurHash2()(reinterpret_cast<const char*>(&data), sizeof(data)).byteArray());
return *reinterpret_cast<const std::size_t*>(Utility::MurmurHash2()(reinterpret_cast<const char*>(&data), sizeof(data)).byteArray());
}
};

2
src/MeshTools/Test/CleanTest.cpp

@ -28,7 +28,7 @@
namespace Magnum { namespace MeshTools { namespace Test {
class CleanTest: public Corrade::TestSuite::Tester {
class CleanTest: public TestSuite::Tester {
public:
CleanTest();

2
src/MeshTools/Test/CombineIndexedArraysTest.cpp

@ -31,7 +31,7 @@
namespace Magnum { namespace MeshTools { namespace Test {
class CombineIndexedArraysTest: public Corrade::TestSuite::Tester {
class CombineIndexedArraysTest: public TestSuite::Tester {
public:
CombineIndexedArraysTest();

8
src/MeshTools/Test/CompressIndicesTest.cpp

@ -27,11 +27,9 @@
#include "MeshTools/CompressIndices.h"
using Corrade::Utility::Endianness;
namespace Magnum { namespace MeshTools { namespace Test {
class CompressIndicesTest: public Corrade::TestSuite::Tester {
class CompressIndicesTest: public TestSuite::Tester {
public:
CompressIndicesTest();
@ -70,7 +68,7 @@ void CompressIndicesTest::compressShort() {
CORRADE_COMPARE(indexCount, 4);
CORRADE_VERIFY(indexType == Mesh::IndexType::UnsignedShort);
if(!Endianness::isBigEndian()) {
if(!Utility::Endianness::isBigEndian()) {
CORRADE_COMPARE(std::vector<char>(data, data+indexCount*Mesh::indexSize(indexType)),
(std::vector<char>{ 0x01, 0x00,
0x00, 0x01,
@ -97,7 +95,7 @@ void CompressIndicesTest::compressInt() {
CORRADE_COMPARE(indexCount, 3);
CORRADE_VERIFY(indexType == Mesh::IndexType::UnsignedInt);
if(!Endianness::isBigEndian()) {
if(!Utility::Endianness::isBigEndian()) {
CORRADE_COMPARE(std::vector<char>(data, data+indexCount*Mesh::indexSize(indexType)),
(std::vector<char>{ 0x00, 0x00, 0x01, 0x00,
0x03, 0x00, 0x00, 0x00,

2
src/MeshTools/Test/FlipNormalsTest.cpp

@ -30,7 +30,7 @@
namespace Magnum { namespace MeshTools { namespace Test {
class FlipNormalsTest: public Corrade::TestSuite::Tester {
class FlipNormalsTest: public TestSuite::Tester {
public:
FlipNormalsTest();

2
src/MeshTools/Test/GenerateFlatNormalsTest.cpp

@ -30,7 +30,7 @@
namespace Magnum { namespace MeshTools { namespace Test {
class GenerateFlatNormalsTest: public Corrade::TestSuite::Tester {
class GenerateFlatNormalsTest: public TestSuite::Tester {
public:
GenerateFlatNormalsTest();

6
src/MeshTools/Test/InterleaveTest.cpp

@ -29,8 +29,6 @@
#include "Utility/Debug.h"
#include "MeshTools/Interleave.h"
using Corrade::Utility::Endianness;
namespace Magnum { namespace MeshTools { namespace Test {
class InterleaveTest: public Corrade::TestSuite::Tester {
@ -95,7 +93,7 @@ void InterleaveTest::write() {
CORRADE_COMPARE(attributeCount, std::size_t(3));
CORRADE_COMPARE(stride, std::size_t(7));
std::size_t size = attributeCount*stride;
if(!Endianness::isBigEndian()) {
if(!Utility::Endianness::isBigEndian()) {
CORRADE_COMPARE(std::vector<char>(data, data+size), (std::vector<char>{
0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00,
0x01, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00,
@ -124,7 +122,7 @@ void InterleaveTest::writeGaps() {
CORRADE_COMPARE(attributeCount, std::size_t(3));
CORRADE_COMPARE(stride, std::size_t(12));
std::size_t size = attributeCount*stride;
if(!Endianness::isBigEndian()) {
if(!Utility::Endianness::isBigEndian()) {
CORRADE_COMPARE(std::vector<char>(data, data+size), (std::vector<char>{
0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,

2
src/MeshTools/Test/SubdivideTest.cpp

@ -30,7 +30,7 @@
namespace Magnum { namespace MeshTools { namespace Test {
class SubdivideTest: public Corrade::TestSuite::Tester {
class SubdivideTest: public TestSuite::Tester {
public:
SubdivideTest();

3
src/MeshTools/Test/TipsifyTest.cpp

@ -24,11 +24,12 @@
#include <TestSuite/Tester.h>
#include "Magnum.h"
#include "MeshTools/Tipsify.h"
namespace Magnum { namespace MeshTools { namespace Test {
class TipsifyTest: public Corrade::TestSuite::Tester {
class TipsifyTest: public TestSuite::Tester {
public:
TipsifyTest();

2
src/MeshTools/Test/TransformTest.cpp

@ -31,7 +31,7 @@
namespace Magnum { namespace MeshTools { namespace Test {
class TransformTest: public Corrade::TestSuite::Tester {
class TransformTest: public TestSuite::Tester {
public:
explicit TransformTest();

2
src/Platform/AbstractXApplication.cpp

@ -159,7 +159,7 @@ int AbstractXApplication::exec() {
if(flags & Flag::Redraw) {
flags &= ~Flag::Redraw;
drawEvent();
} else Corrade::Utility::sleep(5);
} else Utility::sleep(5);
}
return 0;

4
src/Platform/AbstractXApplication.h

@ -154,7 +154,7 @@ class AbstractXApplication {
Exit = 1 << 1
};
typedef Corrade::Containers::EnumSet<Flag, unsigned int> Flags;
typedef Containers::EnumSet<Flag, unsigned int> Flags;
CORRADE_ENUMSET_FRIEND_OPERATORS(Flags)
Display* display;
@ -261,7 +261,7 @@ class AbstractXApplication::InputEvent {
*
* @see modifiers()
*/
typedef Corrade::Containers::EnumSet<Modifier, unsigned int> Modifiers;
typedef Containers::EnumSet<Modifier, unsigned int> Modifiers;
inline virtual ~InputEvent() {}

4
src/Platform/NaClApplication.h

@ -218,7 +218,7 @@ class NaClApplication: public pp::Instance, public pp::Graphics3DClient, public
WillBeFullscreen = 1 << 4,
MouseLocked = 1 << 5
};
typedef Corrade::Containers::EnumSet<Flag, UnsignedByte> Flags;
typedef Containers::EnumSet<Flag, UnsignedByte> Flags;
inline void Graphics3DContextLost() override {
CORRADE_ASSERT(false, "NaClApplication: context unexpectedly lost", );
@ -334,7 +334,7 @@ class NaClApplication::InputEvent {
*
* @see modifiers()
*/
typedef Corrade::Containers::EnumSet<Modifier, std::uint32_t> Modifiers;
typedef Containers::EnumSet<Modifier, std::uint32_t> Modifiers;
inline virtual ~InputEvent() {}

6
src/Platform/Sdl2Application.h

@ -170,7 +170,7 @@ class Sdl2Application {
Exit = 1 << 1
};
typedef Corrade::Containers::EnumSet<Flag, UnsignedByte> Flags;
typedef Containers::EnumSet<Flag, UnsignedByte> Flags;
CORRADE_ENUMSET_FRIEND_OPERATORS(Flags)
void initialize();
@ -219,7 +219,7 @@ class Sdl2Application::Configuration {
*
* @see setFlags()
*/
typedef Corrade::Containers::EnumSet<Flag, Uint32, SDL_WINDOW_RESIZABLE|
typedef Containers::EnumSet<Flag, Uint32, SDL_WINDOW_RESIZABLE|
SDL_WINDOW_FULLSCREEN|SDL_WINDOW_HIDDEN|SDL_WINDOW_MAXIMIZED|
SDL_WINDOW_MINIMIZED|SDL_WINDOW_INPUT_GRABBED> Flags;
@ -327,7 +327,7 @@ class Sdl2Application::InputEvent {
* @see KeyEvent::modifiers(), MouseEvent::modifiers(),
* MouseMoveEvent::modifiers()
*/
typedef Corrade::Containers::EnumSet<Modifier, Uint16> Modifiers;
typedef Containers::EnumSet<Modifier, Uint16> Modifiers;
inline virtual ~InputEvent() {}

3
src/Primitives/Cylinder.h

@ -30,6 +30,7 @@
#include <Containers/EnumSet.h>
#include "Magnum.h"
#include "Primitives/magnumPrimitivesVisibility.h"
#include "Trade/Trade.h"
@ -53,7 +54,7 @@ class MAGNUM_PRIMITIVES_EXPORT Cylinder {
};
/** @brief %Flags */
typedef Corrade::Containers::EnumSet<Flag, int> Flags;
typedef Containers::EnumSet<Flag, int> Flags;
/**
* @brief Solid cylinder

16
src/Primitives/Test/CapsuleTest.cpp

@ -32,11 +32,9 @@
#include "Trade/MeshData3D.h"
#include "Primitives/Capsule.h"
using Corrade::TestSuite::Compare::Container;
namespace Magnum { namespace Primitives { namespace Test {
class CapsuleTest: public Corrade::TestSuite::Tester {
class CapsuleTest: public TestSuite::Tester {
public:
CapsuleTest();
@ -76,7 +74,7 @@ void CapsuleTest::withoutTextureCoords() {
{-0.612372f, 1.20711f, -0.353553f},
{0.0f, 1.5f, 0.0f}
}), Container);
}), TestSuite::Compare::Container);
CORRADE_COMPARE_AS(*capsule.normals(0), (std::vector<Vector3>{
{0.0f, -1.0f, 0.0f},
@ -102,7 +100,7 @@ void CapsuleTest::withoutTextureCoords() {
{-0.612372f, 0.707107f, -0.353553f},
{0.0f, 1.0f, 0.0f}
}), Container);
}), TestSuite::Compare::Container);
CORRADE_COMPARE_AS(*capsule.indices(), (std::vector<UnsignedInt>{
0, 2, 1, 0, 3, 2, 0, 1, 3,
@ -111,7 +109,7 @@ void CapsuleTest::withoutTextureCoords() {
7, 8, 11, 7, 11, 10, 8, 9, 12, 8, 12, 11, 9, 7, 10, 9, 10, 12,
10, 11, 14, 10, 14, 13, 11, 12, 15, 11, 15, 14, 12, 10, 13, 12, 13, 15,
13, 14, 16, 14, 15, 16, 15, 13, 16
}), Container);
}), TestSuite::Compare::Container);
}
void CapsuleTest::withTextureCoords() {
@ -146,7 +144,7 @@ void CapsuleTest::withTextureCoords() {
{0.0f, 1.20711f, 0.707107f},
{0.0f, 1.5f, 0.0f}
}), Container);
}), TestSuite::Compare::Container);
CORRADE_COMPARE_AS(*capsule.textureCoords2D(0), (std::vector<Vector2>{
{0.5f, 0.0f},
@ -177,7 +175,7 @@ void CapsuleTest::withTextureCoords() {
{1.0f, 0.833333f},
{0.5f, 1.0f}
}), Container);
}), TestSuite::Compare::Container);
CORRADE_COMPARE_AS(*capsule.indices(), (std::vector<UnsignedInt>{
0, 2, 1, 0, 3, 2, 0, 4, 3,
@ -186,7 +184,7 @@ void CapsuleTest::withTextureCoords() {
9, 10, 14, 9, 14, 13, 10, 11, 15, 10, 15, 14, 11, 12, 16, 11, 16, 15,
13, 14, 18, 13, 18, 17, 14, 15, 19, 14, 19, 18, 15, 16, 20, 15, 20, 19,
17, 18, 21, 18, 19, 21, 19, 20, 21
}), Container);
}), TestSuite::Compare::Container);
}
}}}

2
src/Primitives/Test/CircleTest.cpp

@ -30,7 +30,7 @@
namespace Magnum { namespace Primitives { namespace Test {
class CircleTest: public Corrade::TestSuite::Tester {
class CircleTest: public TestSuite::Tester {
public:
explicit CircleTest();

18
src/Primitives/Test/CylinderTest.cpp

@ -29,11 +29,9 @@
#include "Primitives/Cylinder.h"
#include "Trade/MeshData3D.h"
using Corrade::TestSuite::Compare::Container;
namespace Magnum { namespace Primitives { namespace Test {
class CylinderTest: public Corrade::TestSuite::Tester {
class CylinderTest: public TestSuite::Tester {
public:
CylinderTest();
@ -61,7 +59,7 @@ void CylinderTest::withoutAnything() {
{0.0f, 1.5f, 1.0f},
{0.866025f, 1.5f, -0.5f},
{-0.866025f, 1.5f, -0.5f}
}), Container);
}), TestSuite::Compare::Container);
CORRADE_COMPARE_AS(*cylinder.normals(0), (std::vector<Vector3>{
{0.0f, 0.0f, 1.0f},
@ -75,12 +73,12 @@ void CylinderTest::withoutAnything() {
{0.0f, 0.0f, 1.0f},
{0.866025f, 0.0f, -0.5f},
{-0.866025f, 0.0f, -0.5f}
}), Container);
}), TestSuite::Compare::Container);
CORRADE_COMPARE_AS(*cylinder.indices(), (std::vector<UnsignedInt>{
0, 1, 4, 0, 4, 3, 1, 2, 5, 1, 5, 4, 2, 0, 3, 2, 3, 5,
3, 4, 7, 3, 7, 6, 4, 5, 8, 4, 8, 7, 5, 3, 6, 5, 6, 8
}), Container);
}), TestSuite::Compare::Container);
}
void CylinderTest::withTextureCoordsAndCaps() {
@ -115,7 +113,7 @@ void CylinderTest::withTextureCoordsAndCaps() {
{0.0f, 1.5f, 1.0f},
{0.0f, 1.5f, 0.0f}
}), Container);
}), TestSuite::Compare::Container);
CORRADE_COMPARE_AS(*cylinder.normals(0), (std::vector<Vector3>{
{0.0f, -1.0f, 0.0f},
@ -146,7 +144,7 @@ void CylinderTest::withTextureCoordsAndCaps() {
{0.0f, 1.0f, 0.0f},
{0.0f, 1.0f, 0.0f},
}), Container);
}), TestSuite::Compare::Container);
CORRADE_COMPARE_AS(*cylinder.textureCoords2D(0), (std::vector<Vector2>{
{0.5f, 0.0f},
@ -177,14 +175,14 @@ void CylinderTest::withTextureCoordsAndCaps() {
{1.0f, 0.8f},
{0.5f, 1.0f}
}), Container);
}), TestSuite::Compare::Container);
CORRADE_COMPARE_AS(*cylinder.indices(), (std::vector<UnsignedInt>{
0, 2, 1, 0, 3, 2, 0, 4, 3,
1, 2, 6, 1, 6, 5, 2, 3, 7, 2, 7, 6, 3, 4, 8, 3, 8, 7,
5, 6, 10, 5, 10, 9, 6, 7, 11, 6, 11, 10, 7, 8, 12, 7,
12, 11, 17, 18, 21, 18, 19, 21, 19, 20, 21
}), Container);
}), TestSuite::Compare::Container);
}
}}}

16
src/Primitives/Test/UVSphereTest.cpp

@ -29,11 +29,9 @@
#include "Primitives/UVSphere.h"
#include "Trade/MeshData3D.h"
using Corrade::TestSuite::Compare::Container;
namespace Magnum { namespace Primitives { namespace Test {
class UVSphereTest: public Corrade::TestSuite::Tester {
class UVSphereTest: public TestSuite::Tester {
public:
UVSphereTest();
@ -61,7 +59,7 @@ void UVSphereTest::withoutTextureCoords() {
{-0.75f, 0.5f, -0.433013f},
{0.0f, 1.0f, 0.0f}
}), Container);
}), TestSuite::Compare::Container);
CORRADE_COMPARE_AS(*sphere.normals(0), (std::vector<Vector3>{
{0.0f, -1.0f, 0.0f},
@ -75,13 +73,13 @@ void UVSphereTest::withoutTextureCoords() {
{-0.75f, 0.5f, -0.433013f},
{0.0f, 1.0f, 0.0f}
}), Container);
}), TestSuite::Compare::Container);
CORRADE_COMPARE_AS(*sphere.indices(), (std::vector<UnsignedInt>{
0, 2, 1, 0, 3, 2, 0, 1, 3,
1, 2, 5, 1, 5, 4, 2, 3, 6, 2, 6, 5, 3, 1, 4, 3, 4, 6,
4, 5, 7, 5, 6, 7, 6, 4, 7
}), Container);
}), TestSuite::Compare::Container);
}
void UVSphereTest::withTextureCoords() {
@ -101,7 +99,7 @@ void UVSphereTest::withTextureCoords() {
{0.0f, 0.5f, 0.866025f},
{0.0f, 1.0f, 0.0f}
}), Container);
}), TestSuite::Compare::Container);
CORRADE_COMPARE_AS(*sphere.textureCoords2D(0), (std::vector<Vector2>{
{0.5f, 0.0f},
@ -117,13 +115,13 @@ void UVSphereTest::withTextureCoords() {
{1.0f, 0.666667f},
{0.5f, 1.0f}
}), Container);
}), TestSuite::Compare::Container);
CORRADE_COMPARE_AS(*sphere.indices(), (std::vector<UnsignedInt>{
0, 2, 1, 0, 3, 2, 0, 4, 3,
1, 2, 6, 1, 6, 5, 2, 3, 7, 2, 7, 6, 3, 4, 8, 3, 8, 7,
5, 6, 9, 6, 7, 9, 7, 8, 9
}), Container);
}), TestSuite::Compare::Container);
}
}}}

8
src/Resource.h

@ -78,7 +78,7 @@ See ResourceManager for more information.
@see ResourceManager::referenceCount(), ResourceManager::state(),
ResourceManager::get(), ResourceManager::set(), Resource::key()
*/
class ResourceKey: public Corrade::Utility::MurmurHash2::Digest {
class ResourceKey: public Utility::MurmurHash2::Digest {
public:
/**
* @brief Default constructor
@ -89,18 +89,18 @@ class ResourceKey: public Corrade::Utility::MurmurHash2::Digest {
inline constexpr ResourceKey() {}
/** @brief Constructor */
inline ResourceKey(const std::string& key): Corrade::Utility::MurmurHash2::Digest(Corrade::Utility::MurmurHash2()(key)) {}
inline ResourceKey(const std::string& key): Utility::MurmurHash2::Digest(Utility::MurmurHash2()(key)) {}
/**
* @brief Constructor
* @todo constexpr
*/
template<std::size_t size> inline constexpr ResourceKey(const char(&key)[size]): Corrade::Utility::MurmurHash2::Digest(Corrade::Utility::MurmurHash2()(key)) {}
template<std::size_t size> inline constexpr ResourceKey(const char(&key)[size]): Utility::MurmurHash2::Digest(Utility::MurmurHash2()(key)) {}
};
/** @debugoperator{Magnum::ResourceKey} */
inline Debug operator<<(Debug debug, const ResourceKey& value) {
return debug << static_cast<const Corrade::Utility::HashDigest<sizeof(std::size_t)>&>(value);
return debug << static_cast<const Utility::HashDigest<sizeof(std::size_t)>&>(value);
}
namespace Implementation {

2
src/ResourceManager.h

@ -169,7 +169,7 @@ namespace Implementation {
/* If nothing is referencing reference-counted resource, we're done */
if(policy == ResourcePolicy::ReferenceCounted && (it == _data.end() || it->second.referenceCount == 0)) {
Corrade::Utility::Warning() << "ResourceManager: Reference-counted resource with key" << key << "isn't referenced from anywhere, deleting it immediately";
Warning() << "ResourceManager: Reference-counted resource with key" << key << "isn't referenced from anywhere, deleting it immediately";
delete data;
/* Delete also already present resource (it could be here

22
src/SceneGraph/AbstractFeature.h

@ -42,7 +42,7 @@ namespace Implementation {
InvertedAbsolute = 1 << 1
};
typedef Corrade::Containers::EnumSet<FeatureCachedTransformation, UnsignedByte> FeatureCachedTransformations;
typedef Containers::EnumSet<FeatureCachedTransformation, UnsignedByte> FeatureCachedTransformations;
CORRADE_ENUMSET_OPERATORS(FeatureCachedTransformations)
}
@ -136,13 +136,13 @@ AbstractFeature.hpp implementation file to avoid linker errors. See also
@see AbstractFeature2D, AbstractFeature3D
*/
#ifndef DOXYGEN_GENERATING_OUTPUT
template<UnsignedInt dimensions, class T> class MAGNUM_SCENEGRAPH_EXPORT AbstractFeature: private Corrade::Containers::LinkedListItem<AbstractFeature<dimensions, T>, AbstractObject<dimensions, T>>
template<UnsignedInt dimensions, class T> class MAGNUM_SCENEGRAPH_EXPORT AbstractFeature: private Containers::LinkedListItem<AbstractFeature<dimensions, T>, AbstractObject<dimensions, T>>
#else
template<UnsignedInt dimensions, class T = Float> class AbstractFeature
#endif
{
friend class Corrade::Containers::LinkedList<AbstractFeature<dimensions, T>>;
friend class Corrade::Containers::LinkedListItem<AbstractFeature<dimensions, T>, AbstractObject<dimensions, T>>;
friend class Containers::LinkedList<AbstractFeature<dimensions, T>>;
friend class Containers::LinkedListItem<AbstractFeature<dimensions, T>, AbstractObject<dimensions, T>>;
template<class Transformation> friend class Object;
public:
@ -156,32 +156,32 @@ template<UnsignedInt dimensions, class T = Float> class AbstractFeature
/** @brief %Object holding this feature */
inline AbstractObject<dimensions, T>* object() {
return Corrade::Containers::LinkedListItem<AbstractFeature<dimensions, T>, AbstractObject<dimensions, T>>::list();
return Containers::LinkedListItem<AbstractFeature<dimensions, T>, AbstractObject<dimensions, T>>::list();
}
/** @overload */
inline const AbstractObject<dimensions, T>* object() const {
return Corrade::Containers::LinkedListItem<AbstractFeature<dimensions, T>, AbstractObject<dimensions, T>>::list();
return Containers::LinkedListItem<AbstractFeature<dimensions, T>, AbstractObject<dimensions, T>>::list();
}
/** @brief Previous feature or `nullptr`, if this is first feature */
inline AbstractFeature<dimensions, T>* previousFeature() {
return Corrade::Containers::LinkedListItem<AbstractFeature<dimensions, T>, AbstractObject<dimensions, T>>::previous();
return Containers::LinkedListItem<AbstractFeature<dimensions, T>, AbstractObject<dimensions, T>>::previous();
}
/** @overload */
inline const AbstractFeature<dimensions, T>* previousFeature() const {
return Corrade::Containers::LinkedListItem<AbstractFeature<dimensions, T>, AbstractObject<dimensions, T>>::previous();
return Containers::LinkedListItem<AbstractFeature<dimensions, T>, AbstractObject<dimensions, T>>::previous();
}
/** @brief Next feature or `nullptr`, if this is last feature */
inline AbstractFeature<dimensions, T>* nextFeature() {
return Corrade::Containers::LinkedListItem<AbstractFeature<dimensions, T>, AbstractObject<dimensions, T>>::next();
return Containers::LinkedListItem<AbstractFeature<dimensions, T>, AbstractObject<dimensions, T>>::next();
}
/** @overload */
inline const AbstractFeature<dimensions, T>* nextFeature() const {
return Corrade::Containers::LinkedListItem<AbstractFeature<dimensions, T>, AbstractObject<dimensions, T>>::next();
return Containers::LinkedListItem<AbstractFeature<dimensions, T>, AbstractObject<dimensions, T>>::next();
}
/**
@ -229,7 +229,7 @@ template<UnsignedInt dimensions, class T = Float> class AbstractFeature
#ifndef DOXYGEN_GENERATING_OUTPUT
typedef Implementation::FeatureCachedTransformations CachedTransformations;
#else
typedef Corrade::Containers::EnumSet<CachedTransformation, UnsignedByte> CachedTransformations;
typedef Containers::EnumSet<CachedTransformation, UnsignedByte> CachedTransformations;
#endif
/**

2
src/SceneGraph/AbstractFeature.hpp

@ -33,7 +33,7 @@
namespace Magnum { namespace SceneGraph {
template<UnsignedInt dimensions, class T> AbstractFeature<dimensions, T>::AbstractFeature(AbstractObject<dimensions, T>* object) {
object->Corrade::Containers::template LinkedList<AbstractFeature<dimensions, T>>::insert(this);
object->Containers::template LinkedList<AbstractFeature<dimensions, T>>::insert(this);
}
template<UnsignedInt dimensions, class T> AbstractFeature<dimensions, T>::~AbstractFeature() = default;

16
src/SceneGraph/AbstractObject.h

@ -57,13 +57,13 @@ for(AbstractFeature* feature = o->firstFeature(); feature; feature = feature->ne
@see AbstractObject2D, AbstractObject3D
*/
#ifndef DOXYGEN_GENERATING_OUTPUT
template<UnsignedInt dimensions, class T> class MAGNUM_SCENEGRAPH_EXPORT AbstractObject: private Corrade::Containers::LinkedList<AbstractFeature<dimensions, T>>
template<UnsignedInt dimensions, class T> class MAGNUM_SCENEGRAPH_EXPORT AbstractObject: private Containers::LinkedList<AbstractFeature<dimensions, T>>
#else
template<UnsignedInt dimensions, class T = Float> class AbstractObject
#endif
{
friend class Corrade::Containers::LinkedList<AbstractFeature<dimensions, T>>;
friend class Corrade::Containers::LinkedListItem<AbstractFeature<dimensions, T>, AbstractObject<dimensions, T>>;
friend class Containers::LinkedList<AbstractFeature<dimensions, T>>;
friend class Containers::LinkedListItem<AbstractFeature<dimensions, T>, AbstractObject<dimensions, T>>;
friend class AbstractFeature<dimensions, T>;
public:
@ -75,27 +75,27 @@ template<UnsignedInt dimensions, class T = Float> class AbstractObject
/** @brief Whether this object has features */
inline bool hasFeatures() const {
return !Corrade::Containers::LinkedList<AbstractFeature<dimensions, T>>::isEmpty();
return !Containers::LinkedList<AbstractFeature<dimensions, T>>::isEmpty();
}
/** @brief First object feature or `nullptr`, if this object has no features */
inline FeatureType* firstFeature() {
return Corrade::Containers::LinkedList<AbstractFeature<dimensions, T>>::first();
return Containers::LinkedList<AbstractFeature<dimensions, T>>::first();
}
/** @overload */
inline const FeatureType* firstFeature() const {
return Corrade::Containers::LinkedList<AbstractFeature<dimensions, T>>::first();
return Containers::LinkedList<AbstractFeature<dimensions, T>>::first();
}
/** @brief Last object feature or `nullptr`, if this object has no features */
inline FeatureType* lastFeature() {
return Corrade::Containers::LinkedList<AbstractFeature<dimensions, T>>::last();
return Containers::LinkedList<AbstractFeature<dimensions, T>>::last();
}
/** @overload */
inline const FeatureType* lastFeature() const {
return Corrade::Containers::LinkedList<AbstractFeature<dimensions, T>>::last();
return Containers::LinkedList<AbstractFeature<dimensions, T>>::last();
}
/**

2
src/SceneGraph/DualComplexTransformation.h

@ -151,7 +151,7 @@ class DualComplexTransformation: public AbstractTranslationRotation2D<T> {
* @return Pointer to self (for method chaining)
*/
inline DualComplexTransformation<T>* move(Object<DualComplexTransformation<T>>* under) {
static_cast<Object<DualComplexTransformation>*>(this)->Corrade::Containers::template LinkedList<Object<DualComplexTransformation<T>>>::move(this, under);
static_cast<Object<DualComplexTransformation>*>(this)->Containers::template LinkedList<Object<DualComplexTransformation<T>>>::move(this, under);
return this;
}

2
src/SceneGraph/MatrixTransformation2D.h

@ -153,7 +153,7 @@ class MatrixTransformation2D: public AbstractTranslationRotationScaling2D<T> {
* @return Pointer to self (for method chaining)
*/
inline MatrixTransformation2D<T>* move(Object<MatrixTransformation2D<T>>* under) {
static_cast<Object<MatrixTransformation2D>*>(this)->Corrade::Containers::template LinkedList<Object<MatrixTransformation2D<T>>>::move(this, under);
static_cast<Object<MatrixTransformation2D>*>(this)->Containers::template LinkedList<Object<MatrixTransformation2D<T>>>::move(this, under);
return this;
}

30
src/SceneGraph/Object.h

@ -44,7 +44,7 @@ namespace Implementation {
Joint = 1 << 2
};
typedef Corrade::Containers::EnumSet<ObjectFlag, UnsignedByte> ObjectFlags;
typedef Containers::EnumSet<ObjectFlag, UnsignedByte> ObjectFlags;
CORRADE_ENUMSET_OPERATORS(ObjectFlags)
}
@ -90,11 +90,11 @@ See @ref compilation-speedup-hpp for more information.
*/
template<class Transformation> class MAGNUM_SCENEGRAPH_EXPORT Object: public AbstractObject<Transformation::Dimensions, typename Transformation::Type>, public Transformation
#ifndef DOXYGEN_GENERATING_OUTPUT
, private Corrade::Containers::LinkedList<Object<Transformation>>, private Corrade::Containers::LinkedListItem<Object<Transformation>, Object<Transformation>>
, private Containers::LinkedList<Object<Transformation>>, private Containers::LinkedListItem<Object<Transformation>, Object<Transformation>>
#endif
{
friend class Corrade::Containers::LinkedList<Object<Transformation>>;
friend class Corrade::Containers::LinkedListItem<Object<Transformation>, Object<Transformation>>;
friend class Containers::LinkedList<Object<Transformation>>;
friend class Containers::LinkedListItem<Object<Transformation>, Object<Transformation>>;
#ifndef DOXYGEN_GENERATING_OUTPUT
Object(const Object<Transformation>&) = delete;
@ -149,57 +149,57 @@ template<class Transformation> class MAGNUM_SCENEGRAPH_EXPORT Object: public Abs
/** @brief Parent object or `nullptr`, if this is root object */
inline Object<Transformation>* parent() {
return Corrade::Containers::LinkedListItem<Object<Transformation>, Object<Transformation>>::list();
return Containers::LinkedListItem<Object<Transformation>, Object<Transformation>>::list();
}
/** @overload */
inline const Object<Transformation>* parent() const {
return Corrade::Containers::LinkedListItem<Object<Transformation>, Object<Transformation>>::list();
return Containers::LinkedListItem<Object<Transformation>, Object<Transformation>>::list();
}
/** @brief Previous sibling object or `nullptr`, if this is first object */
inline Object<Transformation>* previousSibling() {
return Corrade::Containers::LinkedListItem<Object<Transformation>, Object<Transformation>>::previous();
return Containers::LinkedListItem<Object<Transformation>, Object<Transformation>>::previous();
}
/** @overload */
inline const Object<Transformation>* previousSibling() const {
return Corrade::Containers::LinkedListItem<Object<Transformation>, Object<Transformation>>::previous();
return Containers::LinkedListItem<Object<Transformation>, Object<Transformation>>::previous();
}
/** @brief Next sibling object or `nullptr`, if this is last object */
inline Object<Transformation>* nextSibling() {
return Corrade::Containers::LinkedListItem<Object<Transformation>, Object<Transformation>>::next();
return Containers::LinkedListItem<Object<Transformation>, Object<Transformation>>::next();
}
/** @overload */
inline const Object<Transformation>* nextSibling() const {
return Corrade::Containers::LinkedListItem<Object<Transformation>, Object<Transformation>>::next();
return Containers::LinkedListItem<Object<Transformation>, Object<Transformation>>::next();
}
/** @brief Whether this object has children */
inline bool hasChildren() const {
return !Corrade::Containers::LinkedList<Object<Transformation>>::isEmpty();
return !Containers::LinkedList<Object<Transformation>>::isEmpty();
}
/** @brief First child object or `nullptr`, if this object has no children */
inline Object<Transformation>* firstChild() {
return Corrade::Containers::LinkedList<Object<Transformation>>::first();
return Containers::LinkedList<Object<Transformation>>::first();
}
/** @overload */
inline const Object<Transformation>* firstChild() const {
return Corrade::Containers::LinkedList<Object<Transformation>>::first();
return Containers::LinkedList<Object<Transformation>>::first();
}
/** @brief Last child object or `nullptr`, if this object has no children */
inline Object<Transformation>* lastChild() {
return Corrade::Containers::LinkedList<Object<Transformation>>::last();
return Containers::LinkedList<Object<Transformation>>::last();
}
/** @overload */
inline const Object<Transformation>* lastChild() const {
return Corrade::Containers::LinkedList<Object<Transformation>>::last();
return Containers::LinkedList<Object<Transformation>>::last();
}
/**

4
src/SceneGraph/Object.hpp

@ -78,10 +78,10 @@ template<class Transformation> Object<Transformation>* Object<Transformation>::s
}
/* Remove the object from old parent children list */
if(this->parent()) this->parent()->Corrade::Containers::template LinkedList<Object<Transformation>>::cut(this);
if(this->parent()) this->parent()->Containers::template LinkedList<Object<Transformation>>::cut(this);
/* Add the object to list of new parent */
if(parent) parent->Corrade::Containers::LinkedList<Object<Transformation>>::insert(this);
if(parent) parent->Containers::LinkedList<Object<Transformation>>::insert(this);
setDirty();
return this;

2
src/SceneGraph/RigidMatrixTransformation2D.h

@ -170,7 +170,7 @@ class RigidMatrixTransformation2D: public AbstractTranslationRotation2D<T> {
* @return Pointer to self (for method chaining)
*/
inline RigidMatrixTransformation2D<T>* move(Object<RigidMatrixTransformation2D<T>>* under) {
static_cast<Object<RigidMatrixTransformation2D>*>(this)->Corrade::Containers::template LinkedList<Object<RigidMatrixTransformation2D<T>>>::move(this, under);
static_cast<Object<RigidMatrixTransformation2D>*>(this)->Containers::template LinkedList<Object<RigidMatrixTransformation2D<T>>>::move(this, under);
return this;
}

2
src/SceneGraph/Test/AnimableTest.cpp

@ -31,7 +31,7 @@
namespace Magnum { namespace SceneGraph { namespace Test {
class AnimableTest: public Corrade::TestSuite::Tester {
class AnimableTest: public TestSuite::Tester {
public:
AnimableTest();

2
src/SceneGraph/Test/CameraTest.cpp

@ -34,7 +34,7 @@
namespace Magnum { namespace SceneGraph { namespace Test {
class CameraTest: public Corrade::TestSuite::Tester {
class CameraTest: public TestSuite::Tester {
public:
CameraTest();

2
src/SceneGraph/Test/DualComplexTransformationTest.cpp

@ -33,7 +33,7 @@ namespace Magnum { namespace SceneGraph { namespace Test {
typedef Object<DualComplexTransformation<>> Object2D;
typedef Scene<DualComplexTransformation<>> Scene2D;
class DualComplexTransformationTest: public Corrade::TestSuite::Tester {
class DualComplexTransformationTest: public TestSuite::Tester {
public:
explicit DualComplexTransformationTest();

2
src/SceneGraph/Test/DualQuaternionTransformationTest.cpp

@ -33,7 +33,7 @@ namespace Magnum { namespace SceneGraph { namespace Test {
typedef Object<DualQuaternionTransformation<>> Object3D;
typedef Scene<DualQuaternionTransformation<>> Scene3D;
class DualQuaternionTransformationTest: public Corrade::TestSuite::Tester {
class DualQuaternionTransformationTest: public TestSuite::Tester {
public:
explicit DualQuaternionTransformationTest();

2
src/SceneGraph/Test/MatrixTransformation2DTest.cpp

@ -32,7 +32,7 @@ namespace Magnum { namespace SceneGraph { namespace Test {
typedef Object<MatrixTransformation2D<>> Object2D;
typedef Scene<MatrixTransformation2D<>> Scene2D;
class MatrixTransformation2DTest: public Corrade::TestSuite::Tester {
class MatrixTransformation2DTest: public TestSuite::Tester {
public:
explicit MatrixTransformation2DTest();

2
src/SceneGraph/Test/MatrixTransformation3DTest.cpp

@ -32,7 +32,7 @@ namespace Magnum { namespace SceneGraph { namespace Test {
typedef Object<MatrixTransformation3D<>> Object3D;
typedef Scene<MatrixTransformation3D<>> Scene3D;
class MatrixTransformation3DTest: public Corrade::TestSuite::Tester {
class MatrixTransformation3DTest: public TestSuite::Tester {
public:
explicit MatrixTransformation3DTest();

2
src/SceneGraph/Test/ObjectTest.cpp

@ -30,7 +30,7 @@
namespace Magnum { namespace SceneGraph { namespace Test {
class ObjectTest: public Corrade::TestSuite::Tester {
class ObjectTest: public TestSuite::Tester {
public:
ObjectTest();

2
src/SceneGraph/Test/RigidMatrixTransformation2DTest.cpp

@ -33,7 +33,7 @@ namespace Magnum { namespace SceneGraph { namespace Test {
typedef Object<RigidMatrixTransformation2D<>> Object2D;
typedef Scene<RigidMatrixTransformation2D<>> Scene2D;
class RigidMatrixTransformation2DTest: public Corrade::TestSuite::Tester {
class RigidMatrixTransformation2DTest: public TestSuite::Tester {
public:
explicit RigidMatrixTransformation2DTest();

2
src/SceneGraph/Test/RigidMatrixTransformation3DTest.cpp

@ -33,7 +33,7 @@ namespace Magnum { namespace SceneGraph { namespace Test {
typedef Object<RigidMatrixTransformation3D<>> Object3D;
typedef Scene<RigidMatrixTransformation3D<>> Scene3D;
class RigidMatrixTransformation3DTest: public Corrade::TestSuite::Tester {
class RigidMatrixTransformation3DTest: public TestSuite::Tester {
public:
explicit RigidMatrixTransformation3DTest();

2
src/SceneGraph/Test/SceneTest.cpp

@ -29,7 +29,7 @@
namespace Magnum { namespace SceneGraph { namespace Test {
class SceneTest: public Corrade::TestSuite::Tester {
class SceneTest: public TestSuite::Tester {
public:
SceneTest();

2
src/Shaders/DistanceFieldVector.cpp

@ -39,7 +39,7 @@ namespace {
}
template<UnsignedInt dimensions> DistanceFieldVector<dimensions>::DistanceFieldVector(): transformationProjectionMatrixUniform(0), colorUniform(1), outlineColorUniform(2), outlineRangeUniform(3), smoothnessUniform(4) {
Corrade::Utility::Resource rs("MagnumShaders");
Utility::Resource rs("MagnumShaders");
#ifndef MAGNUM_TARGET_GLES
Version v = Context::current()->supportedVersion({Version::GL320, Version::GL210});

2
src/Shaders/Flat.cpp

@ -38,7 +38,7 @@ namespace {
}
template<UnsignedInt dimensions> Flat<dimensions>::Flat(): transformationProjectionMatrixUniform(0), colorUniform(1) {
Corrade::Utility::Resource rs("MagnumShaders");
Utility::Resource rs("MagnumShaders");
#ifndef MAGNUM_TARGET_GLES
Version v = Context::current()->supportedVersion({Version::GL320, Version::GL210});

2
src/Shaders/MeshVisualizer.cpp

@ -37,7 +37,7 @@ MeshVisualizer::MeshVisualizer(const Flags flags): flags(flags), transformationP
MAGNUM_ASSERT_EXTENSION_SUPPORTED(Extensions::GL::ARB::explicit_attrib_location);
MAGNUM_ASSERT_EXTENSION_SUPPORTED(Extensions::GL::ARB::explicit_uniform_location);
Corrade::Utility::Resource rs("MagnumShaders");
Utility::Resource rs("MagnumShaders");
Shader vert(Version::GL330, Shader::Type::Vertex);
vert.addSource(flags & Flag::Wireframe ? "#define WIREFRAME_RENDERING\n" : "")

2
src/Shaders/MeshVisualizer.h

@ -59,7 +59,7 @@ class MAGNUM_SHADERS_EXPORT MeshVisualizer: public AbstractShaderProgram {
};
/** @brief %Flags */
typedef Corrade::Containers::EnumSet<Flag, UnsignedByte> Flags;
typedef Containers::EnumSet<Flag, UnsignedByte> Flags;
/**
* @brief Constructor

2
src/Shaders/Phong.cpp

@ -32,7 +32,7 @@
namespace Magnum { namespace Shaders {
Phong::Phong(): transformationMatrixUniform(0), projectionMatrixUniform(1), normalMatrixUniform(2), lightUniform(3), diffuseColorUniform(4), ambientColorUniform(5), specularColorUniform(6), lightColorUniform(7), shininessUniform(8) {
Corrade::Utility::Resource rs("MagnumShaders");
Utility::Resource rs("MagnumShaders");
#ifndef MAGNUM_TARGET_GLES
Version v = Context::current()->supportedVersion({Version::GL320, Version::GL210});

2
src/Shaders/Vector.cpp

@ -39,7 +39,7 @@ namespace {
}
template<UnsignedInt dimensions> Vector<dimensions>::Vector(): transformationProjectionMatrixUniform(0), colorUniform(1) {
Corrade::Utility::Resource rs("MagnumShaders");
Utility::Resource rs("MagnumShaders");
#ifndef MAGNUM_TARGET_GLES
Version v = Context::current()->supportedVersion({Version::GL320, Version::GL210});

2
src/Shaders/VertexColor.cpp

@ -38,7 +38,7 @@ namespace {
}
template<UnsignedInt dimensions> VertexColor<dimensions>::VertexColor(): transformationProjectionMatrixUniform(0) {
Corrade::Utility::Resource rs("MagnumShaders");
Utility::Resource rs("MagnumShaders");
#ifndef MAGNUM_TARGET_GLES
Version v = Context::current()->supportedVersion({Version::GL320, Version::GL210});

2
src/Shapes/Test/AxisAlignedBoxTest.cpp

@ -31,7 +31,7 @@
namespace Magnum { namespace Shapes { namespace Test {
class AxisAlignedBoxTest: public Corrade::TestSuite::Tester {
class AxisAlignedBoxTest: public TestSuite::Tester {
public:
AxisAlignedBoxTest();

2
src/Shapes/Test/BoxTest.cpp

@ -30,7 +30,7 @@
namespace Magnum { namespace Shapes { namespace Test {
class BoxTest: public Corrade::TestSuite::Tester {
class BoxTest: public TestSuite::Tester {
public:
BoxTest();

2
src/Shapes/Test/CapsuleTest.cpp

@ -32,7 +32,7 @@
namespace Magnum { namespace Shapes { namespace Test {
class CapsuleTest: public Corrade::TestSuite::Tester {
class CapsuleTest: public TestSuite::Tester {
public:
CapsuleTest();

2
src/Shapes/Test/CompositionTest.cpp

@ -34,7 +34,7 @@
namespace Magnum { namespace Shapes { namespace Test {
class CompositionTest: public Corrade::TestSuite::Tester {
class CompositionTest: public TestSuite::Tester {
public:
CompositionTest();

2
src/Shapes/Test/LineTest.cpp

@ -30,7 +30,7 @@
namespace Magnum { namespace Shapes { namespace Test {
class LineTest: public Corrade::TestSuite::Tester {
class LineTest: public TestSuite::Tester {
public:
LineTest();

2
src/Shapes/Test/PlaneTest.cpp

@ -31,7 +31,7 @@
namespace Magnum { namespace Shapes { namespace Test {
class PlaneTest: public Corrade::TestSuite::Tester {
class PlaneTest: public TestSuite::Tester {
public:
PlaneTest();

2
src/Shapes/Test/PointTest.cpp

@ -30,7 +30,7 @@
namespace Magnum { namespace Shapes { namespace Test {
class PointTest: public Corrade::TestSuite::Tester {
class PointTest: public TestSuite::Tester {
public:
PointTest();

2
src/Shapes/Test/ShapeImplementationTest.cpp

@ -29,7 +29,7 @@
namespace Magnum { namespace Shapes { namespace Test {
class ShapeImplementationTest: public Corrade::TestSuite::Tester {
class ShapeImplementationTest: public TestSuite::Tester {
public:
ShapeImplementationTest();

2
src/Shapes/Test/ShapeTest.cpp

@ -35,7 +35,7 @@
namespace Magnum { namespace Shapes { namespace Test {
class ShapeTest: public Corrade::TestSuite::Tester {
class ShapeTest: public TestSuite::Tester {
public:
ShapeTest();

2
src/Shapes/Test/SphereTest.cpp

@ -32,7 +32,7 @@
namespace Magnum { namespace Shapes { namespace Test {
class SphereTest: public Corrade::TestSuite::Tester {
class SphereTest: public TestSuite::Tester {
public:
SphereTest();

2
src/Test/AbstractImageTest.cpp

@ -30,7 +30,7 @@
namespace Magnum { namespace Test {
class AbstractImageTest: public Corrade::TestSuite::Tester {
class AbstractImageTest: public TestSuite::Tester {
public:
explicit AbstractImageTest();

2
src/Test/AbstractShaderProgramTest.cpp

@ -28,7 +28,7 @@
namespace Magnum { namespace Test {
class AbstractShaderProgramTest: public Corrade::TestSuite::Tester {
class AbstractShaderProgramTest: public TestSuite::Tester {
public:
explicit AbstractShaderProgramTest();

2
src/Test/ArrayTest.cpp

@ -28,7 +28,7 @@
namespace Magnum { namespace Test {
class ArrayTest: public Corrade::TestSuite::Tester {
class ArrayTest: public TestSuite::Tester {
public:
ArrayTest();

4
src/Test/ColorTest.cpp

@ -30,7 +30,7 @@
namespace Magnum { namespace Test {
class ColorTest: public Corrade::TestSuite::Tester {
class ColorTest: public TestSuite::Tester {
public:
ColorTest();
@ -178,7 +178,7 @@ void ColorTest::debug() {
}
void ColorTest::configuration() {
Corrade::Utility::Configuration c;
Utility::Configuration c;
Color3f color3(0.5f, 0.75f, 1.0f);
std::string value3("0.5 0.75 1");

6
src/Test/MeshTest.cpp

@ -30,7 +30,7 @@
namespace Magnum { namespace Test {
class MeshTest: public Corrade::TestSuite::Tester {
class MeshTest: public TestSuite::Tester {
public:
MeshTest();
@ -60,7 +60,7 @@ void MeshTest::debugIndexType() {
}
void MeshTest::configurationPrimitive() {
Corrade::Utility::Configuration c;
Utility::Configuration c;
c.setValue("primitive", Mesh::Primitive::LineStrip);
CORRADE_COMPARE(c.value<std::string>("primitive"), "LineStrip");
@ -68,7 +68,7 @@ void MeshTest::configurationPrimitive() {
}
void MeshTest::configurationIndexType() {
Corrade::Utility::Configuration c;
Utility::Configuration c;
c.setValue("type", Mesh::IndexType::UnsignedByte);
CORRADE_COMPARE(c.value<std::string>("type"), "UnsignedByte");

2
src/Test/ResourceManagerTest.cpp

@ -32,7 +32,7 @@
namespace Magnum { namespace Test {
class ResourceManagerTest: public Corrade::TestSuite::Tester {
class ResourceManagerTest: public TestSuite::Tester {
public:
ResourceManagerTest();

2
src/Test/SwizzleTest.cpp

@ -28,7 +28,7 @@
namespace Magnum { namespace Test {
class SwizzleTest: public Corrade::TestSuite::Tester {
class SwizzleTest: public TestSuite::Tester {
public:
SwizzleTest();

2
src/Text/AbstractFont.cpp

@ -28,7 +28,7 @@ namespace Magnum { namespace Text {
AbstractFont::AbstractFont(): _size(0.0f) {}
AbstractFont::AbstractFont(Corrade::PluginManager::AbstractManager* manager, std::string plugin): AbstractPlugin(manager, std::move(plugin)), _size(0.0f) {}
AbstractFont::AbstractFont(PluginManager::AbstractManager* manager, std::string plugin): AbstractPlugin(manager, std::move(plugin)), _size(0.0f) {}
AbstractLayouter::AbstractLayouter(): _glyphCount(0) {}

4
src/Text/AbstractFont.h

@ -52,7 +52,7 @@ information. See TextRenderer for information about text rendering.
Plugin implements functions open(), close(), createGlyphCache() and layout().
*/
class MAGNUM_TEXT_EXPORT AbstractFont: public Corrade::PluginManager::AbstractPlugin {
class MAGNUM_TEXT_EXPORT AbstractFont: public PluginManager::AbstractPlugin {
PLUGIN_INTERFACE("cz.mosra.magnum.Text.AbstractFont/0.1")
public:
@ -60,7 +60,7 @@ class MAGNUM_TEXT_EXPORT AbstractFont: public Corrade::PluginManager::AbstractPl
explicit AbstractFont();
/** @brief Plugin manager constructor */
explicit AbstractFont(Corrade::PluginManager::AbstractManager* manager, std::string plugin);
explicit AbstractFont(PluginManager::AbstractManager* manager, std::string plugin);
/**
* @brief Open font from file

2
src/TextureTools/DistanceField.cpp

@ -68,7 +68,7 @@ DistanceFieldShader::DistanceFieldShader() {
/** @todo compatibility! */
Corrade::Utility::Resource rs("MagnumTextureTools");
Utility::Resource rs("MagnumTextureTools");
Shader vert(Version::GL330, Shader::Type::Vertex);
vert.addSource(rs.get("DistanceFieldShader.vert"));

2
src/TextureTools/Test/AtlasTest.cpp

@ -30,7 +30,7 @@
namespace Magnum { namespace TextureTools { namespace Test {
class AtlasTest: public Corrade::TestSuite::Tester {
class AtlasTest: public TestSuite::Tester {
public:
explicit AtlasTest();

4
src/Timeline.cpp

@ -27,6 +27,8 @@
#include <Utility/Debug.h>
#include <Utility/utilities.h>
#include "Magnum.h"
using namespace std::chrono;
namespace Magnum {
@ -53,7 +55,7 @@ void Timeline::nextFrame() {
_previousFrameDuration = duration/1e6f;
if(_previousFrameDuration < _minimalFrameTime) {
Corrade::Utility::sleep(_minimalFrameTime*1000 - duration/1000);
Utility::sleep(_minimalFrameTime*1000 - duration/1000);
now = high_resolution_clock::now();
_previousFrameDuration = duration_cast<microseconds>(now-_previousFrameTime).count()/1e6f;
}

2
src/Trade/AbstractImageConverter.cpp

@ -30,7 +30,7 @@ namespace Magnum { namespace Trade {
AbstractImageConverter::AbstractImageConverter() = default;
AbstractImageConverter::AbstractImageConverter(Corrade::PluginManager::AbstractManager* manager, std::string plugin): AbstractPlugin(manager, std::move(plugin)) {}
AbstractImageConverter::AbstractImageConverter(PluginManager::AbstractManager* manager, std::string plugin): AbstractPlugin(manager, std::move(plugin)) {}
Image2D* AbstractImageConverter::convertToImage(const Image2D* const) const {
CORRADE_ASSERT(features() & Feature::ConvertToImage,

6
src/Trade/AbstractImageConverter.h

@ -48,7 +48,7 @@ Plugin implements function features() and one or more of convertToImage(),
convertToData() or convertToFile() functions based on what features are
supported.
*/
class MAGNUM_EXPORT AbstractImageConverter: public Corrade::PluginManager::AbstractPlugin {
class MAGNUM_EXPORT AbstractImageConverter: public PluginManager::AbstractPlugin {
PLUGIN_INTERFACE("cz.mosra.magnum.Trade.AbstractImageConverter/0.1")
public:
@ -73,13 +73,13 @@ class MAGNUM_EXPORT AbstractImageConverter: public Corrade::PluginManager::Abstr
*
* @see features()
*/
typedef Corrade::Containers::EnumSet<Feature, UnsignedByte> Features;
typedef Containers::EnumSet<Feature, UnsignedByte> Features;
/** @brief Default constructor */
explicit AbstractImageConverter();
/** @brief Plugin manager constructor */
explicit AbstractImageConverter(Corrade::PluginManager::AbstractManager* manager, std::string plugin);
explicit AbstractImageConverter(PluginManager::AbstractManager* manager, std::string plugin);
/** @brief Features supported by this converter */
virtual Features features() const = 0;

2
src/Trade/AbstractImporter.cpp

@ -30,7 +30,7 @@ namespace Magnum { namespace Trade {
AbstractImporter::AbstractImporter() = default;
AbstractImporter::AbstractImporter(Corrade::PluginManager::AbstractManager* manager, std::string plugin): AbstractPlugin(manager, std::move(plugin)) {}
AbstractImporter::AbstractImporter(PluginManager::AbstractManager* manager, std::string plugin): AbstractPlugin(manager, std::move(plugin)) {}
bool AbstractImporter::openData(const void* const, const std::size_t) {
CORRADE_ASSERT(features() & Feature::OpenData,

10
src/Trade/AbstractImporter.h

@ -31,9 +31,9 @@
#include <Containers/EnumSet.h>
#include <PluginManager/AbstractPlugin.h>
#include "Trade/Trade.h"
#include "Magnum.h"
#include "magnumVisibility.h"
#include "Trade/Trade.h"
namespace Magnum { namespace Trade {
@ -53,7 +53,7 @@ be done in data parsing functions, because the user might want to import only
some data. This is obviously not the case for single-data formats like images,
as the file contains all data user wants to import.
*/
class MAGNUM_EXPORT AbstractImporter: public Corrade::PluginManager::AbstractPlugin {
class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractPlugin {
PLUGIN_INTERFACE("cz.mosra.magnum.Trade.AbstractImporter/0.2.1")
public:
@ -68,13 +68,13 @@ class MAGNUM_EXPORT AbstractImporter: public Corrade::PluginManager::AbstractPlu
};
/** @brief Set of features supported by this importer */
typedef Corrade::Containers::EnumSet<Feature, UnsignedByte> Features;
typedef Containers::EnumSet<Feature, UnsignedByte> Features;
/** @brief Default constructor */
explicit AbstractImporter();
/** @brief Plugin manager constructor */
explicit AbstractImporter(Corrade::PluginManager::AbstractManager* manager, std::string plugin);
explicit AbstractImporter(PluginManager::AbstractManager* manager, std::string plugin);
/** @brief Features supported by this importer */
virtual Features features() const = 0;

2
src/Trade/Test/ObjectData2DTest.cpp

@ -29,7 +29,7 @@
namespace Magnum { namespace Trade { namespace Test {
class ObjectData2DTest: public Corrade::TestSuite::Tester {
class ObjectData2DTest: public TestSuite::Tester {
public:
explicit ObjectData2DTest();

2
src/Trade/Test/ObjectData3DTest.cpp

@ -29,7 +29,7 @@
namespace Magnum { namespace Trade { namespace Test {
class ObjectData3DTest: public Corrade::TestSuite::Tester {
class ObjectData3DTest: public TestSuite::Tester {
public:
explicit ObjectData3DTest();

Loading…
Cancel
Save