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
bool
frictionWithColliderNormal
,
30
real
maxAlignmentNormals
,
31
real
viscousFrictionCoefficient
,
32
real
coulombFrictionCoefficient
,
33
real
frictionFalloffVel
,
34
real
normalViscousDampingCoefficient
,
35
real
distanceErrorBound
,
36
real
objScale
,
37
real
collidingPenaltyLengthScale
)
38
:
penaltyCoefficient
(
penaltyCoefficient
),
39
penaltySmoothingHalfDistance
(
penaltySmoothingHalfDistance
),
40
penaltyThresholdDefault
(
penaltyThresholdDefault
),
41
penaltyThresholdExtraPadding
(
penaltyThresholdExtraPadding
),
42
frictionWithColliderNormal
(
frictionWithColliderNormal
),
43
maxAlignmentNormals
(
maxAlignmentNormals
),
44
viscousFrictionCoefficient
(
viscousFrictionCoefficient
),
45
coulombFrictionCoefficient
(
coulombFrictionCoefficient
),
46
frictionFalloffVel
(
frictionFalloffVel
),
47
normalViscousDampingCoefficient
(
normalViscousDampingCoefficient
),
48
distanceErrorBound
(
distanceErrorBound
),
49
objScale
(
objScale
),
50
collidingPenaltyLengthScale
(
collidingPenaltyLengthScale
) {}
51
52
inline
real
ContactParams::GetPenaltyThresholdDist
(
bool
addPadding)
const
{
53
return
penaltyThresholdDefault
+ (addPadding ?
penaltyThresholdExtraPadding
: 0_r);
54
}
55
56
}
// namespace superdex
contact_params.h
superdex
Definition
mochi_prefab.h:32
superdex::real
float real
Definition
mochi_config.h:115
superdex::ContactParams::maxAlignmentNormals
real maxAlignmentNormals
Maximum normal alignment threshold.
Definition
contact_params.h:158
superdex::ContactParams::collidingPenaltyLengthScale
real collidingPenaltyLengthScale
[Experimental] Length scale [m] used to correct the penalty coefficient when the colliding body integ...
Definition
contact_params.h:259
superdex::ContactParams::coulombFrictionCoefficient
real coulombFrictionCoefficient
Coulomb friction coefficient (dimensionless).
Definition
contact_params.h:179
superdex::ContactParams::penaltyThresholdDefault
real penaltyThresholdDefault
Default contact detection threshold [m].
Definition
contact_params.h:121
superdex::ContactParams::penaltyCoefficient
real penaltyCoefficient
Stiffness of the contact penalty force [Pa/m].
Definition
contact_params.h:94
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:234
superdex::ContactParams::normalViscousDampingCoefficient
real normalViscousDampingCoefficient
Normal viscous damping coefficient [s/m].
Definition
contact_params.h:220
superdex::ContactParams::penaltySmoothingHalfDistance
real penaltySmoothingHalfDistance
PolyReLU smoothing half-width [m].
Definition
contact_params.h:106
superdex::ContactParams::objScale
real objScale
[Experimental] Object scale relative to default size (dimensionless).
Definition
contact_params.h:243
superdex::ContactParams::GetPenaltyThresholdDist
real GetPenaltyThresholdDist(bool addPadding) const
Get the total contact detection threshold.
Definition
contact_params_inl.h:52
superdex::ContactParams::viscousFrictionCoefficient
real viscousFrictionCoefficient
Viscous friction coefficient [s/m].
Definition
contact_params.h:169
superdex::ContactParams::frictionWithColliderNormal
bool frictionWithColliderNormal
Use collider's normal (normalized SDF gradient) for friction direction if true, or the colliding's su...
Definition
contact_params.h:144
superdex::ContactParams::penaltyThresholdExtraPadding
real penaltyThresholdExtraPadding
Extra padding [m] added to the default contact detection threshold if the colliding actor has Collide...
Definition
contact_params.h:133
superdex::ContactParams::frictionFalloffVel
real frictionFalloffVel
Velocity threshold for Coulomb friction smoothing [m/s].
Definition
contact_params.h:196
mochi
mochi_core
include
mochi_core
contact
contact_params_inl.h
Generated by
1.16.1