From dedf36941c0ca7d8c8795648afadaebb69a4e558 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 17 Mar 2020 21:56:59 +0100 Subject: [PATCH] Primitives: hint on MeshTools for converting into indexed meshes. --- src/Magnum/Primitives/Circle.h | 12 ++++++++---- src/Magnum/Primitives/Cube.h | 2 +- src/Magnum/Primitives/Gradient.h | 4 ++-- src/Magnum/Primitives/Plane.h | 6 ++++-- src/Magnum/Primitives/Square.h | 6 ++++-- 5 files changed, 19 insertions(+), 11 deletions(-) diff --git a/src/Magnum/Primitives/Circle.h b/src/Magnum/Primitives/Circle.h index 6a0eb90f7..816b15f40 100644 --- a/src/Magnum/Primitives/Circle.h +++ b/src/Magnum/Primitives/Circle.h @@ -57,7 +57,8 @@ positions and optional @ref VertexFormat::Vector2 texture coordinates. @image html primitives-circle2dsolid.png width=256px -@see @ref circle2DWireframe(), @ref circle3DSolid() +@see @ref circle2DWireframe(), @ref circle3DSolid(), + @ref MeshTools::generateTriangleFanIndices() */ MAGNUM_PRIMITIVES_EXPORT Trade::MeshData circle2DSolid(UnsignedInt segments, CircleTextureCoords textureCoords = CircleTextureCoords::DontGenerate); @@ -71,7 +72,8 @@ Circle with radius @cpp 1.0f @ce. Non-indexed @ref MeshPrimitive::LineLoop with @image html primitives-circle2dwireframe.png width=256px -@see @ref circle2DSolid(), @ref circle3DWireframe() +@see @ref circle2DSolid(), @ref circle3DWireframe(), + @ref MeshTools::generateLineLoopIndices() */ MAGNUM_PRIMITIVES_EXPORT Trade::MeshData circle2DWireframe(UnsignedInt segments); @@ -88,7 +90,8 @@ optional @ref VertexFormat::Vector2 texture coordinates. @image html primitives-circle3dsolid.png width=256px -@see @ref circle3DWireframe(), @ref circle2DSolid() +@see @ref circle3DWireframe(), @ref circle2DSolid(), + @ref MeshTools::generateTriangleFanIndices() */ MAGNUM_PRIMITIVES_EXPORT Trade::MeshData circle3DSolid(UnsignedInt segments, CircleTextureCoords textureCoords = CircleTextureCoords::DontGenerate); @@ -100,7 +103,8 @@ Circle on the XY plane with radius @cpp 1.0f @ce. Non-indexed @ref MeshPrimitive @image html primitives-circle3dwireframe.png width=256px -@see @ref circle2DSolid(), @ref circle3DWireframe() +@see @ref circle2DSolid(), @ref circle3DWireframe(), + @ref MeshTools::generateLineLoopIndices() */ MAGNUM_PRIMITIVES_EXPORT Trade::MeshData circle3DWireframe(UnsignedInt segments); diff --git a/src/Magnum/Primitives/Cube.h b/src/Magnum/Primitives/Cube.h index 14e42e266..5d12d9834 100644 --- a/src/Magnum/Primitives/Cube.h +++ b/src/Magnum/Primitives/Cube.h @@ -57,7 +57,7 @@ normals or anything else --- use @ref cubeSolid() instead if you need these. @image html primitives-cubesolid.png width=256px -@see @ref cubeWireframe() +@see @ref cubeWireframe(), @ref MeshTools::generateTriangleStripIndices() */ MAGNUM_PRIMITIVES_EXPORT Trade::MeshData cubeSolidStrip(); diff --git a/src/Magnum/Primitives/Gradient.h b/src/Magnum/Primitives/Gradient.h index b39160334..a25fdbb96 100644 --- a/src/Magnum/Primitives/Gradient.h +++ b/src/Magnum/Primitives/Gradient.h @@ -47,7 +47,7 @@ defined by the endpoints @p a and @p b, linearly interpolated from @p colorA to @image html primitives-gradient2d.png width=256px @see @ref gradient2DHorizontal(), @ref gradient2DVertical(), @ref gradient3D(), - @ref squareSolid() + @ref squareSolid(), @ref MeshTools::generateTriangleStripIndices() */ MAGNUM_PRIMITIVES_EXPORT Trade::MeshData gradient2D(const Vector2& a, const Color4& colorA, const Vector2& b, const Color4& colorB); @@ -90,7 +90,7 @@ defined by the endpoints @p a and @p b, linearly interpolated from @p colorA to @image html primitives-gradient3d.png width=256px @see @ref gradient3DHorizontal(), @ref gradient3DVertical(), @ref gradient2D(), - @ref planeSolid() + @ref planeSolid(), @ref MeshTools::generateTriangleStripIndices() */ MAGNUM_PRIMITIVES_EXPORT Trade::MeshData gradient3D(const Vector3& a, const Color4& colorA, const Vector3& b, const Color4& colorB); diff --git a/src/Magnum/Primitives/Plane.h b/src/Magnum/Primitives/Plane.h index 2bb902b81..a9f67969a 100644 --- a/src/Magnum/Primitives/Plane.h +++ b/src/Magnum/Primitives/Plane.h @@ -56,7 +56,8 @@ memory. @image html primitives-planesolid.png width=256px -@see @ref planeWireframe(), @ref squareSolid(), @ref gradient3D() +@see @ref planeWireframe(), @ref squareSolid(), @ref gradient3D(), + @ref MeshTools::generateTriangleStripIndices() */ MAGNUM_PRIMITIVES_EXPORT Trade::MeshData planeSolid(PlaneTextureCoords textureCoords = PlaneTextureCoords::DontGenerate); @@ -69,7 +70,8 @@ stored in constant memory. @image html primitives-planewireframe.png width=256px -@see @ref planeSolid(), @ref squareWireframe() +@see @ref planeSolid(), @ref squareWireframe(), + @ref MeshTools::generateLineLoopIndices() */ MAGNUM_PRIMITIVES_EXPORT Trade::MeshData planeWireframe(); diff --git a/src/Magnum/Primitives/Square.h b/src/Magnum/Primitives/Square.h index 5db993e92..101856e20 100644 --- a/src/Magnum/Primitives/Square.h +++ b/src/Magnum/Primitives/Square.h @@ -56,7 +56,8 @@ memory. @image html primitives-squaresolid.png width=256px -@see @ref squareWireframe(), @ref planeSolid(), @ref gradient2D() +@see @ref squareWireframe(), @ref planeSolid(), @ref gradient2D(), + @ref MeshTools::generateTriangleStripIndices() */ MAGNUM_PRIMITIVES_EXPORT Trade::MeshData squareSolid(SquareTextureCoords textureCoords = SquareTextureCoords::DontGenerate); @@ -69,7 +70,8 @@ stored in constant memory. @image html primitives-squarewireframe.png width=256px -@see @ref squareSolid(), @ref planeWireframe() +@see @ref squareSolid(), @ref planeWireframe(), + @ref MeshTools::generateLineLoopIndices() */ MAGNUM_PRIMITIVES_EXPORT Trade::MeshData squareWireframe();