Browse Source

doc: convert primitive renderings to proper sRGB and HiDPI.

Quick detour that took me quite an extreme amount of time to finish.
pull/268/merge
Vladimír Vondruš 8 years ago
parent
commit
e7d99a1190
  1. 64
      doc/generated/primitives.cpp
  2. BIN
      doc/primitives-axis2d.png
  3. BIN
      doc/primitives-axis3d.png
  4. BIN
      doc/primitives-capsule2dwireframe.png
  5. BIN
      doc/primitives-capsule3dsolid.png
  6. BIN
      doc/primitives-capsule3dwireframe.png
  7. BIN
      doc/primitives-circle2dsolid.png
  8. BIN
      doc/primitives-circle2dwireframe.png
  9. BIN
      doc/primitives-circle3dsolid.png
  10. BIN
      doc/primitives-circle3dwireframe.png
  11. BIN
      doc/primitives-conesolid.png
  12. BIN
      doc/primitives-conewireframe.png
  13. BIN
      doc/primitives-crosshair2d.png
  14. BIN
      doc/primitives-crosshair3d.png
  15. BIN
      doc/primitives-cubesolid.png
  16. BIN
      doc/primitives-cubewireframe.png
  17. BIN
      doc/primitives-cylindersolid.png
  18. BIN
      doc/primitives-cylinderwireframe.png
  19. BIN
      doc/primitives-grid3dsolid.png
  20. BIN
      doc/primitives-grid3dwireframe.png
  21. BIN
      doc/primitives-icospheresolid.png
  22. BIN
      doc/primitives-line2d.png
  23. BIN
      doc/primitives-line3d.png
  24. BIN
      doc/primitives-planesolid.png
  25. BIN
      doc/primitives-planewireframe.png
  26. BIN
      doc/primitives-squaresolid.png
  27. BIN
      doc/primitives-squarewireframe.png
  28. BIN
      doc/primitives-uvspheresolid.png
  29. BIN
      doc/primitives-uvspherewireframe.png
  30. 4
      src/Magnum/Primitives/Axis.h
  31. 6
      src/Magnum/Primitives/Capsule.h
  32. 8
      src/Magnum/Primitives/Circle.h
  33. 4
      src/Magnum/Primitives/Cone.h
  34. 4
      src/Magnum/Primitives/Crosshair.h
  35. 6
      src/Magnum/Primitives/Cube.h
  36. 4
      src/Magnum/Primitives/Cylinder.h
  37. 4
      src/Magnum/Primitives/Grid.h
  38. 2
      src/Magnum/Primitives/Icosphere.h
  39. 4
      src/Magnum/Primitives/Line.h
  40. 4
      src/Magnum/Primitives/Plane.h
  41. 4
      src/Magnum/Primitives/Square.h
  42. 4
      src/Magnum/Primitives/UVSphere.h

64
doc/generated/primitives.cpp

@ -76,7 +76,12 @@ using namespace Magnum;
using namespace Magnum::Math::Literals; using namespace Magnum::Math::Literals;
struct PrimitiveVisualizer: Platform::WindowlessApplication { 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; int exec() override;
@ -115,9 +120,9 @@ struct PrimitiveVisualizer: Platform::WindowlessApplication {
}; };
namespace { namespace {
constexpr const Vector2i ImageSize{256}; constexpr const Vector2i ImageSize{512};
const auto BaseColor = 0x2f83cc_rgbf; const auto BaseColor = 0x2f83cc_srgbf;
const auto OutlineColor = 0xdcdcdc_rgbf; const auto OutlineColor = 0xdcdcdc_srgbf;
const auto Projection2D = Matrix3::projection({3.0f, 3.0f}); 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 Projection3D = Matrix4::perspectiveProjection(35.0_degf, 1.0f, 0.001f, 100.0f);
const auto Transformation2D = Matrix3::rotation(13.2_degf); const auto Transformation2D = Matrix3::rotation(13.2_degf);
@ -136,7 +141,7 @@ int PrimitiveVisualizer::exec() {
} }
GL::Renderbuffer multisampleColor, multisampleDepth; 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); multisampleDepth.setStorageMultisample(16, GL::RenderbufferFormat::DepthComponent24, ImageSize);
GL::Framebuffer multisampleFramebuffer{{{}, ImageSize}}; GL::Framebuffer multisampleFramebuffer{{{}, ImageSize}};
@ -146,7 +151,7 @@ int PrimitiveVisualizer::exec() {
CORRADE_INTERNAL_ASSERT(multisampleFramebuffer.checkStatus(GL::FramebufferTarget::Draw) == GL::Framebuffer::Status::Complete); CORRADE_INTERNAL_ASSERT(multisampleFramebuffer.checkStatus(GL::FramebufferTarget::Draw) == GL::Framebuffer::Status::Complete);
GL::Renderbuffer color; GL::Renderbuffer color;
color.setStorage(GL::RenderbufferFormat::RGBA8, ImageSize); color.setStorage(GL::RenderbufferFormat::SRGB8Alpha8, ImageSize);
GL::Framebuffer framebuffer{{{}, ImageSize}}; GL::Framebuffer framebuffer{{{}, ImageSize}};
framebuffer.attachRenderbuffer(GL::Framebuffer::ColorAttachment{0}, color); 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 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 on the first try so I gave up. This will of course break with things
like torus later. */ like torus later. */
GL::Renderer::enable(GL::Renderer::Feature::FramebufferSrgb);
GL::Renderer::enable(GL::Renderer::Feature::FaceCulling); GL::Renderer::enable(GL::Renderer::Feature::FaceCulling);
GL::Renderer::enable(GL::Renderer::Feature::Blending); GL::Renderer::enable(GL::Renderer::Feature::Blending);
GL::Renderer::setBlendFunction(GL::Renderer::BlendFunction::One, GL::Renderer::BlendFunction::One); GL::Renderer::setBlendFunction(GL::Renderer::BlendFunction::One, GL::Renderer::BlendFunction::One);
GL::Renderer::setClearColor(0x000000_rgbaf); GL::Renderer::setClearColor(0x000000_srgbaf);
GL::Renderer::setLineWidth(1.5f); CORRADE_INTERNAL_ASSERT(GL::Renderer::lineWidthRange().contains(2.0f));
GL::Renderer::setLineWidth(2.0f);
{ {
Shaders::VertexColor2D shader; Shaders::VertexColor2D shader;
@ -253,17 +260,22 @@ int PrimitiveVisualizer::exec() {
} }
} }
{ Shaders::MeshVisualizer wireframe2D{Shaders::MeshVisualizer::Flag::Wireframe};
const Matrix3 projection = Projection2D*Transformation2D; wireframe2D.setColor(0x00000000_srgbaf)
Shaders::MeshVisualizer shader{Shaders::MeshVisualizer::Flag::Wireframe};
shader.setColor(BaseColor)
.setWireframeColor(OutlineColor) .setWireframeColor(OutlineColor)
.setWireframeWidth(2.0f)
.setViewportSize(Vector2{ImageSize}) .setViewportSize(Vector2{ImageSize})
.setTransformationProjectionMatrix(Matrix4{ .setTransformationProjectionMatrix(Matrix4{
{projection[0], 0.0f}, /** @todo clean up once Matrix4 from Matrix3 constructor exists */
{projection[1], 0.0f}, {(Projection2D*Transformation2D)[0], 0.0f},
{(Projection2D*Transformation2D)[1], 0.0f},
{0.0f, 0.0f, 1.0f, 0.0f}, {0.0f, 0.0f, 1.0f, 0.0f},
{{projection[2].xy(), 0.0f}, 1.0f}}); {{(Projection2D*Transformation2D)[2].xy(), 0.0f}, 1.0f}});
{
Shaders::Flat2D flat;
flat.setColor(BaseColor)
.setTransformationProjectionMatrix(Projection2D*Transformation2D);
for(auto fun: {&PrimitiveVisualizer::circle2DSolid, for(auto fun: {&PrimitiveVisualizer::circle2DSolid,
&PrimitiveVisualizer::squareSolid}) &PrimitiveVisualizer::squareSolid})
@ -282,7 +294,8 @@ int PrimitiveVisualizer::exec() {
.setCount(data->positions(0).size()) .setCount(data->positions(0).size())
.setPrimitive(data->primitive()); .setPrimitive(data->primitive());
mesh.draw(shader); mesh.draw(flat)
.draw(wireframe2D);
GL::AbstractFramebuffer::blit(multisampleFramebuffer, framebuffer, framebuffer.viewport(), GL::FramebufferBlit::Color); GL::AbstractFramebuffer::blit(multisampleFramebuffer, framebuffer, framebuffer.viewport(), GL::FramebufferBlit::Color);
Image2D result = framebuffer.read(framebuffer.viewport(), {PixelFormat::RGBA8Unorm}); 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; Shaders::Phong phong;
phong.setAmbientColor(0x22272e_rgbf) phong.setAmbientColor(0x22272e_srgbf)
.setDiffuseColor(BaseColor) .setDiffuseColor(BaseColor)
.setSpecularColor(0x000000_rgbf) .setSpecularColor(0x000000_srgbf)
.setLightPosition({5.0f, 5.0f, 7.0f}) .setLightPosition({5.0f, 5.0f, 7.0f})
.setProjectionMatrix(Projection3D) .setProjectionMatrix(Projection3D)
.setTransformationMatrix(Transformation3D) .setTransformationMatrix(Transformation3D)
.setNormalMatrix(Transformation3D.rotationScaling()); .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, for(auto fun: {&PrimitiveVisualizer::capsule3DSolid,
&PrimitiveVisualizer::circle3DSolid, &PrimitiveVisualizer::circle3DSolid,
&PrimitiveVisualizer::coneSolid, &PrimitiveVisualizer::coneSolid,
@ -324,7 +338,7 @@ int PrimitiveVisualizer::exec() {
MeshTools::compile(*data) MeshTools::compile(*data)
.draw(phong) .draw(phong)
.draw(wireframe); .draw(wireframe3D);
GL::AbstractFramebuffer::blit(multisampleFramebuffer, framebuffer, framebuffer.viewport(), GL::FramebufferBlit::Color); GL::AbstractFramebuffer::blit(multisampleFramebuffer, framebuffer, framebuffer.viewport(), GL::FramebufferBlit::Color);
Image2D result = framebuffer.read(framebuffer.viewport(), {PixelFormat::RGBA8Unorm}); Image2D result = framebuffer.read(framebuffer.viewport(), {PixelFormat::RGBA8Unorm});

BIN
doc/primitives-axis2d.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
doc/primitives-axis3d.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
doc/primitives-capsule2dwireframe.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

BIN
doc/primitives-capsule3dsolid.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 80 KiB

BIN
doc/primitives-capsule3dwireframe.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 9.7 KiB

BIN
doc/primitives-circle2dsolid.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 34 KiB

BIN
doc/primitives-circle2dwireframe.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
doc/primitives-circle3dsolid.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 32 KiB

BIN
doc/primitives-circle3dwireframe.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

BIN
doc/primitives-conesolid.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 41 KiB

BIN
doc/primitives-conewireframe.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

BIN
doc/primitives-crosshair2d.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
doc/primitives-crosshair3d.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
doc/primitives-cubesolid.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 42 KiB

BIN
doc/primitives-cubewireframe.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

BIN
doc/primitives-cylindersolid.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 65 KiB

BIN
doc/primitives-cylinderwireframe.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

BIN
doc/primitives-grid3dsolid.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 51 KiB

BIN
doc/primitives-grid3dwireframe.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

BIN
doc/primitives-icospheresolid.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 59 KiB

BIN
doc/primitives-line2d.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 525 B

After

Width:  |  Height:  |  Size: 995 B

BIN
doc/primitives-line3d.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 479 B

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
doc/primitives-planesolid.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 16 KiB

BIN
doc/primitives-planewireframe.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
doc/primitives-squaresolid.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 19 KiB

BIN
doc/primitives-squarewireframe.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
doc/primitives-uvspheresolid.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 82 KiB

BIN
doc/primitives-uvspherewireframe.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

4
src/Magnum/Primitives/Axis.h

@ -40,7 +40,7 @@ namespace Magnum { namespace Primitives {
Two color-coded arrows for visualizing orientation (XY is RG). Indexed Two color-coded arrows for visualizing orientation (XY is RG). Indexed
@ref MeshPrimitive::Lines with vertex colors. @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() @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 Three color-coded arrows for visualizing orientation (XYZ is RGB). Indexed
@ref MeshPrimitive::Lines with vertex colors. @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() @see @ref axis2D(), @ref crosshair3D(), @ref line3D()
*/ */

6
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. Cylinder of radius @cpp 1.0f @ce along Y axis with hemispheres instead of caps.
Indexed @ref MeshPrimitive::Lines. Indexed @ref MeshPrimitive::Lines.
@image html primitives-capsule2dwireframe.png @image html primitives-capsule2dwireframe.png width=256px
@see @ref capsule3DSolid(), @ref capsule3DWireframe(), @ref circle2DWireframe(), @see @ref capsule3DSolid(), @ref capsule3DWireframe(), @ref circle2DWireframe(),
@ref squareWireframe() @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 coordinates. If texture coordinates are generated, vertices of one segment are
duplicated for texture wrapping. 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 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 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. Cylinder of radius @cpp 1.0f @ce along Y axis with hemispheres instead of caps.
Indexed @ref MeshPrimitive::Lines. Indexed @ref MeshPrimitive::Lines.
@image html primitives-capsule3dwireframe.png @image html primitives-capsule3dwireframe.png width=256px
@see @ref capsule2DWireframe(), @ref capsule3DSolid(), @ref cylinderSolid() @see @ref capsule2DWireframe(), @ref capsule3DSolid(), @ref cylinderSolid()
*/ */

8
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. 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() @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. 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() @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 Circle on the XY plane with radius @cpp 1.0f @ce. Non-indexed
@ref MeshPrimitive::TriangleFan with normals in positive Z direction. @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() @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 Circle on the XY plane with radius @cpp 1.0f @ce. Non-indexed
@ref MeshPrimitive::LineLoop. @ref MeshPrimitive::LineLoop.
@image html primitives-circle3dwireframe.png @image html primitives-circle3dwireframe.png width=256px
@see @ref circle2DSolid(), @ref circle3DWireframe() @see @ref circle2DSolid(), @ref circle3DWireframe()
*/ */

4
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 normals over the whole area, the tip consists of @cpp segments*2 @ce vertices
instead of just one. 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 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 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. 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() @see @ref coneSolid(), @ref cylinderWireframe()
*/ */

4
src/Magnum/Primitives/Crosshair.h

@ -43,7 +43,7 @@ namespace Magnum { namespace Primitives {
2x2 crosshair (two crossed lines), non-indexed @ref MeshPrimitive::Lines. 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() @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. 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() @see @ref crosshair2D(), @ref axis2D(), @ref line3D()
*/ */

6
src/Magnum/Primitives/Cube.h

@ -43,7 +43,7 @@ namespace Magnum { namespace Primitives {
Indexed @ref MeshPrimitive::Triangles with flat normals. Indexed @ref MeshPrimitive::Triangles with flat normals.
@image html primitives-cubesolid.png @image html primitives-cubesolid.png width=256px
@see @ref cubeSolidStrip(), @ref cubeWireframe() @see @ref cubeSolidStrip(), @ref cubeWireframe()
*/ */
@ -55,7 +55,7 @@ MAGNUM_PRIMITIVES_EXPORT Trade::MeshData3D cubeSolid();
Non-indexed @ref MeshPrimitive::TriangleStrip. Just positions, no Non-indexed @ref MeshPrimitive::TriangleStrip. Just positions, no
normals or anything else. normals or anything else.
@image html primitives-cubesolid.png @image html primitives-cubesolid.png width=256px
@see @ref cubeSolid(), @ref cubeWireframe() @see @ref cubeSolid(), @ref cubeWireframe()
*/ */
@ -66,7 +66,7 @@ MAGNUM_PRIMITIVES_EXPORT Trade::MeshData3D cubeSolidStrip();
Indexed @ref MeshPrimitive::Lines. Indexed @ref MeshPrimitive::Lines.
@image html primitives-cubewireframe.png @image html primitives-cubewireframe.png width=256px
@see @ref cubeSolid(), @ref cubeSolidStrip() @see @ref cubeSolid(), @ref cubeSolidStrip()
*/ */

4
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 optional capped ends. If texture coordinates are generated, vertices of one
segment are duplicated for texture wrapping. 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 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 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 Cylinder along Y axis of radius @cpp 1.0f @ce. Indexed
@ref MeshPrimitive::Lines. @ref MeshPrimitive::Lines.
@image html primitives-cylinderwireframe.png @image html primitives-cylinderwireframe.png width=256px
@see @ref cylinderSolid(), @ref coneWireframe() @see @ref cylinderSolid(), @ref coneWireframe()
*/ */

4
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 2x2 grid in the XY plane with normals in positive Z direction. Indexed
@ref MeshPrimitive::Triangles with optional normals and texture coordinates. @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 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) 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. 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 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) each direction. Specifying @cpp {0, 0} @ce will make the result an (indexed)

2
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 Sphere with radius @cpp 1.0f @ce. Indexed @ref MeshPrimitive::Triangles with
normals. normals.
@image html primitives-icospheresolid.png @image html primitives-icospheresolid.png width=256px
The @p subdivisions parameter describes how many times is each icosphere The @p subdivisions parameter describes how many times is each icosphere
triangle subdivided, recursively. Specifying @cpp 0 @ce will result in an triangle subdivided, recursively. Specifying @cpp 0 @ce will result in an

4
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. 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(), @see @ref line3D(), @ref line3D(const Vector3&, const Vector3&), @ref axis2D(),
@ref crosshair2D() @ref crosshair2D()
@ -65,7 +65,7 @@ MAGNUM_PRIMITIVES_EXPORT Trade::MeshData2D line2D();
Non-indexed @ref MeshPrimitive::Lines going from @p a to @p b. 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(), @see @ref line3D(), @ref line2D(const Vector2&, const Vector2&), @ref axis3D(),
@ref crosshair3D() @ref crosshair3D()

4
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 2x2 plane. Non-indexed @ref MeshPrimitive::TriangleStrip on the XY plane with
normals in positive Z direction. normals in positive Z direction.
@image html primitives-planesolid.png @image html primitives-planesolid.png width=256px
@see @ref planeWireframe(), @ref squareSolid() @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. 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() @see @ref planeSolid(), @ref squareWireframe()
*/ */

4
src/Magnum/Primitives/Square.h

@ -55,7 +55,7 @@ enum class SquareTextureCoords: UnsignedByte {
2x2 square. Non-indexed @ref MeshPrimitive::TriangleStrip. 2x2 square. Non-indexed @ref MeshPrimitive::TriangleStrip.
@image html primitives-squaresolid.png @image html primitives-squaresolid.png width=256px
@see @ref squareWireframe(), @ref planeSolid() @see @ref squareWireframe(), @ref planeSolid()
*/ */
@ -66,7 +66,7 @@ MAGNUM_PRIMITIVES_EXPORT Trade::MeshData2D squareSolid(SquareTextureCoords textu
2x2 square. Non-indexed @ref MeshPrimitive::LineLoop. 2x2 square. Non-indexed @ref MeshPrimitive::LineLoop.
@image html primitives-squarewireframe.png @image html primitives-squarewireframe.png width=256px
@see @ref squareSolid(), @ref planeWireframe() @see @ref squareSolid(), @ref planeWireframe()
*/ */

4
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 normals and optional 2D texture coordinates. If texture coordinates are
generated, vertices of one segment are duplicated for texture wrapping. 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() @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. 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() @see @ref icosphereSolid()
*/ */

Loading…
Cancel
Save