RavEngine
Loading...
Searching...
No Matches
DySolverConstraint1D4.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_CONSTRAINT_1D4_H
30
#define DY_SOLVER_CONSTRAINT_1D4_H
31
32
#include "foundation/PxVec3.h"
33
#include "PxvConfig.h"
34
#include "DyArticulationUtils.h"
35
#include "DySolverConstraint1D.h"
36
37
namespace
physx
38
{
39
40
namespace
Dy
41
{
42
43
struct
SolverConstraint1DHeader4
44
{
45
PxU8 type;
// enum SolverConstraintType - must be first byte
46
PxU8 pad0[3];
47
//These counts are the max of the 4 sets of data.
48
//When certain pairs have fewer constraints than others, they are padded with 0s so that no work is performed but
49
//calculations are still shared (afterall, they're computationally free because we're doing 4 things at a time in SIMD)
50
PxU32 count;
51
PxU8 count0, count1, count2, count3;
52
PxU8 break0, break1, break2, break3;
53
54
Vec4V
linBreakImpulse;
55
Vec4V
angBreakImpulse;
56
Vec4V
invMass0D0;
57
Vec4V
invMass1D1;
58
Vec4V
angD0;
59
Vec4V
angD1;
60
61
Vec4V
body0WorkOffsetX;
62
Vec4V
body0WorkOffsetY;
63
Vec4V
body0WorkOffsetZ;
64
};
65
66
struct
SolverConstraint1DBase4
67
{
68
public
:
69
Vec4V
lin0X;
70
Vec4V
lin0Y;
71
Vec4V
lin0Z;
72
Vec4V
ang0X;
73
Vec4V
ang0Y;
74
Vec4V
ang0Z;
75
Vec4V
ang0WritebackX;
76
Vec4V
ang0WritebackY;
77
Vec4V
ang0WritebackZ;
78
Vec4V
constant;
79
Vec4V
unbiasedConstant;
80
Vec4V
velMultiplier;
81
Vec4V
impulseMultiplier;
82
Vec4V
minImpulse;
83
Vec4V
maxImpulse;
84
Vec4V
appliedForce;
85
PxU32 flags[4];
86
};
87
88
PX_COMPILE_TIME_ASSERT
(
sizeof
(
SolverConstraint1DBase4
) == 272);
89
90
struct
SolverConstraint1DDynamic4
:
public
SolverConstraint1DBase4
91
{
92
Vec4V
lin1X;
93
Vec4V
lin1Y;
94
Vec4V
lin1Z;
95
Vec4V
ang1X;
96
Vec4V
ang1Y;
97
Vec4V
ang1Z;
98
};
99
PX_COMPILE_TIME_ASSERT
(
sizeof
(
SolverConstraint1DDynamic4
) == 368);
100
101
}
102
103
}
104
105
#endif
PX_COMPILE_TIME_ASSERT
#define PX_COMPILE_TIME_ASSERT(exp)
Definition
PxPreprocessor.h:428
physx
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition
PxBoxController.h:39
physx::Dy::SolverConstraint1DBase4
Definition
DySolverConstraint1D4.h:67
physx::Dy::SolverConstraint1DDynamic4
Definition
DySolverConstraint1D4.h:91
physx::Dy::SolverConstraint1DHeader4
Definition
DySolverConstraint1D4.h:44
physx::aos::Vec4V
Definition
PxVecMathAoSScalar.h:65
RavEngine
deps
physx
physx
source
lowleveldynamics
src
DySolverConstraint1D4.h
Generated by
1.9.8