Doxygen style overhaul (#2954)

Reformatting the existing Doxygen comments to be unified
This commit is contained in:
Alexander Bock
2023-11-20 23:39:17 +01:00
committed by GitHub
parent 4ee078502b
commit 7db7c40841
163 changed files with 2266 additions and 2035 deletions

View File

@@ -29,20 +29,21 @@
#include <modules/touch/ext/levmarq.h>
#include <vector>
namespace openspace {
class Camera;
class SceneGraphNode;
/**
* The DirectInputSolver is used to minimize the L2 error of touch input
* to 3D camera position. It uses the levmarq algorithm in order to do this.
* */
* The DirectInputSolver is used to minimize the L2 error of touch input to 3D camera
* position. It uses the levmarq algorithm in order to do this.
*/
class DirectInputSolver {
public:
// Stores the selected node, the cursor ID as well as the surface coordinates the
// cursor touched
/**
* Stores the selected node, the cursor ID as well as the surface coordinates the
* cursor touched
*/
struct SelectedBody {
size_t id = 0;
SceneGraphNode* node = nullptr;
@@ -52,10 +53,10 @@ public:
DirectInputSolver();
/**
* Returns true if the error could be minimized within certain bounds.
* If the error is found to be outside the bounds after a certain amount of
* iterations, this function fails.
* */
* Returns true if the error could be minimized within certain bounds. If the error is
* found to be outside the bounds after a certain amount of iterations, this function
* fails.
*/
bool solve(const std::vector<TouchInputHolder>& list,
const std::vector<SelectedBody>& selectedBodies,
std::vector<double>* calculatedValues, const Camera& camera);

View File

@@ -83,17 +83,17 @@ public:
};
/**
* Main function call
* 1 Checks if doubleTap occured
* 2 If the node in focus is large enough and all contact points have selected it,
* calls directControl() function for direct-manipulation
* 3 Updates std::vector<SelectedBody> _selectedContactPoints (only if LMA
* successfully converged, avoids interaction to snap on LMA fails)
* 4 If directControl() wasn't called this frame, interpret the incoming
* list and decide what type of interaction this frame should do
* 5 Compute the new total velocities after interaction
* 6 Evaluate if directControl should be called next frame- true if all contact points
* select the same node and said node is larger than _nodeRadiusThreshold
* Main function call:
* 1. Checks if doubleTap occured
* 2. If the node in focus is large enough and all contact points have selected it,
* calls directControl() function for direct-manipulation
* 3. Updates std::vector<SelectedBody> _selectedContactPoints (only if LMA
* successfully converged, avoids interaction to snap on LMA fails)
* 4. If directControl() wasn't called this frame, interpret the incoming
* list and decide what type of interaction this frame should do
* 5. Compute the new total velocities after interaction
* 6. Evaluate if directControl should be called next frame- true if all contact
* points select the same node and said node is larger than _nodeRadiusThreshold
*/
void updateStateFromInput(const std::vector<TouchInputHolder>& list,
@@ -101,13 +101,19 @@ public:
bool hasNonZeroVelocities() const;
// Calculates the new camera state with velocities and time since last frame
/**
* Calculates the new camera state with velocities and time since last frame.
*/
void step(double dt, bool directTouch = false);
// Called each frame we have no new input, used to reset data
/**
* Called each frame we have no new input, used to reset data.
*/
void resetAfterInput();
// Sets _tap to true, called if tap occured current frame (called from touchmodule)
/**
* Sets _tap to true, called if tap occured current frame (called from touchmodule).
*/
void tap();
void setCamera(Camera* camera);
@@ -115,33 +121,39 @@ public:
private:
/**
* Function that calculates the new camera state such that it minimizes the L2 error
* in screenspace
* between contact points and surface coordinates projected to clip space using LMA
* in screenspace between contact points and surface coordinates projected to clip
* space using LMA.
*/
void directControl(const std::vector<TouchInputHolder>& list);
/**
* Traces each contact point into the scene as a ray and find the intersection
* points on the surface of the current anchor node, if any. Saves the input id
* the node and surface coordinates the cursor hit
* Traces each contact point into the scene as a ray and find the intersection points
* on the surface of the current anchor node, if any. Saves the input id the node and
* surface coordinates the cursor hit.
*/
void updateNodeSurfacePoints(const std::vector<TouchInputHolder>& list);
/**
* Returns an enum for what interaction to be used, depending on what input was
* received
* received.
*/
InteractionType interpretInteraction(const std::vector<TouchInputHolder>& list,
const std::vector<TouchInput>& lastProcessed);
// Compute new velocity according to the interpreted action
/**
* Compute new velocity according to the interpreted action.
*/
void computeVelocities(const std::vector<TouchInputHolder>& list,
const std::vector<TouchInput>& lastProcessed);
// Compute velocity based on double-tap for zooming
/**
* Compute velocity based on double-tap for zooming.
*/
double computeTapZoomDistance(double zoomGain);
// Compute coefficient for velocity decay to be applied in decceleration
/**
* Compute coefficient for velocity decay to be applied in decceleration.
*/
double computeConstTimeDecayCoefficient(double velocity);
/**
@@ -150,10 +162,14 @@ private:
*/
void decelerate(double dt);
// Resets all properties that can be changed in the GUI to default
/**
* Resets all properties that can be changed in the GUI to default.
*/
void resetPropertiesToDefault();
// Set all velocities to zero
/**
* Set all velocities to zero.
*/
void resetVelocities();
Camera* _camera = nullptr;

View File

@@ -58,8 +58,8 @@ public:
~TuioEar();
/**
* Callback functions, listens to the TUIO server
*/
* Callback functions, listens to the TUIO server.
*/
void addTuioObject(TUIO::TuioObject *tobj);
void updateTuioObject(TUIO::TuioObject *tobj);
void removeTuioObject(TUIO::TuioObject *tobj);
@@ -75,8 +75,8 @@ public:
void refresh(TUIO::TuioTime frameTime);
/**
* Lock-swap the containers of this listener
*/
* Lock-swap the containers of this listener.
*/
std::vector<TouchInput> takeInput();
std::vector<TouchInput> takeRemovals();