Momentum
A library for solving nonlinear optimization problems related to human body kinematics
Loading...
Searching...
No Matches
mesh_state.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#include <momentum/math/mesh.h>
13#include <momentum/math/types.h>
14
15namespace momentum {
16
23template <typename T>
24struct MeshStateT {
27 std::unique_ptr<MeshT<T>> neutralMesh_;
30 std::unique_ptr<MeshT<T>> restMesh_;
32 std::unique_ptr<MeshT<T>> posedMesh_;
33
35 MeshStateT() noexcept = default;
37 const ModelParametersT<T>& parameters,
38 const SkeletonStateT<T>& state,
39 const Character& character) noexcept;
40 ~MeshStateT() noexcept;
41
42 MeshStateT(const MeshStateT& other);
43
44 MeshStateT& operator=(const MeshStateT& other);
45
46 MeshStateT(MeshStateT&& other) noexcept = default;
47
48 MeshStateT& operator=(MeshStateT&& other) noexcept = default;
49
61 void update(
62 const ModelParametersT<T>& parameters,
63 const SkeletonStateT<T>& state,
64 const Character& character);
65};
66
67} // namespace momentum
A character model with skeletal structure, mesh, and optional components.
Definition character.h:32
std::unique_ptr< MeshT< float > > neutralMesh_
Definition mesh_state.h:27
void update(const ModelParametersT< float > &parameters, const SkeletonStateT< float > &state, const Character &character)
std::unique_ptr< MeshT< float > > posedMesh_
Definition mesh_state.h:32
std::unique_ptr< MeshT< float > > restMesh_
Definition mesh_state.h:30
MeshStateT() noexcept=default
Creates an empty mesh state.
A vector of size numModelParams holding the values of all model parameters for a character.
Definition types.h:99
Represents the complete state of a skeleton.