Newton Dynamics  4.00
ndDynamicsUpdateAvx2.h
1 /* Copyright (c) <2003-2022> <Julio Jerez, Newton Game Dynamics>
2 *
3 * This software is provided 'as-is', without any express or implied
4 * warranty. In no event will the authors be held liable for any damages
5 * arising from the use of this software.
6 *
7 * Permission is granted to anyone to use this software for any purpose,
8 * including commercial applications, and to alter it and redistribute it
9 * freely, subject to the following restrictions:
10 *
11 * 1. The origin of this software must not be misrepresented; you must not
12 * claim that you wrote the original software. If you use this software
13 * in a product, an acknowledgment in the product documentation would be
14 * appreciated but is not required.
15 *
16 * 2. Altered source versions must be plainly marked as such, and must not be
17 * misrepresented as being the original software.
18 *
19 * 3. This notice may not be removed or altered from any source distribution.
20 */
21 
22 #ifndef __D_WORLD_DYNAMICS_UPDATE_AVX2_H__
23 #define __D_WORLD_DYNAMICS_UPDATE_AVX2_H__
24 
25 #include <ndNewton.h>
26 
27 class ndAvxMatrixArray;
28 
29 D_MSV_NEWTON_ALIGN_32
31 {
32  public:
33  ndDynamicsUpdateAvx2(ndWorld* const world);
34  virtual ~ndDynamicsUpdateAvx2();
35 
36  virtual const char* GetStringId() const;
37 
38  protected:
39  virtual void Update();
40 
41  private:
42  class ndGroupType
43  {
44  public:
45  ndInt8 m_rows____;
46  ndInt8 m_isUniformGroup;
47  };
48 
49  void SortJoints();
50  void SortIslands();
51  void BuildIsland();
52  void InitWeights();
53  void InitBodyArray();
54  void InitSkeletons();
55  void CalculateForces();
56  void IntegrateBodies();
57  void UpdateSkeletons();
58  void InitJacobianMatrix();
59  void UpdateForceFeedback();
60  void CalculateJointsForce();
61  void IntegrateBodiesVelocity();
62  void CalculateJointsAcceleration();
63  void IntegrateUnconstrainedBodies();
64 
65  void DetermineSleepStates();
66  void GetJacobianDerivatives(ndConstraint* const joint);
67 
68  ndArray<ndInt8> m_groupType;
69  ndArray<ndJacobian> m_jointMask;
70  ndArray<ndInt32> m_avxJointRows;
71  ndAvxMatrixArray* m_avxMassMatrixArray;
72 
73 } D_GCC_NEWTON_ALIGN_32;
74 
75 #endif
76 
ndArray< ndInt8 >
ndAvxMatrixArray
Definition: ndDynamicsUpdateAvx2.cpp:508
ndDynamicsUpdateAvx2
Definition: ndDynamicsUpdateAvx2.h:31
ndConstraint
Definition: ndConstraint.h:229
ndDynamicsUpdate
Definition: ndDynamicsUpdate.h:45
ndWorld
Definition: ndWorld.h:47