Momentum
A library for solving nonlinear optimization problems related to human body kinematics
Loading...
Searching...
No Matches
locator_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
14#include <span>
15
16namespace momentum {
17
18enum class LocatorSpace {
19 Local = 0, // local offset in the joint space; useful for transferring locators from one model to
20 // another.
21 Global = 1, // global offset in the character's space; useful for authoring in Maya/Blender
22 // without parenting the locators.
23};
24
26 const filesystem::path& filename,
27 const Skeleton& skeleton,
28 const ParameterTransform& parameterTransform);
29
31 std::span<const std::byte> rawData,
32 const Skeleton& skeleton,
33 const ParameterTransform& parameterTransform);
34
35void saveLocators(
36 const filesystem::path& filename,
37 const LocatorList& locators,
38 const Skeleton& skeleton,
40
41} // namespace momentum
SkeletonT< float > Skeleton
Definition fwd.h:263
void saveLocators(const filesystem::path &filename, const LocatorList &locators, const Skeleton &skeleton, const LocatorSpace space)
ParameterTransformT< float > ParameterTransform
Definition fwd.h:244
LocatorList loadLocators(const filesystem::path &filename, const Skeleton &skeleton, const ParameterTransform &parameterTransform)
LocatorList loadLocatorsFromBuffer(std::span< const std::byte > rawData, const Skeleton &skeleton, const ParameterTransform &parameterTransform)
std::vector< Locator > LocatorList
A collection of locators attached to a skeleton.
Definition locator.h:79