Browse Source

Doc++, minor cleanup.

pull/7/head
Vladimír Vondruš 14 years ago
parent
commit
a3c37cd277
  1. 7
      src/AbstractTexture.h
  2. 2
      src/IndexedMesh.h
  3. 12
      src/Math/Vector2.h
  4. 12
      src/Math/Vector3.h
  5. 3
      src/Mesh.h
  6. 6
      src/MeshTools/CompressIndices.h
  7. 9
      src/Platform/GlutApplication.h
  8. 36
      src/Platform/NaClApplication.h
  9. 15
      src/Platform/Sdl2Application.h
  10. 2
      src/Primitives/Capsule.h

7
src/AbstractTexture.h

@ -576,7 +576,10 @@ class MAGNUM_EXPORT AbstractTexture {
/** /**
* @brief Max supported layer count * @brief Max supported layer count
* *
* @see bind(GLint), @fn_gl{Get} with @def_gl{MAX_COMBINED_TEXTURE_IMAGE_UNITS}, * The result is cached, repeated queries don't result in repeated
* OpenGL calls.
* @see @ref AbstractShaderProgram-subclassing, bind(GLint),
* @fn_gl{Get} with @def_gl{MAX_COMBINED_TEXTURE_IMAGE_UNITS},
* @fn_gl{ActiveTexture} * @fn_gl{ActiveTexture}
*/ */
static GLint maxSupportedLayerCount(); static GLint maxSupportedLayerCount();
@ -584,6 +587,8 @@ class MAGNUM_EXPORT AbstractTexture {
/** /**
* @brief Max supported anisotropy * @brief Max supported anisotropy
* *
* The result is cached, repeated queries don't result in repeated
* OpenGL calls.
* @see setMaxAnisotropy(), @fn_gl{Get} with @def_gl{MAX_TEXTURE_MAX_ANISOTROPY_EXT} * @see setMaxAnisotropy(), @fn_gl{Get} with @def_gl{MAX_TEXTURE_MAX_ANISOTROPY_EXT}
* @requires_extension %Extension @extension{EXT,texture_filter_anisotropic} * @requires_extension %Extension @extension{EXT,texture_filter_anisotropic}
* @requires_es_extension %Extension @es_extension2{EXT,texture_filter_anisotropic,texture_filter_anisotropic} * @requires_es_extension %Extension @es_extension2{EXT,texture_filter_anisotropic,texture_filter_anisotropic}

2
src/IndexedMesh.h

@ -81,6 +81,7 @@ class MAGNUM_EXPORT IndexedMesh: public Mesh {
* @brief Set index count * @brief Set index count
* @return Pointer to self (for method chaining) * @return Pointer to self (for method chaining)
* *
* Default is zero.
* @see MeshTools::compressIndices() * @see MeshTools::compressIndices()
*/ */
inline IndexedMesh* setIndexCount(GLsizei count) { inline IndexedMesh* setIndexCount(GLsizei count) {
@ -95,6 +96,7 @@ class MAGNUM_EXPORT IndexedMesh: public Mesh {
* @brief Set index type * @brief Set index type
* @return Pointer to self (for method chaining) * @return Pointer to self (for method chaining)
* *
* Default is @ref Type "Type::UnsignedShort".
* @see MeshTools::compressIndices() * @see MeshTools::compressIndices()
*/ */
inline IndexedMesh* setIndexType(Type type) { inline IndexedMesh* setIndexType(Type type) {

12
src/Math/Vector2.h

@ -33,7 +33,7 @@ See @ref matrix-vector for brief introduction.
template<class T> class Vector2: public Vector<2, T> { template<class T> class Vector2: public Vector<2, T> {
public: public:
/** /**
* @brief %Vector in direction of X axis * @brief %Vector in direction of X axis (right)
* *
* Usable for translation in given axis, for example: * Usable for translation in given axis, for example:
* @code * @code
@ -44,7 +44,7 @@ template<class T> class Vector2: public Vector<2, T> {
inline constexpr static Vector2<T> xAxis(T length = T(1)) { return Vector2<T>(length, T()); } inline constexpr static Vector2<T> xAxis(T length = T(1)) { return Vector2<T>(length, T()); }
/** /**
* @brief %Vector in direction of Y axis * @brief %Vector in direction of Y axis (up)
* *
* See xAxis() for more information. * See xAxis() for more information.
* @see yScale() * @see yScale()
@ -52,7 +52,7 @@ template<class T> class Vector2: public Vector<2, T> {
inline constexpr static Vector2<T> yAxis(T length = T(1)) { return Vector2<T>(T(), length); } inline constexpr static Vector2<T> yAxis(T length = T(1)) { return Vector2<T>(T(), length); }
/** /**
* @brief Scaling vector in direction of X axis * @brief Scaling vector in direction of X axis (width)
* *
* Usable for scaling along given direction, for example: * Usable for scaling along given direction, for example:
* @code * @code
@ -63,7 +63,7 @@ template<class T> class Vector2: public Vector<2, T> {
inline constexpr static Vector2<T> xScale(T scale) { return Vector2<T>(scale, T(1)); } inline constexpr static Vector2<T> xScale(T scale) { return Vector2<T>(scale, T(1)); }
/** /**
* @brief Scaling vector in direction of Y axis * @brief Scaling vector in direction of Y axis (height)
* *
* See xScale() for more information. * See xScale() for more information.
* @see yAxis() * @see yAxis()
@ -81,8 +81,8 @@ template<class T> class Vector2: public Vector<2, T> {
/** /**
* @brief Constructor * @brief Constructor
* @param x X value * @param x X component
* @param y Y value * @param y Y component
*/ */
inline constexpr Vector2(T x, T y): Vector<2, T>(x, y) {} inline constexpr Vector2(T x, T y): Vector<2, T>(x, y) {}

12
src/Math/Vector3.h

@ -34,7 +34,7 @@ homogeneous two-dimensional coordinates.
template<class T> class Vector3: public Vector<3, T> { template<class T> class Vector3: public Vector<3, T> {
public: public:
/** /**
* @brief %Vector in direction of X axis * @brief %Vector in direction of X axis (right)
* *
* Usable for translation or rotation along given axis, for example: * Usable for translation or rotation along given axis, for example:
* @code * @code
@ -46,7 +46,7 @@ template<class T> class Vector3: public Vector<3, T> {
inline constexpr static Vector3<T> xAxis(T length = T(1)) { return Vector3<T>(length, T(), T()); } inline constexpr static Vector3<T> xAxis(T length = T(1)) { return Vector3<T>(length, T(), T()); }
/** /**
* @brief %Vector in direction of Y axis * @brief %Vector in direction of Y axis (up)
* *
* See xAxis() for more information. * See xAxis() for more information.
* @see yScale() * @see yScale()
@ -54,7 +54,7 @@ template<class T> class Vector3: public Vector<3, T> {
inline constexpr static Vector3<T> yAxis(T length = T(1)) { return Vector3<T>(T(), length, T()); } inline constexpr static Vector3<T> yAxis(T length = T(1)) { return Vector3<T>(T(), length, T()); }
/** /**
* @brief %Vector in direction of Z axis * @brief %Vector in direction of Z axis (backward)
* *
* See xAxis() for more information. * See xAxis() for more information.
* @see zScale() * @see zScale()
@ -62,7 +62,7 @@ template<class T> class Vector3: public Vector<3, T> {
inline constexpr static Vector3<T> zAxis(T length = T(1)) { return Vector3<T>(T(), T(), length); } inline constexpr static Vector3<T> zAxis(T length = T(1)) { return Vector3<T>(T(), T(), length); }
/** /**
* @brief Scaling vector in direction of X axis * @brief Scaling vector in direction of X axis (width)
* *
* Usable for scaling along given direction, for example: * Usable for scaling along given direction, for example:
* @code * @code
@ -73,7 +73,7 @@ template<class T> class Vector3: public Vector<3, T> {
inline constexpr static Vector3<T> xScale(T scale) { return Vector3<T>(scale, T(1), T(1)); } inline constexpr static Vector3<T> xScale(T scale) { return Vector3<T>(scale, T(1), T(1)); }
/** /**
* @brief Scaling vector in direction of Y axis * @brief Scaling vector in direction of Y axis (height)
* *
* See xScale() for more information. * See xScale() for more information.
* @see yAxis() * @see yAxis()
@ -81,7 +81,7 @@ template<class T> class Vector3: public Vector<3, T> {
inline constexpr static Vector3<T> yScale(T scale) { return Vector3<T>(T(1), scale, T(1)); } inline constexpr static Vector3<T> yScale(T scale) { return Vector3<T>(T(1), scale, T(1)); }
/** /**
* @brief Scaling vector in direction of Z axis * @brief Scaling vector in direction of Z axis (depth)
* *
* See xScale() for more information. * See xScale() for more information.
* @see zAxis() * @see zAxis()

3
src/Mesh.h

@ -388,6 +388,8 @@ class MAGNUM_EXPORT Mesh {
/** /**
* @brief Set primitive type * @brief Set primitive type
* @return Pointer to self (for method chaining) * @return Pointer to self (for method chaining)
*
* Default is @ref Primitive "Primitive::Triangles".
*/ */
inline Mesh* setPrimitive(Primitive primitive) { inline Mesh* setPrimitive(Primitive primitive) {
_primitive = primitive; _primitive = primitive;
@ -401,6 +403,7 @@ class MAGNUM_EXPORT Mesh {
* @brief Set vertex count * @brief Set vertex count
* @return Pointer to self (for method chaining) * @return Pointer to self (for method chaining)
* *
* Default is zero.
* @attention All bound attributes are reset after calling this * @attention All bound attributes are reset after calling this
* function, so you must call * function, so you must call
* addVertexBuffer()/addInterleavedVertexBuffer() afterwards. * addVertexBuffer()/addInterleavedVertexBuffer() afterwards.

6
src/MeshTools/CompressIndices.h

@ -26,11 +26,7 @@
#include "magnumMeshToolsVisibility.h" #include "magnumMeshToolsVisibility.h"
namespace Magnum { namespace Magnum { namespace MeshTools {
class IndexedMesh;
namespace MeshTools {
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
namespace Implementation { namespace Implementation {

9
src/Platform/GlutApplication.h

@ -83,8 +83,8 @@ class GlutApplication {
* @brief Viewport event * @brief Viewport event
* *
* Called when viewport size changes. You should pass the new size to * Called when viewport size changes. You should pass the new size to
* Framebuffer::setViewport() or SceneGraph::Camera::setViewport(), * Framebuffer::setViewport() (and SceneGraph::AbstractCamera::setViewport(),
* if using scene graph. * if using scene graph).
*/ */
virtual void viewportEvent(const Math::Vector2<GLsizei>& size) = 0; virtual void viewportEvent(const Math::Vector2<GLsizei>& size) = 0;
@ -92,7 +92,7 @@ class GlutApplication {
* @brief Draw event * @brief Draw event
* *
* Here implement your drawing functions, such as calling * Here implement your drawing functions, such as calling
* SceneGraph::Camera::draw(). After drawing is finished, call * SceneGraph::AbstractCamera::draw(). After drawing is finished, call
* swapBuffers(). If you want to draw immediately again, call also * swapBuffers(). If you want to draw immediately again, call also
* redraw(). * redraw().
*/ */
@ -110,7 +110,7 @@ class GlutApplication {
/** /**
* @brief Redraw immediately * @brief Redraw immediately
* *
* Marks the window for redrawing, resulting in call of drawEvent() * Marks the window for redrawing, resulting in call to drawEvent()
* in the next iteration. * in the next iteration.
*/ */
virtual inline void redraw() { virtual inline void redraw() {
@ -230,7 +230,6 @@ class GlutApplication {
* *
* Called when any mouse button is pressed and mouse is moved. Default * Called when any mouse button is pressed and mouse is moved. Default
* implementation does nothing. * implementation does nothing.
*
* @see setMouseTracking() * @see setMouseTracking()
*/ */
virtual void mouseMotionEvent(const Math::Vector2<int>& position); virtual void mouseMotionEvent(const Math::Vector2<int>& position);

36
src/Platform/NaClApplication.h

@ -46,6 +46,9 @@ namespace Platform {
/** @nosubgrouping /** @nosubgrouping
@brief NaCl application @brief NaCl application
Application running in [Google Chrome Native Client](https://developers.google.com/native-client/).
Supports keyboard and mouse handling.
@section NaClApplication-usage Usage @section NaClApplication-usage Usage
You need to implement at least drawEvent() and viewportEvent() to be able to You need to implement at least drawEvent() and viewportEvent() to be able to
@ -71,41 +74,20 @@ class NaClApplication: public pp::Instance, public pp::Graphics3DClient {
~NaClApplication(); ~NaClApplication();
protected:
/** @{ @name Drawing functions */ /** @{ @name Drawing functions */
protected: /** @copydoc GlutApplication::viewportEvent() */
/**
* @brief Viewport event
*
* Called when viewport size changes. You should pass the new size to
* Framebuffer::setViewport() or SceneGraph::Camera::setViewport(),
* if using scene graph.
*/
virtual void viewportEvent(const Math::Vector2<GLsizei>& size) = 0; virtual void viewportEvent(const Math::Vector2<GLsizei>& size) = 0;
/** /** @copydoc GlutApplication::drawEvent() */
* @brief Draw event
*
* Here implement your drawing functions, such as calling
* SceneGraph::Camera::draw(). After drawing is finished, call
* swapBuffers(). If you want to draw immediately again, call also
* redraw().
*/
virtual void drawEvent() = 0; virtual void drawEvent() = 0;
/** /** @copydoc GlutApplication::swapBuffers() */
* @brief Swap buffers
*
* Paints currently rendered framebuffer on screen.
*/
void swapBuffers(); void swapBuffers();
/** /** @copydoc GlutApplication::redraw() */
* @brief Redraw immediately
*
* Marks the window for redrawing, resulting in call of drawEvent()
* in the next iteration.
*/
inline void redraw() { flags |= Flag::Redraw; } inline void redraw() { flags |= Flag::Redraw; }
/*@}*/ /*@}*/

15
src/Platform/Sdl2Application.h

@ -37,7 +37,8 @@ namespace Platform {
/** @nosubgrouping /** @nosubgrouping
@brief SDL2 application @brief SDL2 application
Supports keyboard and mouse handling. Application using [Simple DirectMedia Layer](www.libsdl.org/). Supports
keyboard and mouse handling.
@section Sdl2Application-usage Usage @section Sdl2Application-usage Usage
@ -223,7 +224,7 @@ class Sdl2Application {
/** /**
* @brief Mouse button * @brief Mouse button
* *
* @see mouseEvent() * @see mousePressEvent(), mouseReleaseEvent()
*/ */
enum class MouseButton: Uint8 { enum class MouseButton: Uint8 {
Left = SDL_BUTTON_LEFT, /**< Left button */ Left = SDL_BUTTON_LEFT, /**< Left button */
@ -233,16 +234,6 @@ class Sdl2Application {
WheelDown = 5 /**< Wheel down */ WheelDown = 5 /**< Wheel down */
}; };
/**
* @brief Mouse state
*
* @see mouseEvent()
*/
enum class MouseState: Uint8 {
Pressed = SDL_PRESSED, /**< Button pressed */
Released = SDL_RELEASED /**< Button released */
};
protected: protected:
/** /**
* @brief Mouse press event * @brief Mouse press event

2
src/Primitives/Capsule.h

@ -26,7 +26,7 @@ namespace Magnum { namespace Primitives {
/** /**
@brief 3D capsule primitive @brief 3D capsule primitive
Cylinder along Y axis with hemispheres instead of caps. Indexed triangle mesh %Cylinder along Y axis with hemispheres instead of caps. Indexed triangle mesh
with normals and optional 2D texture coordinates. with normals and optional 2D texture coordinates.
*/ */
class Capsule: public Trade::MeshData3D { class Capsule: public Trade::MeshData3D {

Loading…
Cancel
Save