SuperDex Physics C++ API
Loading...
Searching...
No Matches
arap_params.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#pragma once
18
19// PLEASE DO NOT ADD OTHER INCLUDES HERE. This header is included in the mochi_physics public API.
22
23namespace superdex {
24
25/**
26 * @brief Parameters for the As-Rigid-As-Possible (ARAP) material model.
27 *
28 * @details ARAP's primary goal is to deform the object such that each local region undergoes a
29 * transformation that is as close to a rigid rotation as possible.
30 *
31 * Because it preserves local shape details well and produces intuitive, natural-looking results,
32 * ARAP is widely used in computer graphics for applications like interactive mesh editing and
33 * character posing.
34 *
35 * @see [Dynamic Deformables (Kim and Eberle,
36 * 2022)](https://www.tkim.graphics/DYNAMIC_DEFORMABLES/DynamicDeformables.pdf)
37 * @see SoftMaterialType::Arap
38 */
40 /**
41 * @brief ARAP stiffness parameter (μ) [Pa].
42 *
43 * @note Must be greater than zero.
44 */
46
47 /**
48 * @brief Strategy for ensuring positive semi-definite Hessian matrices.
49 *
50 * @see MaterialPsdStrategy
51 */
53
54#if MOCHI_LANGUAGE_CPP20
55 bool operator==(ArapMaterialParams const&) const = default;
56#endif
57
62};
63
64namespace materials {
65// ARAP has an isotropic reference tangent by construction.
66template <>
68} // namespace materials
69
70} // namespace superdex
constexpr bool kIsotropicReferenceStiffness
Opt-in trait: a material params type declares this true iff its reference (F=I) tangent is isotropic ...
MaterialPsdStrategy
Strategy for ensuring positive semi-definite (PSD) Hessian matrices in material models.
@ Projection
Eigenvalue clamping: U * Max(Λ, ε) * U^T.
constexpr real kDefaultArapStiffness
Default ARAP stiffness (μ) [Pa].
#define MOCHI_STRUCT_END()
Definition reflection.h:279
#define MOCHI_FIELD(name)
Definition reflection.h:293
#define MOCHI_STRUCT_BEGIN(name)
Definition reflection.h:278
#define MOCHI_ATTRIBUTE(...)
Definition reflection.h:298
Parameters for the As-Rigid-As-Possible (ARAP) material model.
Definition arap_params.h:39
bool operator==(ArapMaterialParams const &) const =default
MaterialPsdStrategy psdStrategy
Strategy for ensuring positive semi-definite Hessian matrices.
Definition arap_params.h:52
real stiffness
ARAP stiffness parameter (μ) [Pa].
Definition arap_params.h:45