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
22namespace superdex {
23
51
52inline real ContactParams::GetPenaltyThresholdDist(bool addPadding) const {
53 return penaltyThresholdDefault + (addPadding ? penaltyThresholdExtraPadding : 0_r);
54}
55
56} // namespace superdex
real maxAlignmentNormals
Maximum normal alignment threshold.
real collidingPenaltyLengthScale
[Experimental] Length scale [m] used to correct the penalty coefficient when the colliding body integ...
real coulombFrictionCoefficient
Coulomb friction coefficient (dimensionless).
real penaltyThresholdDefault
Default contact detection threshold [m].
real penaltyCoefficient
Stiffness of the contact penalty force [Pa/m].
real distanceErrorBound
[Experimental] Padding [m] added to the collider's bounding volume for collision culling.
real normalViscousDampingCoefficient
Normal viscous damping coefficient [s/m].
real penaltySmoothingHalfDistance
PolyReLU smoothing half-width [m].
real objScale
[Experimental] Object scale relative to default size (dimensionless).
real GetPenaltyThresholdDist(bool addPadding) const
Get the total contact detection threshold.
real viscousFrictionCoefficient
Viscous friction coefficient [s/m].
bool frictionWithColliderNormal
Use collider's normal (normalized SDF gradient) for friction direction if true, or the colliding's su...
real penaltyThresholdExtraPadding
Extra padding [m] added to the default contact detection threshold if the colliding actor has Collide...
real frictionFalloffVel
Velocity threshold for Coulomb friction smoothing [m/s].