RavEngine
Loading...
Searching...
No Matches
DySolverContactPF4.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 DY_SOLVER_CONTACT_PF_4_H
30#define DY_SOLVER_CONTACT_PF_4_H
31
32#include "foundation/PxSimpleTypes.h"
33#include "foundation/PxVec3.h"
34#include "PxvConfig.h"
35#include "foundation/PxVecMath.h"
36
37namespace physx
38{
39
40using namespace aos;
41
42namespace Sc
43{
44 class ShapeInteraction;
45}
46
47namespace Dy
48{
49
51{
52 PxU8 type; //Note: mType should be first as the solver expects a type in the first byte.
53 PxU8 numNormalConstr;
54 PxU16 frictionOffset;
55 PxU8 numNormalConstr0, numNormalConstr1, numNormalConstr2, numNormalConstr3;
56 PxU8 flags[4];
57 PxU32 pad; //16
58 Vec4V restitution; //32
59 Vec4V normalX; //48
60 Vec4V normalY; //64
61 Vec4V normalZ; //80
62 Vec4V invMassADom; //96
63 Vec4V invMassBDom; //112
64 Vec4V angD0; //128
65 Vec4V angD1; //144
66 Sc::ShapeInteraction* shapeInteraction[4]; //160 or 176
67};
68
69#if !PX_P64_FAMILY
71#else
73#endif
74
76{
77 Vec4V raXnX;
78 Vec4V raXnY;
79 Vec4V raXnZ;
80 Vec4V appliedForce;
81 Vec4V velMultiplier;
82 Vec4V targetVelocity;
83 Vec4V scaledBias;
84 Vec4V maxImpulse;
85};
86
88
90{
91 Vec4V rbXnX;
92 Vec4V rbXnY;
93 Vec4V rbXnZ;
94};
95
97
99{
100 PxU8 type; //Note: mType should be first as the solver expects a type in the first byte.
101 PxU8 numNormalConstr;
102 PxU8 numFrictionConstr;
103 PxU8 numNormalConstr0;
104 PxU8 numNormalConstr1;
105 PxU8 numNormalConstr2;
106 PxU8 numNormalConstr3;
107 PxU8 numFrictionConstr0;
108 PxU8 numFrictionConstr1;
109 PxU8 numFrictionConstr2;
110 PxU8 numFrictionConstr3;
111 PxU8 pad0;
112 PxU32 frictionPerContact;
113
114 Vec4V staticFriction;
115 Vec4V invMassADom;
116 Vec4V invMassBDom;
117 Vec4V angD0;
118 Vec4V angD1;
119};
120
122
124{
125 Vec4V normalX;
126 Vec4V normalY;
127 Vec4V normalZ;
128 Vec4V raXnX;
129 Vec4V raXnY;
130 Vec4V raXnZ;
131 Vec4V appliedForce;
132 Vec4V velMultiplier;
133 Vec4V targetVelocity;
134};
135
137
139{
140 Vec4V rbXnX;
141 Vec4V rbXnY;
142 Vec4V rbXnZ;
143};
144
146
147}
148
149}
150
151#endif
152
Definition ScShapeInteraction.h:54
#define PX_COMPILE_TIME_ASSERT(exp)
Definition PxPreprocessor.h:428
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition PxBoxController.h:39
Definition DySolverContactPF4.h:76
Definition DySolverContactPF4.h:90
Definition DySolverContactPF4.h:51
Definition DySolverContactPF4.h:124
Definition DySolverContactPF4.h:139
Definition DySolverContactPF4.h:99
Definition PxVecMathAoSScalar.h:65