Newton Dynamics  4.00
ndJointFix6dof.h
1 /* Copyright (c) <2003-2022> <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
10 */
11 
12 #ifndef __ND_JOINT_FIX_6DOF_H_
13 #define __ND_JOINT_FIX_6DOF_H_
14 
15 #include "ndNewtonStdafx.h"
16 #include "ndJointBilateralConstraint.h"
17 
19 {
20  public:
21  D_CLASS_REFLECTION(ndJointFix6dof);
22  D_NEWTON_API ndJointFix6dof(const ndLoadSaveBase::ndLoadDescriptor& desc);
23  D_NEWTON_API ndJointFix6dof(const ndMatrix& frameInGlobalSpace, ndBodyKinematic* const body0, ndBodyKinematic* const body1);
24  D_NEWTON_API ndJointFix6dof(ndBodyKinematic* const body0, ndBodyKinematic* const body1, const ndMatrix& globalMatrixBody0, const ndMatrix& globalMatrixBody1 );
25  D_NEWTON_API virtual ~ndJointFix6dof();
26 
27  D_NEWTON_API void SetAsSoftJoint(bool mode);
28  D_NEWTON_API void SetRegularizer(ndFloat32 regularizer);
29 
30  private:
31  void JacobianDerivative(ndConstraintDescritor& desc);
32  void Save(const ndLoadSaveBase::ndSaveDescriptor& desc) const;
33 
34  void SubmitAngularAxis(ndConstraintDescritor& desc, const ndMatrix& matrix0, const ndMatrix& matrix1);
35  void SubmitAngularAxisCartisianApproximation(ndConstraintDescritor& desc, const ndMatrix& matrix0, const ndMatrix& matrix1);
36 
37  ndFloat32 m_softness;
38  ndFloat32 m_maxForce;
39  ndFloat32 m_maxTorque;
40 };
41 #endif
42 
ndConstraintDescritor
Definition: ndConstraint.h:179
ndJointBilateralConstraint
Definition: ndJointBilateralConstraint.h:53
ndBodyKinematic
Definition: ndBodyKinematic.h:40
ndJointFix6dof
Definition: ndJointFix6dof.h:19
ndMatrix
Definition: ndMatrix.h:42
ndLoadSaveBase::ndLoadDescriptor
Definition: ndSaveLoadSytem.h:59
ndLoadSaveBase::ndSaveDescriptor
Definition: ndSaveLoadSytem.h:93