Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

Raw File Download

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
content badge
swh:1:cnt:2e13f7d408c761e22d7f398eb500ab9e3b991fa1

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
(requires biblatex-software package)
Generating citation ...
/*
 * Copyright 2022-2024 Riccardo Monica
 * 
 * This software is distributed under the 3-clause BSD license.
 * You should have received a copy of the 3-clause BSD license
 * along with this software. If not, see
 * <https://opensource.org/license/bsd-3-clause>
 */

#ifndef STATISTICS_TRACKER_H
#define STATISTICS_TRACKER_H

#if _MSC_VER // this is defined when compiling with Visual Studio
#define EXPORT_API __declspec(dllexport) // Visual Studio needs annotating exported functions with this
#else
#define EXPORT_API
#endif

#include "tracking_commons.h"

#include <vector>
#include <stdint.h>
#include <iostream>

#include <Eigen/Dense>
#include <Eigen/StdVector>

namespace Tracking
{
  class StatisticsTracker
  {
    public:
    typedef std::vector<float> FloatVector;
    typedef std::vector<Eigen::Affine3f> Affine3fVector;

    const int READ_PREV_FRAMES = 30;

    StatisticsTracker()
    {
      m_last_vibration_met = 0.0f;
      m_last_vibration_rad = 0.0f;
    }

    EXPORT_API void Update(const Eigen::Affine3f & world_to_motive,
                           const Eigen::Affine3f & world_to_oculus);

    float GetVibrationRad() const {return m_last_vibration_rad; }
    float GetVibrationMet() const {return m_last_vibration_met; }

    EIGEN_MAKE_ALIGNED_OPERATOR_NEW;

    private:
    Affine3fVector m_last_world_to_oculus;

    float m_last_vibration_rad;
    float m_last_vibration_met;

    Eigen::Affine3f m_prev_world_to_motive;
    Eigen::Affine3f m_prev_world_to_oculus;
  };
}

#endif // STATISTICS_TRACKER_H

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API