Browse Source

Primitives: doc++

I also apparently completely forgot to add a changelog entry for the new
cube texture coordinates in 0f7598220d a
year ago.
master
Vladimír Vondruš 4 days ago
parent
commit
48c3f3b847
  1. 5
      doc/changelog.dox
  2. 6
      src/Magnum/Primitives/Axis.h
  3. 6
      src/Magnum/Primitives/Crosshair.h
  4. 9
      src/Magnum/Primitives/Cube.h
  5. 5
      src/Magnum/Primitives/Line.h

5
doc/changelog.dox

@ -413,6 +413,11 @@ See also:
@relativeref{Platform::Sdl2Application,setClipboardText()} to @relativeref{Platform::Sdl2Application,setClipboardText()} to
@ref Platform::Sdl2Application and @ref Platform::GlfwApplication @ref Platform::Sdl2Application and @ref Platform::GlfwApplication
@subsubsection changelog-latest-new-primitives Primitives library
- Added an option to generate texture coordinates in various layouts to
@ref Primitives::cubeSolid()
@subsubsection changelog-latest-new-scenegraph SceneGraph library @subsubsection changelog-latest-new-scenegraph SceneGraph library
- Added @ref SceneGraph::Object::move() - Added @ref SceneGraph::Object::move()

6
src/Magnum/Primitives/Axis.h

@ -47,7 +47,8 @@ mesh through @ref MeshTools::copy() to get a mutable copy, if needed.
@image html primitives-axis2d.png width=256px @image html primitives-axis2d.png width=256px
@see @ref axis3D(), @ref crosshair2D(), @ref line2D() @see @ref axis3D(), @ref crosshair2D(),
@ref line2D(const Vector2&, const Vector2&)
*/ */
MAGNUM_PRIMITIVES_EXPORT Trade::MeshData axis2D(); MAGNUM_PRIMITIVES_EXPORT Trade::MeshData axis2D();
@ -63,7 +64,8 @@ pass the mesh through @ref MeshTools::copy() to get a mutable copy, if needed.
@image html primitives-axis3d.png width=256px @image html primitives-axis3d.png width=256px
@see @ref axis2D(), @ref crosshair3D(), @ref line3D() @see @ref axis2D(), @ref crosshair3D(),
@ref line3D(const Vector3&, const Vector3&)
*/ */
MAGNUM_PRIMITIVES_EXPORT Trade::MeshData axis3D(); MAGNUM_PRIMITIVES_EXPORT Trade::MeshData axis3D();

6
src/Magnum/Primitives/Crosshair.h

@ -45,7 +45,8 @@ mesh through @ref MeshTools::copy() to get a mutable copy, if needed.
@image html primitives-crosshair2d.png width=256px @image html primitives-crosshair2d.png width=256px
@see @ref crosshair3D(), @ref axis2D(), @ref line2D() @see @ref crosshair3D(), @ref axis2D(),
@ref line2D(const Vector2&, const Vector2&)
*/ */
MAGNUM_PRIMITIVES_EXPORT Trade::MeshData crosshair2D(); MAGNUM_PRIMITIVES_EXPORT Trade::MeshData crosshair2D();
@ -59,7 +60,8 @@ mesh through @ref MeshTools::copy() to get a mutable copy, if needed.
@image html primitives-crosshair3d.png width=256px @image html primitives-crosshair3d.png width=256px
@see @ref crosshair2D(), @ref axis2D(), @ref line3D() @see @ref crosshair2D(), @ref axis2D(),
@ref line3D(const Vector3&, const Vector3&)
*/ */
MAGNUM_PRIMITIVES_EXPORT Trade::MeshData crosshair3D(); MAGNUM_PRIMITIVES_EXPORT Trade::MeshData crosshair3D();

9
src/Magnum/Primitives/Cube.h

@ -134,11 +134,12 @@ typedef Containers::EnumSet<CubeFlag> CubeFlags;
CORRADE_ENUMSET_OPERATORS(CubeFlags) CORRADE_ENUMSET_OPERATORS(CubeFlags)
/** /**
@brief Solid 3D cube @brief Solid cube
2x2x2 cube, centered at origin. @ref MeshPrimitive::Triangles with 2x2x2 cube, centered at origin. @ref MeshPrimitive::Triangles with
@ref MeshIndexType::UnsignedShort indices, interleaved @ref MeshIndexType::UnsignedShort indices, interleaved
@ref VertexFormat::Vector3 positions, flat @ref VertexFormat::Vector3 normals, optional @ref VertexFormat::Vector4 tangents and optional @ref VertexFormat::Vector3 positions, flat @ref VertexFormat::Vector3 normals,
optional @ref VertexFormat::Vector4 tangents and optional
@ref VertexFormat::Vector2 texture coordinates. If no @p flags are passed, the @ref VertexFormat::Vector2 texture coordinates. If no @p flags are passed, the
returned instance references @ref Trade::DataFlag::Global data --- pass the returned instance references @ref Trade::DataFlag::Global data --- pass the
mesh through @ref MeshTools::copy() to get a mutable copy, if needed. mesh through @ref MeshTools::copy() to get a mutable copy, if needed.
@ -162,7 +163,7 @@ MAGNUM_PRIMITIVES_EXPORT Trade::MeshData cubeSolid(CubeFlags flags);
#endif #endif
/** /**
@brief Solid 3D cube as a single strip @brief Solid cube as a single strip
2x2x2 cube, centered at origin. Non-indexed @ref MeshPrimitive::TriangleStrip 2x2x2 cube, centered at origin. Non-indexed @ref MeshPrimitive::TriangleStrip
with @ref VertexFormat::Vector3 positions. No normals or anything else, use with @ref VertexFormat::Vector3 positions. No normals or anything else, use
@ -181,7 +182,7 @@ adapted to exactly match the output of this function):
MAGNUM_PRIMITIVES_EXPORT Trade::MeshData cubeSolidStrip(); MAGNUM_PRIMITIVES_EXPORT Trade::MeshData cubeSolidStrip();
/** /**
@brief Wireframe 3D cube @brief Wireframe cube
2x2x2 cube, centered at origin. @ref MeshPrimitive::Lines with 2x2x2 cube, centered at origin. @ref MeshPrimitive::Lines with
@ref MeshIndexType::UnsignedShort indices and @ref VertexFormat::Vector3 @ref MeshIndexType::UnsignedShort indices and @ref VertexFormat::Vector3

5
src/Magnum/Primitives/Line.h

@ -44,7 +44,7 @@ going from @p a to @p b.
@image html primitives-line2d.png width=256px @image html primitives-line2d.png width=256px
@see @ref line3D(), @ref line3D(const Vector3&, const Vector3&), @ref axis2D(), @see @ref line2D(), @ref line3D(const Vector3&, const Vector3&), @ref axis2D(),
@ref crosshair2D() @ref crosshair2D()
*/ */
MAGNUM_PRIMITIVES_EXPORT Trade::MeshData line2D(const Vector2& a, const Vector2& b); MAGNUM_PRIMITIVES_EXPORT Trade::MeshData line2D(const Vector2& a, const Vector2& b);
@ -52,7 +52,8 @@ MAGNUM_PRIMITIVES_EXPORT Trade::MeshData line2D(const Vector2& a, const Vector2&
/** /**
@brief 2D line in an identity transformation @brief 2D line in an identity transformation
Equivalent to calling @ref line2D(const Vector2&, const Vector2&) as Unit-size line in direction of positive X axis. Equivalent to calling
@ref line2D(const Vector2&, const Vector2&) as
@snippet Primitives.cpp line2D-identity @snippet Primitives.cpp line2D-identity
*/ */

Loading…
Cancel
Save