SuperDex Physics C++ API
Loading...
Searching...
No Matches
contact_params_inl.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.
20
#include "
contact_params.h
"
// Reverse include for intellisense
21
22
namespace
superdex
{
23
24
inline
ContactParams::ContactParams
(
25
real
penaltyCoefficient
,
26
real
penaltySmoothingHalfDistance
,
27
real
penaltyThresholdDefault
,
28
real
penaltyThresholdExtraPadding
,
29
real
collidingPenaltyThresholdPadding
,
30
bool
frictionWithColliderNormal
,
31
real
maxAlignmentNormals
,
32
real
alignmentSmoothingFraction
,
33
real
viscousFrictionCoefficient
,
34
real
coulombFrictionCoefficient
,
35
bool
preferElastoPlasticFriction
,
36
real
frictionFalloffVel
,
37
real
preslidingDisplacement
,
38
real
normalViscousDampingCoefficient
,
39
real
distanceErrorBound
,
40
real
objScale
,
41
real
collidingPenaltyLengthScale
)
42
:
penaltyCoefficient
(
penaltyCoefficient
),
43
penaltySmoothingHalfDistance
(
penaltySmoothingHalfDistance
),
44
penaltyThresholdDefault
(
penaltyThresholdDefault
),
45
penaltyThresholdExtraPadding
(
penaltyThresholdExtraPadding
),
46
collidingPenaltyThresholdPadding
(
collidingPenaltyThresholdPadding
),
47
frictionWithColliderNormal
(
frictionWithColliderNormal
),
48
maxAlignmentNormals
(
maxAlignmentNormals
),
49
alignmentSmoothingFraction
(
alignmentSmoothingFraction
),
50
viscousFrictionCoefficient
(
viscousFrictionCoefficient
),
51
coulombFrictionCoefficient
(
coulombFrictionCoefficient
),
52
preferElastoPlasticFriction
(
preferElastoPlasticFriction
),
53
frictionFalloffVel
(
frictionFalloffVel
),
54
preslidingDisplacement
(
preslidingDisplacement
),
55
normalViscousDampingCoefficient
(
normalViscousDampingCoefficient
),
56
distanceErrorBound
(
distanceErrorBound
),
57
objScale
(
objScale
),
58
collidingPenaltyLengthScale
(
collidingPenaltyLengthScale
) {}
59
60
inline
real
ContactParams::GetPenaltyThresholdDist
(
bool
addPadding)
const
{
61
return
penaltyThresholdDefault
+ (addPadding ?
penaltyThresholdExtraPadding
: 0_r);
62
}
63
64
}
// namespace superdex
contact_params.h
superdex
Definition
mochi_prefab.h:33
superdex::real
float real
Definition
mochi_config.h:115
superdex::ContactParams::alignmentSmoothingFraction
real alignmentSmoothingFraction
[Experimental] Width of the band of normal alignments, centered at maxAlignmentNormals,...
Definition
contact_params.h:229
superdex::ContactParams::maxAlignmentNormals
real maxAlignmentNormals
[Experimental] Maximum normal alignment threshold.
Definition
contact_params.h:203
superdex::ContactParams::collidingPenaltyLengthScale
real collidingPenaltyLengthScale
[Experimental] Length scale [m] used to correct the penalty coefficient when the colliding body integ...
Definition
contact_params.h:387
superdex::ContactParams::preslidingDisplacement
real preslidingDisplacement
Presliding displacement of elasto-plastic Coulomb friction [m].
Definition
contact_params.h:319
superdex::ContactParams::coulombFrictionCoefficient
real coulombFrictionCoefficient
Coulomb friction coefficient (dimensionless).
Definition
contact_params.h:252
superdex::ContactParams::penaltyThresholdDefault
real penaltyThresholdDefault
Default contact detection threshold [m].
Definition
contact_params.h:136
superdex::ContactParams::penaltyCoefficient
real penaltyCoefficient
Stiffness of the contact penalty force [Pa/m].
Definition
contact_params.h:107
superdex::ContactParams::ContactParams
ContactParams()=default
superdex::ContactParams::distanceErrorBound
real distanceErrorBound
[Experimental] Padding [m] added to the collider's bounding volume for collision culling.
Definition
contact_params.h:359
superdex::ContactParams::normalViscousDampingCoefficient
real normalViscousDampingCoefficient
Normal viscous damping coefficient [s/m].
Definition
contact_params.h:344
superdex::ContactParams::preferElastoPlasticFriction
bool preferElastoPlasticFriction
[Experimental] Prefer elasto-plastic Coulomb friction to velocity-regularized Coulomb friction.
Definition
contact_params.h:278
superdex::ContactParams::penaltySmoothingHalfDistance
real penaltySmoothingHalfDistance
PolyReLU smoothing half-width [m].
Definition
contact_params.h:119
superdex::ContactParams::objScale
real objScale
[Experimental] Object scale relative to default size (dimensionless).
Definition
contact_params.h:370
superdex::ContactParams::GetPenaltyThresholdDist
real GetPenaltyThresholdDist(bool addPadding) const
Get the total contact detection threshold.
Definition
contact_params_inl.h:60
superdex::ContactParams::viscousFrictionCoefficient
real viscousFrictionCoefficient
Viscous friction coefficient [s/m].
Definition
contact_params.h:241
superdex::ContactParams::frictionWithColliderNormal
bool frictionWithColliderNormal
[Experimental] Use collider's normal (normalized SDF gradient) for friction direction if true,...
Definition
contact_params.h:182
superdex::ContactParams::penaltyThresholdExtraPadding
real penaltyThresholdExtraPadding
[Experimental] Extra padding [m] added to the default contact detection threshold if the colliding ac...
Definition
contact_params.h:151
superdex::ContactParams::collidingPenaltyThresholdPadding
real collidingPenaltyThresholdPadding
[Experimental] Padding [m] added to the collider's contact detection threshold when this actor is the...
Definition
contact_params.h:168
superdex::ContactParams::frictionFalloffVel
real frictionFalloffVel
[Experimental] Velocity threshold for Coulomb friction smoothing [m/s].
Definition
contact_params.h:297
mochi
mochi_core
include
mochi_core
contact
contact_params_inl.h
Generated by
1.16.1