diff --git a/doc/generated/primitives.cpp b/doc/generated/primitives.cpp index 391bbffd3..817ba07a8 100644 --- a/doc/generated/primitives.cpp +++ b/doc/generated/primitives.cpp @@ -76,7 +76,12 @@ using namespace Magnum; using namespace Magnum::Math::Literals; struct PrimitiveVisualizer: Platform::WindowlessApplication { - explicit PrimitiveVisualizer(const Arguments& arguments): Platform::WindowlessApplication{arguments} {} + explicit PrimitiveVisualizer(const Arguments& arguments): Platform::WindowlessApplication{arguments, + #ifndef CORRADE_TARGET_APPLE + /* So we can have wide lines */ + Configuration{}.clearFlags(Configuration::Flag::ForwardCompatible) + #endif + } {} int exec() override; @@ -115,9 +120,9 @@ struct PrimitiveVisualizer: Platform::WindowlessApplication { }; namespace { - constexpr const Vector2i ImageSize{256}; - const auto BaseColor = 0x2f83cc_rgbf; - const auto OutlineColor = 0xdcdcdc_rgbf; + constexpr const Vector2i ImageSize{512}; + const auto BaseColor = 0x2f83cc_srgbf; + const auto OutlineColor = 0xdcdcdc_srgbf; const auto Projection2D = Matrix3::projection({3.0f, 3.0f}); const auto Projection3D = Matrix4::perspectiveProjection(35.0_degf, 1.0f, 0.001f, 100.0f); const auto Transformation2D = Matrix3::rotation(13.2_degf); @@ -136,7 +141,7 @@ int PrimitiveVisualizer::exec() { } GL::Renderbuffer multisampleColor, multisampleDepth; - multisampleColor.setStorageMultisample(16, GL::RenderbufferFormat::RGBA8, ImageSize); + multisampleColor.setStorageMultisample(16, GL::RenderbufferFormat::SRGB8Alpha8, ImageSize); multisampleDepth.setStorageMultisample(16, GL::RenderbufferFormat::DepthComponent24, ImageSize); GL::Framebuffer multisampleFramebuffer{{{}, ImageSize}}; @@ -146,7 +151,7 @@ int PrimitiveVisualizer::exec() { CORRADE_INTERNAL_ASSERT(multisampleFramebuffer.checkStatus(GL::FramebufferTarget::Draw) == GL::Framebuffer::Status::Complete); GL::Renderbuffer color; - color.setStorage(GL::RenderbufferFormat::RGBA8, ImageSize); + color.setStorage(GL::RenderbufferFormat::SRGB8Alpha8, ImageSize); GL::Framebuffer framebuffer{{{}, ImageSize}}; framebuffer.attachRenderbuffer(GL::Framebuffer::ColorAttachment{0}, color); @@ -154,11 +159,13 @@ int PrimitiveVisualizer::exec() { order to draw the wireframe over. I couldn't get polygon offset to work on the first try so I gave up. This will of course break with things like torus later. */ + GL::Renderer::enable(GL::Renderer::Feature::FramebufferSrgb); GL::Renderer::enable(GL::Renderer::Feature::FaceCulling); GL::Renderer::enable(GL::Renderer::Feature::Blending); GL::Renderer::setBlendFunction(GL::Renderer::BlendFunction::One, GL::Renderer::BlendFunction::One); - GL::Renderer::setClearColor(0x000000_rgbaf); - GL::Renderer::setLineWidth(1.5f); + GL::Renderer::setClearColor(0x000000_srgbaf); + CORRADE_INTERNAL_ASSERT(GL::Renderer::lineWidthRange().contains(2.0f)); + GL::Renderer::setLineWidth(2.0f); { Shaders::VertexColor2D shader; @@ -253,17 +260,22 @@ int PrimitiveVisualizer::exec() { } } + Shaders::MeshVisualizer wireframe2D{Shaders::MeshVisualizer::Flag::Wireframe}; + wireframe2D.setColor(0x00000000_srgbaf) + .setWireframeColor(OutlineColor) + .setWireframeWidth(2.0f) + .setViewportSize(Vector2{ImageSize}) + .setTransformationProjectionMatrix(Matrix4{ + /** @todo clean up once Matrix4 from Matrix3 constructor exists */ + {(Projection2D*Transformation2D)[0], 0.0f}, + {(Projection2D*Transformation2D)[1], 0.0f}, + {0.0f, 0.0f, 1.0f, 0.0f}, + {{(Projection2D*Transformation2D)[2].xy(), 0.0f}, 1.0f}}); + { - const Matrix3 projection = Projection2D*Transformation2D; - Shaders::MeshVisualizer shader{Shaders::MeshVisualizer::Flag::Wireframe}; - shader.setColor(BaseColor) - .setWireframeColor(OutlineColor) - .setViewportSize(Vector2{ImageSize}) - .setTransformationProjectionMatrix(Matrix4{ - {projection[0], 0.0f}, - {projection[1], 0.0f}, - {0.0f, 0.0f, 1.0f, 0.0f}, - {{projection[2].xy(), 0.0f}, 1.0f}}); + Shaders::Flat2D flat; + flat.setColor(BaseColor) + .setTransformationProjectionMatrix(Projection2D*Transformation2D); for(auto fun: {&PrimitiveVisualizer::circle2DSolid, &PrimitiveVisualizer::squareSolid}) @@ -282,7 +294,8 @@ int PrimitiveVisualizer::exec() { .setCount(data->positions(0).size()) .setPrimitive(data->primitive()); - mesh.draw(shader); + mesh.draw(flat) + .draw(wireframe2D); GL::AbstractFramebuffer::blit(multisampleFramebuffer, framebuffer, framebuffer.viewport(), GL::FramebufferBlit::Color); Image2D result = framebuffer.read(framebuffer.viewport(), {PixelFormat::RGBA8Unorm}); @@ -290,22 +303,23 @@ int PrimitiveVisualizer::exec() { } } + Shaders::MeshVisualizer wireframe3D{Shaders::MeshVisualizer::Flag::Wireframe}; + wireframe3D.setColor(0x00000000_srgbaf) + .setWireframeColor(OutlineColor) + .setWireframeWidth(2.0f) + .setViewportSize(Vector2{ImageSize}) + .setTransformationProjectionMatrix(Projection3D*Transformation3D); + { Shaders::Phong phong; - phong.setAmbientColor(0x22272e_rgbf) + phong.setAmbientColor(0x22272e_srgbf) .setDiffuseColor(BaseColor) - .setSpecularColor(0x000000_rgbf) + .setSpecularColor(0x000000_srgbf) .setLightPosition({5.0f, 5.0f, 7.0f}) .setProjectionMatrix(Projection3D) .setTransformationMatrix(Transformation3D) .setNormalMatrix(Transformation3D.rotationScaling()); - Shaders::MeshVisualizer wireframe{Shaders::MeshVisualizer::Flag::Wireframe}; - wireframe.setColor(0x000000_rgbaf) - .setWireframeColor(OutlineColor) - .setViewportSize(Vector2{ImageSize}) - .setTransformationProjectionMatrix(Projection3D*Transformation3D); - for(auto fun: {&PrimitiveVisualizer::capsule3DSolid, &PrimitiveVisualizer::circle3DSolid, &PrimitiveVisualizer::coneSolid, @@ -324,7 +338,7 @@ int PrimitiveVisualizer::exec() { MeshTools::compile(*data) .draw(phong) - .draw(wireframe); + .draw(wireframe3D); GL::AbstractFramebuffer::blit(multisampleFramebuffer, framebuffer, framebuffer.viewport(), GL::FramebufferBlit::Color); Image2D result = framebuffer.read(framebuffer.viewport(), {PixelFormat::RGBA8Unorm}); diff --git a/doc/primitives-axis2d.png b/doc/primitives-axis2d.png index dc1c80088..15a470021 100644 Binary files a/doc/primitives-axis2d.png and b/doc/primitives-axis2d.png differ diff --git a/doc/primitives-axis3d.png b/doc/primitives-axis3d.png index 398a21ce5..051fcd2e7 100644 Binary files a/doc/primitives-axis3d.png and b/doc/primitives-axis3d.png differ diff --git a/doc/primitives-capsule2dwireframe.png b/doc/primitives-capsule2dwireframe.png index ae2ea351c..a8250d31d 100644 Binary files a/doc/primitives-capsule2dwireframe.png and b/doc/primitives-capsule2dwireframe.png differ diff --git a/doc/primitives-capsule3dsolid.png b/doc/primitives-capsule3dsolid.png index c8ef87289..5552b64f3 100644 Binary files a/doc/primitives-capsule3dsolid.png and b/doc/primitives-capsule3dsolid.png differ diff --git a/doc/primitives-capsule3dwireframe.png b/doc/primitives-capsule3dwireframe.png index 1e7eaa401..425437c0c 100644 Binary files a/doc/primitives-capsule3dwireframe.png and b/doc/primitives-capsule3dwireframe.png differ diff --git a/doc/primitives-circle2dsolid.png b/doc/primitives-circle2dsolid.png index 1a76f6ab0..2207b67df 100644 Binary files a/doc/primitives-circle2dsolid.png and b/doc/primitives-circle2dsolid.png differ diff --git a/doc/primitives-circle2dwireframe.png b/doc/primitives-circle2dwireframe.png index b049fabc6..7e2bbb69a 100644 Binary files a/doc/primitives-circle2dwireframe.png and b/doc/primitives-circle2dwireframe.png differ diff --git a/doc/primitives-circle3dsolid.png b/doc/primitives-circle3dsolid.png index a8772ce0a..fdd036034 100644 Binary files a/doc/primitives-circle3dsolid.png and b/doc/primitives-circle3dsolid.png differ diff --git a/doc/primitives-circle3dwireframe.png b/doc/primitives-circle3dwireframe.png index 46283737e..ddb22e4c0 100644 Binary files a/doc/primitives-circle3dwireframe.png and b/doc/primitives-circle3dwireframe.png differ diff --git a/doc/primitives-conesolid.png b/doc/primitives-conesolid.png index 41a979f1e..9bbcebfa7 100644 Binary files a/doc/primitives-conesolid.png and b/doc/primitives-conesolid.png differ diff --git a/doc/primitives-conewireframe.png b/doc/primitives-conewireframe.png index 209c1394a..aa9d4cc27 100644 Binary files a/doc/primitives-conewireframe.png and b/doc/primitives-conewireframe.png differ diff --git a/doc/primitives-crosshair2d.png b/doc/primitives-crosshair2d.png index 1dd240a24..6d6170023 100644 Binary files a/doc/primitives-crosshair2d.png and b/doc/primitives-crosshair2d.png differ diff --git a/doc/primitives-crosshair3d.png b/doc/primitives-crosshair3d.png index a44400a75..e209a638b 100644 Binary files a/doc/primitives-crosshair3d.png and b/doc/primitives-crosshair3d.png differ diff --git a/doc/primitives-cubesolid.png b/doc/primitives-cubesolid.png index ad86392e5..720d68256 100644 Binary files a/doc/primitives-cubesolid.png and b/doc/primitives-cubesolid.png differ diff --git a/doc/primitives-cubewireframe.png b/doc/primitives-cubewireframe.png index 9bf6262e8..bd7862dc5 100644 Binary files a/doc/primitives-cubewireframe.png and b/doc/primitives-cubewireframe.png differ diff --git a/doc/primitives-cylindersolid.png b/doc/primitives-cylindersolid.png index 0190e5e31..37194afba 100644 Binary files a/doc/primitives-cylindersolid.png and b/doc/primitives-cylindersolid.png differ diff --git a/doc/primitives-cylinderwireframe.png b/doc/primitives-cylinderwireframe.png index 9afe77f60..8560d328c 100644 Binary files a/doc/primitives-cylinderwireframe.png and b/doc/primitives-cylinderwireframe.png differ diff --git a/doc/primitives-grid3dsolid.png b/doc/primitives-grid3dsolid.png index 510c58f58..931f7b8ff 100644 Binary files a/doc/primitives-grid3dsolid.png and b/doc/primitives-grid3dsolid.png differ diff --git a/doc/primitives-grid3dwireframe.png b/doc/primitives-grid3dwireframe.png index e8657cf9a..1402736dd 100644 Binary files a/doc/primitives-grid3dwireframe.png and b/doc/primitives-grid3dwireframe.png differ diff --git a/doc/primitives-icospheresolid.png b/doc/primitives-icospheresolid.png index f0865a6d1..d5d4d85ef 100644 Binary files a/doc/primitives-icospheresolid.png and b/doc/primitives-icospheresolid.png differ diff --git a/doc/primitives-line2d.png b/doc/primitives-line2d.png index 57b080f2b..2348e17d0 100644 Binary files a/doc/primitives-line2d.png and b/doc/primitives-line2d.png differ diff --git a/doc/primitives-line3d.png b/doc/primitives-line3d.png index c8c8c5d2b..b330c19d9 100644 Binary files a/doc/primitives-line3d.png and b/doc/primitives-line3d.png differ diff --git a/doc/primitives-planesolid.png b/doc/primitives-planesolid.png index 4e6833939..bff71b4ef 100644 Binary files a/doc/primitives-planesolid.png and b/doc/primitives-planesolid.png differ diff --git a/doc/primitives-planewireframe.png b/doc/primitives-planewireframe.png index 89cf7c455..85a7d53d8 100644 Binary files a/doc/primitives-planewireframe.png and b/doc/primitives-planewireframe.png differ diff --git a/doc/primitives-squaresolid.png b/doc/primitives-squaresolid.png index a73bad260..a0602a885 100644 Binary files a/doc/primitives-squaresolid.png and b/doc/primitives-squaresolid.png differ diff --git a/doc/primitives-squarewireframe.png b/doc/primitives-squarewireframe.png index 4da8a18d4..4a47e8a2e 100644 Binary files a/doc/primitives-squarewireframe.png and b/doc/primitives-squarewireframe.png differ diff --git a/doc/primitives-uvspheresolid.png b/doc/primitives-uvspheresolid.png index 2b6e73c24..d19455af9 100644 Binary files a/doc/primitives-uvspheresolid.png and b/doc/primitives-uvspheresolid.png differ diff --git a/doc/primitives-uvspherewireframe.png b/doc/primitives-uvspherewireframe.png index 672253b89..68d793a7f 100644 Binary files a/doc/primitives-uvspherewireframe.png and b/doc/primitives-uvspherewireframe.png differ diff --git a/src/Magnum/Primitives/Axis.h b/src/Magnum/Primitives/Axis.h index 8a4ee24ac..c63ca6f55 100644 --- a/src/Magnum/Primitives/Axis.h +++ b/src/Magnum/Primitives/Axis.h @@ -40,7 +40,7 @@ namespace Magnum { namespace Primitives { Two color-coded arrows for visualizing orientation (XY is RG). Indexed @ref MeshPrimitive::Lines with vertex colors. -@image html primitives-axis2d.png +@image html primitives-axis2d.png width=256px @see @ref axis3D(), @ref crosshair2D(), @ref line2D() */ @@ -52,7 +52,7 @@ MAGNUM_PRIMITIVES_EXPORT Trade::MeshData2D axis2D(); Three color-coded arrows for visualizing orientation (XYZ is RGB). Indexed @ref MeshPrimitive::Lines with vertex colors. -@image html primitives-axis3d.png +@image html primitives-axis3d.png width=256px @see @ref axis2D(), @ref crosshair3D(), @ref line3D() */ diff --git a/src/Magnum/Primitives/Capsule.h b/src/Magnum/Primitives/Capsule.h index 0b650d934..afba5af20 100644 --- a/src/Magnum/Primitives/Capsule.h +++ b/src/Magnum/Primitives/Capsule.h @@ -49,7 +49,7 @@ namespace Magnum { namespace Primitives { Cylinder of radius @cpp 1.0f @ce along Y axis with hemispheres instead of caps. Indexed @ref MeshPrimitive::Lines. -@image html primitives-capsule2dwireframe.png +@image html primitives-capsule2dwireframe.png width=256px @see @ref capsule3DSolid(), @ref capsule3DWireframe(), @ref circle2DWireframe(), @ref squareWireframe() @@ -95,7 +95,7 @@ Indexed @ref MeshPrimitive::Triangles with normals and optional 2D texture coordinates. If texture coordinates are generated, vertices of one segment are duplicated for texture wrapping. -@image html primitives-capsule3dsolid.png +@image html primitives-capsule3dsolid.png width=256px The capsule is by default created with radius set to @f$ 1.0 @f$. In order to get radius @f$ r @f$, length @f$ l @f$ and preserve correct normals, set @@ -119,7 +119,7 @@ MAGNUM_PRIMITIVES_EXPORT Trade::MeshData3D capsule3DSolid(UnsignedInt hemisphere Cylinder of radius @cpp 1.0f @ce along Y axis with hemispheres instead of caps. Indexed @ref MeshPrimitive::Lines. -@image html primitives-capsule3dwireframe.png +@image html primitives-capsule3dwireframe.png width=256px @see @ref capsule2DWireframe(), @ref capsule3DSolid(), @ref cylinderSolid() */ diff --git a/src/Magnum/Primitives/Circle.h b/src/Magnum/Primitives/Circle.h index 7b124e40c..ff8d3111d 100644 --- a/src/Magnum/Primitives/Circle.h +++ b/src/Magnum/Primitives/Circle.h @@ -44,7 +44,7 @@ namespace Magnum { namespace Primitives { Circle with radius @cpp 1.0f @ce. Non-indexed @ref MeshPrimitive::TriangleFan. -@image html primitives-circle2dsolid.png +@image html primitives-circle2dsolid.png width=256px @see @ref circle2DWireframe(), @ref circle3DSolid() */ @@ -56,7 +56,7 @@ MAGNUM_PRIMITIVES_EXPORT Trade::MeshData2D circle2DSolid(UnsignedInt segments); Circle with radius @cpp 1.0f @ce. Non-indexed @ref MeshPrimitive::LineLoop. -@image html primitives-circle2dwireframe.png +@image html primitives-circle2dwireframe.png width=256px @see @ref circle2DSolid(), @ref circle3DWireframe() */ @@ -87,7 +87,7 @@ struct MAGNUM_PRIMITIVES_EXPORT Circle { Circle on the XY plane with radius @cpp 1.0f @ce. Non-indexed @ref MeshPrimitive::TriangleFan with normals in positive Z direction. -@image html primitives-circle3dsolid.png +@image html primitives-circle3dsolid.png width=256px @see @ref circle3DWireframe(), @ref circle2DSolid() */ @@ -100,7 +100,7 @@ MAGNUM_PRIMITIVES_EXPORT Trade::MeshData3D circle3DSolid(UnsignedInt segments); Circle on the XY plane with radius @cpp 1.0f @ce. Non-indexed @ref MeshPrimitive::LineLoop. -@image html primitives-circle3dwireframe.png +@image html primitives-circle3dwireframe.png width=256px @see @ref circle2DSolid(), @ref circle3DWireframe() */ diff --git a/src/Magnum/Primitives/Cone.h b/src/Magnum/Primitives/Cone.h index e25a79e6e..a5e667ab3 100644 --- a/src/Magnum/Primitives/Cone.h +++ b/src/Magnum/Primitives/Cone.h @@ -70,7 +70,7 @@ Cone along Y axis of radius @cpp 1.0f @ce. Indexed normals over the whole area, the tip consists of @cpp segments*2 @ce vertices instead of just one. -@image html primitives-conesolid.png +@image html primitives-conesolid.png width=256px The cone is by default created with radius set to @f$ 1.0 @f$. In order to get radius @f$ r @f$, length @f$ l @f$ and preserve correct normals, set @@ -89,7 +89,7 @@ MAGNUM_PRIMITIVES_EXPORT Trade::MeshData3D coneSolid(UnsignedInt rings, Unsigned Cone along Y axis of radius @cpp 1.0f @ce. Indexed @ref MeshPrimitive::Lines. -@image html primitives-conewireframe.png +@image html primitives-conewireframe.png width=256px @see @ref coneSolid(), @ref cylinderWireframe() */ diff --git a/src/Magnum/Primitives/Crosshair.h b/src/Magnum/Primitives/Crosshair.h index 5640a0f3e..4de2b5ab1 100644 --- a/src/Magnum/Primitives/Crosshair.h +++ b/src/Magnum/Primitives/Crosshair.h @@ -43,7 +43,7 @@ namespace Magnum { namespace Primitives { 2x2 crosshair (two crossed lines), non-indexed @ref MeshPrimitive::Lines. -@image html primitives-crosshair2d.png +@image html primitives-crosshair2d.png width=256px @see @ref crosshair3D(), @ref axis2D(), @ref line2D() */ @@ -67,7 +67,7 @@ struct MAGNUM_PRIMITIVES_EXPORT Crosshair2D { 2x2x2 crosshair (three crossed lines), non-indexed @ref MeshPrimitive::Lines. -@image html primitives-crosshair3d.png +@image html primitives-crosshair3d.png width=256px @see @ref crosshair2D(), @ref axis2D(), @ref line3D() */ diff --git a/src/Magnum/Primitives/Cube.h b/src/Magnum/Primitives/Cube.h index 618d160a2..f4f9ab04b 100644 --- a/src/Magnum/Primitives/Cube.h +++ b/src/Magnum/Primitives/Cube.h @@ -43,7 +43,7 @@ namespace Magnum { namespace Primitives { Indexed @ref MeshPrimitive::Triangles with flat normals. -@image html primitives-cubesolid.png +@image html primitives-cubesolid.png width=256px @see @ref cubeSolidStrip(), @ref cubeWireframe() */ @@ -55,7 +55,7 @@ MAGNUM_PRIMITIVES_EXPORT Trade::MeshData3D cubeSolid(); Non-indexed @ref MeshPrimitive::TriangleStrip. Just positions, no normals or anything else. -@image html primitives-cubesolid.png +@image html primitives-cubesolid.png width=256px @see @ref cubeSolid(), @ref cubeWireframe() */ @@ -66,7 +66,7 @@ MAGNUM_PRIMITIVES_EXPORT Trade::MeshData3D cubeSolidStrip(); Indexed @ref MeshPrimitive::Lines. -@image html primitives-cubewireframe.png +@image html primitives-cubewireframe.png width=256px @see @ref cubeSolid(), @ref cubeSolidStrip() */ diff --git a/src/Magnum/Primitives/Cylinder.h b/src/Magnum/Primitives/Cylinder.h index e57ae14d0..31e72793f 100644 --- a/src/Magnum/Primitives/Cylinder.h +++ b/src/Magnum/Primitives/Cylinder.h @@ -70,7 +70,7 @@ Cylinder along Y axis of radius @cpp 1.0f @ce. Indexed optional capped ends. If texture coordinates are generated, vertices of one segment are duplicated for texture wrapping. -@image html primitives-cylindersolid.png +@image html primitives-cylindersolid.png width=256px The cylinder is by default created with radius set to @f$ 1.0 @f$. In order to get radius @f$ r @f$, length @f$ l @f$ and preserve correct normals, set @@ -92,7 +92,7 @@ MAGNUM_PRIMITIVES_EXPORT Trade::MeshData3D cylinderSolid(UnsignedInt rings, Unsi Cylinder along Y axis of radius @cpp 1.0f @ce. Indexed @ref MeshPrimitive::Lines. -@image html primitives-cylinderwireframe.png +@image html primitives-cylinderwireframe.png width=256px @see @ref cylinderSolid(), @ref coneWireframe() */ diff --git a/src/Magnum/Primitives/Grid.h b/src/Magnum/Primitives/Grid.h index 767b17a97..05ef5f0c1 100644 --- a/src/Magnum/Primitives/Grid.h +++ b/src/Magnum/Primitives/Grid.h @@ -69,7 +69,7 @@ CORRADE_ENUMSET_OPERATORS(GridFlags) 2x2 grid in the XY plane with normals in positive Z direction. Indexed @ref MeshPrimitive::Triangles with optional normals and texture coordinates. -@image html primitives-grid3dsolid.png +@image html primitives-grid3dsolid.png width=256px The @p subdivisions parameter describes how many times the plane gets cut in each direction. Specifying @cpp {0, 0} @ce will make the result an (indexed) @@ -85,7 +85,7 @@ MAGNUM_PRIMITIVES_EXPORT Trade::MeshData3D grid3DSolid(const Vector2i& subdivisi 2x2 grid in the XY plane. Indexed @ref MeshPrimitive::Lines. -@image html primitives-grid3dwireframe.png +@image html primitives-grid3dwireframe.png width=256px The @p subdivisions parameter describes how many times the plane gets cut in each direction. Specifying @cpp {0, 0} @ce will make the result an (indexed) diff --git a/src/Magnum/Primitives/Icosphere.h b/src/Magnum/Primitives/Icosphere.h index ecd2d613e..9b2bf8552 100644 --- a/src/Magnum/Primitives/Icosphere.h +++ b/src/Magnum/Primitives/Icosphere.h @@ -45,7 +45,7 @@ namespace Magnum { namespace Primitives { Sphere with radius @cpp 1.0f @ce. Indexed @ref MeshPrimitive::Triangles with normals. -@image html primitives-icospheresolid.png +@image html primitives-icospheresolid.png width=256px The @p subdivisions parameter describes how many times is each icosphere triangle subdivided, recursively. Specifying @cpp 0 @ce will result in an diff --git a/src/Magnum/Primitives/Line.h b/src/Magnum/Primitives/Line.h index d573d1e10..b52cfb5df 100644 --- a/src/Magnum/Primitives/Line.h +++ b/src/Magnum/Primitives/Line.h @@ -44,7 +44,7 @@ namespace Magnum { namespace Primitives { Non-indexed @ref MeshPrimitive::Lines going from @p a to @p b. -@image html primitives-line2d.png +@image html primitives-line2d.png width=256px @see @ref line3D(), @ref line3D(const Vector3&, const Vector3&), @ref axis2D(), @ref crosshair2D() @@ -65,7 +65,7 @@ MAGNUM_PRIMITIVES_EXPORT Trade::MeshData2D line2D(); Non-indexed @ref MeshPrimitive::Lines going from @p a to @p b. -@image html primitives-line3d.png +@image html primitives-line3d.png width=256px @see @ref line3D(), @ref line2D(const Vector2&, const Vector2&), @ref axis3D(), @ref crosshair3D() diff --git a/src/Magnum/Primitives/Plane.h b/src/Magnum/Primitives/Plane.h index 9a433588d..a2631037f 100644 --- a/src/Magnum/Primitives/Plane.h +++ b/src/Magnum/Primitives/Plane.h @@ -56,7 +56,7 @@ enum class PlaneTextureCoords: UnsignedByte { 2x2 plane. Non-indexed @ref MeshPrimitive::TriangleStrip on the XY plane with normals in positive Z direction. -@image html primitives-planesolid.png +@image html primitives-planesolid.png width=256px @see @ref planeWireframe(), @ref squareSolid() */ @@ -67,7 +67,7 @@ MAGNUM_PRIMITIVES_EXPORT Trade::MeshData3D planeSolid(PlaneTextureCoords texture 2x2 plane. Non-indexed @ref MeshPrimitive::LineLoop on the XY plane. -@image html primitives-planewireframe.png +@image html primitives-planewireframe.png width=256px @see @ref planeSolid(), @ref squareWireframe() */ diff --git a/src/Magnum/Primitives/Square.h b/src/Magnum/Primitives/Square.h index 043d2f72e..4716f6cb4 100644 --- a/src/Magnum/Primitives/Square.h +++ b/src/Magnum/Primitives/Square.h @@ -55,7 +55,7 @@ enum class SquareTextureCoords: UnsignedByte { 2x2 square. Non-indexed @ref MeshPrimitive::TriangleStrip. -@image html primitives-squaresolid.png +@image html primitives-squaresolid.png width=256px @see @ref squareWireframe(), @ref planeSolid() */ @@ -66,7 +66,7 @@ MAGNUM_PRIMITIVES_EXPORT Trade::MeshData2D squareSolid(SquareTextureCoords textu 2x2 square. Non-indexed @ref MeshPrimitive::LineLoop. -@image html primitives-squarewireframe.png +@image html primitives-squarewireframe.png width=256px @see @ref squareSolid(), @ref planeWireframe() */ diff --git a/src/Magnum/Primitives/UVSphere.h b/src/Magnum/Primitives/UVSphere.h index 4f65d09c9..8b6e8a823 100644 --- a/src/Magnum/Primitives/UVSphere.h +++ b/src/Magnum/Primitives/UVSphere.h @@ -60,7 +60,7 @@ Sphere with radius @cpp 1.0f @ce. Indexed @ref MeshPrimitive::Triangles with normals and optional 2D texture coordinates. If texture coordinates are generated, vertices of one segment are duplicated for texture wrapping. -@image html primitives-uvspheresolid.png +@image html primitives-uvspheresolid.png width=256px @see @ref icosphereSolid() */ @@ -75,7 +75,7 @@ MAGNUM_PRIMITIVES_EXPORT Trade::MeshData3D uvSphereSolid(UnsignedInt rings, Unsi Sphere with radius @cpp 1.0f @ce. Indexed @ref MeshPrimitive::Lines. -@image html primitives-uvspherewireframe.png +@image html primitives-uvspherewireframe.png width=256px @see @ref icosphereSolid() */