RavEngine
Loading...
Searching...
No Matches
ScArticulationTendonSim.h
1// Redistribution and use in source and binary forms, with or without
2// modification, are permitted provided that the following conditions
3// are met:
4// * Redistributions of source code must retain the above copyright
5// notice, this list of conditions and the following disclaimer.
6// * Redistributions in binary form must reproduce the above copyright
7// notice, this list of conditions and the following disclaimer in the
8// documentation and/or other materials provided with the distribution.
9// * Neither the name of NVIDIA CORPORATION nor the names of its
10// contributors may be used to endorse or promote products derived
11// from this software without specific prior written permission.
12//
13// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
14// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
17// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24//
25// Copyright (c) 2008-2022 NVIDIA Corporation. All rights reserved.
26// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
27// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
28
29#ifndef SC_ARTICULATION_TENDON_SIM_H
30#define SC_ARTICULATION_TENDON_SIM_H
31
32#include "foundation/PxUserAllocated.h"
33#include "DyArticulationTendon.h"
34
35namespace physx
36{
37namespace Sc
38{
39
40 class ArticulationFixedTendonCore;
41 class ArticulationTendonJointCore;
42 class ArticulationSpatialTendonCore;
43 class ArticulationAttachmentCore;
44 class Scene;
45 class ArticulationJointCore;
46 class ArticulationSim;
47
49 {
51 public:
53
55
56 void setStiffness(const PxReal stiffness);
57 PxReal getStiffness() const;
58
59 void setDamping(const PxReal damping);
60 PxReal getDamping() const;
61
62 void setLimitStiffness(const PxReal stiffness);
63 PxReal getLimitStiffness() const;
64
65 void setOffset(const PxReal offset);
66 PxReal getOffset() const;
67
68
69 void setAttachmentCoefficient(ArticulationAttachmentCore& core, const PxReal coefficient);
70 void setAttachmentRelativeOffset(ArticulationAttachmentCore& core, const PxVec3& offset);
71 void setAttachmentLimits(ArticulationAttachmentCore& core, const PxReal lowLimit, const PxReal highLimit);
72 void setAttachmentRestLength(ArticulationAttachmentCore& core, const PxReal restLength);
73 void addAttachment(ArticulationAttachmentCore& core);
74 void removeAttachment(ArticulationAttachmentCore& core);
75
78
79 ArticulationSim* mArtiSim;
80 Scene& mScene;
81
82 };
83
85 {
87 public:
89
91
92 void setStiffness(const PxReal stiffness);
93 PxReal getStiffness() const;
94
95 void setDamping(const PxReal damping);
96 PxReal getDamping() const;
97
98 void setLimitStiffness(const PxReal stiffness);
99 PxReal getLimitStiffness() const;
100
101 void setOffset(const PxReal offset);
102 PxReal getOffset() const;
103
104 void setSpringRestLength(const PxReal restLength);
105 PxReal getSpringRestLength() const;
106
107 void setLimitRange(const PxReal lowLimit, const PxReal highLimit);
108 void getLimitRange(PxReal& lowLimit, PxReal& highLimit) const;
109
110 void addTendonJoint(ArticulationTendonJointCore& tendonJointCore);
111 void removeTendonJoint(ArticulationTendonJointCore& core);
112
113 void setTendonJointCoefficient(ArticulationTendonJointCore& core, const PxArticulationAxis::Enum axis, const float coefficient, const float recipCoefficient);
114
116 ArticulationFixedTendonCore& mTendonCore;
117
118 ArticulationSim* mArtiSim;
119 Scene& mScene;
120 };
121}//namespace Sc
122}//namespace physx
123#endif
Definition DyArticulationTendon.h:139
Definition DyArticulationTendon.h:82
Definition PxUserAllocated.h:43
3 Element vector class.
Definition PxVec3.h:50
Definition ScArticulationAttachmentCore.h:40
Definition ScArticulationTendonCore.h:101
Definition ScArticulationTendonSim.h:85
Definition ScArticulationSim.h:68
Definition ScArticulationTendonCore.h:63
Definition ScArticulationTendonSim.h:49
Definition ScArticulationTendonJointCore.h:43
Definition ScScene.h:240
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition PxBoxController.h:39
Enum
Definition PxSolverDefs.h:252