Momentum
A library for solving nonlinear optimization problems related to human body kinematics
Loading...
Searching...
No Matches
marker_io.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7
8#pragma once
9
12
13#include <optional>
14#include <span>
15#include <string>
16#include <vector>
17
18namespace momentum {
19
29[[nodiscard]] std::vector<MarkerSequence> loadMarkers(
30 const std::string& filename,
32 std::span<const std::string> validMarkerNames = {});
33
44[[nodiscard]] std::optional<MarkerSequence> loadMarkersForMainSubject(
45 const std::string& filename,
47 std::span<const std::string> validMarkerNames = {});
48
56[[nodiscard]] int findMainSubjectIndex(std::span<const MarkerSequence> markerSequences);
57
70[[nodiscard]] std::vector<MarkerSequence> loadMarkers(
71 std::span<const std::byte> bytes,
72 const std::string& format,
74 std::span<const std::string> validMarkerNames = {});
75
85[[nodiscard]] std::optional<MarkerSequence> loadMarkersForMainSubject(
86 std::span<const std::byte> bytes,
87 const std::string& format,
89 std::span<const std::string> validMarkerNames = {});
90
91} // namespace momentum
UpVector
This enumeration is used to define the primary up vector directions for various coordinate systems an...
@ Y
Y-axis up vector.
std::vector< MarkerSequence > loadMarkers(const std::string &filename, UpVector up, std::span< const std::string > validMarkerNames)
Loads all actor sequences from a marker file (c3d, trc, glb) and converts the positions to the target...
Definition marker_io.cpp:32
int findMainSubjectIndex(std::span< const MarkerSequence > markerSequences)
Finds the "main subject" from a vector of MarkerSequences.
std::optional< MarkerSequence > loadMarkersForMainSubject(const std::string &filename, UpVector up, std::span< const std::string > validMarkerNames)
Loads the main subject's marker data from a marker file (c3d, trc, glb) and converts the positions to...
Definition marker_io.cpp:56