Skip to content

Commit

Permalink
mouseinteraction: added into the documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
mosra committed Aug 26, 2018
1 parent da1ce1a commit 49088b9
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CREDITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,7 @@ Contributors to Magnum examples
- Michal Mikula -- Box2D example
- Nathan Ollerenshaw ([@matjam](https://github.com/matjam)) --- Ubuntu
package updates, a PPA repository for stable versions
- scturtle ([@scturtle](https://github.com/scturtle)) -- Mouse Interaction
example

Big thanks to everyone involved!
2 changes: 2 additions & 0 deletions doc/building-examples.dox
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,8 @@ integration libraries, see @ref building-plugins, @ref building-integration and
- `WITH_LEAPMOTION_EXAMPLE` --- Build the @ref examples-leapmotion example.
- `WITH_MOTIONBLUR_EXAMPLE` --- Build the @ref examples-motionblur example.
Not available on OpenGL ES.
- `WITH_MOUSEINTERACTION_EXAMPLE` --- Build the @ref examples-mouseinteraction
example.
- `WITH_OVR_EXAMPLE` --- Build the @ref examples-ovr example. Requires
the @ref OvrIntegration library.
- `WITH_PICKING_EXAMPLE` --- Build the @ref examples-picking example.
Expand Down
6 changes: 6 additions & 0 deletions doc/changelog-examples.dox
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ namespace Magnum {

@section changelog-examples-latest Changes since 2018.04

@subsection changelog-examples-latest-new New features

- New @ref examples-box2d example showing usage with Box2D
- New @ref examples-mouseinteraction example showing advanced mouse
interaction (see [mosra/magnum-examples#46](https://github.com/mosra/magnum-examples/pull/46))

@subsection changelog-examples-latest-buildsystem Build system

- There's now a PPA for Ubuntu packages. See @ref building-examples-packages-deb
Expand Down
1 change: 1 addition & 0 deletions doc/example-index.dox
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ The following consist of documented source code only:
- @subpage examples-cubemap --- @copybrief examples-cubemap
- @subpage examples-leapmotion --- @copybrief examples-leapmotion
- @subpage examples-motionblur --- @copybrief examples-motionblur
- @subpage examples-mouseinteraction --- @copybrief examples-mouseinteraction
- @subpage examples-ovr --- @copybrief examples-ovr
- @subpage examples-picking @m_class{m-label m-default m-flat} **live web demo**
--- @copybrief examples-picking
Expand Down
62 changes: 62 additions & 0 deletions doc/mouseinteraction.dox
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/*
This file is part of Magnum.

Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018
Vladimír Vondruš <mosra@centrum.cz>
Copyright © 2018 scturtle <scturtle@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
*/

namespace Magnum {
/** @page examples-mouseinteraction Mouse Interaction
@brief Advanced depth-aware mouse interaction for navigating a scene

@m_footernavigation

Provides rotation, panning and zooming control that is relative to depth at
mouse cursor for more convenient interaction with complex scenes.

@image html mouseinteraction.png

@section examples-mouseinteraction-controls Key controls

Similar to [Blender](https://www.blender.org/).

- @m_class{m-label m-default} **mouse drag** rotates the scene around the cursor
- @m_class{m-label m-warning} **shift** @m_class{m-label m-default} **mouse drag**
pans the scene at depth of the cursor

@section examples-mouseinteraction-credits Credits

This example was originally contributed by [\@scturtle](https://github.com/scturtle).

@section examples-mouseinteraction-source Source

Full source code is linked below and also available in the
[magnum-examples GitHub repository](https://github.com/mosra/magnum-examples/tree/master/src/mouseinteraction).

- @ref mouseinteraction/CMakeLists.txt "CMakeLists.txt"
- @ref mouseinteraction/MouseInteractionExample.cpp "MouseInteractionExample.cpp"

@example mouseinteraction/CMakeLists.txt @m_examplenavigation{examples-mouseinteraction,mouseinteraction/} @m_footernavigation
@example mouseinteraction/MouseInteractionExample.cpp @m_examplenavigation{examples-mouseinteraction,mouseinteraction/} @m_footernavigation

*/
}
Binary file added doc/mouseinteraction.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 49088b9

Please sign in to comment.