Newton Dynamics  4.00
ndJointPlane.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_PLANE_H__
13 #define __ND_JOINT_PLANE_H__
14 
15 #include "ndNewtonStdafx.h"
16 #include "ndJointBilateralConstraint.h"
17 
19 {
20  public:
21  D_CLASS_REFLECTION(ndJointPlane);
22  D_NEWTON_API ndJointPlane(const ndLoadSaveBase::ndLoadDescriptor& desc);
23  D_NEWTON_API ndJointPlane (const ndVector& pivot, const ndVector& normal, ndBodyKinematic* const child, ndBodyKinematic* const parent);
24  D_NEWTON_API virtual ~ndJointPlane();
25 
26  void EnableControlRotation(bool state);
27  bool GetEnableControlRotation() const;
28 
29  protected:
30  D_NEWTON_API void JacobianDerivative(ndConstraintDescritor& desc);
31  D_NEWTON_API void Save(const ndLoadSaveBase::ndSaveDescriptor& desc) const;
32 
33  bool m_enableControlRotation;
34 };
35 
36 inline void ndJointPlane::EnableControlRotation(bool state)
37 {
38  m_enableControlRotation = state;
39 }
40 
41 inline bool ndJointPlane::GetEnableControlRotation() const
42 {
43  return m_enableControlRotation;
44 }
45 
46 #endif
47 
ndConstraintDescritor
Definition: ndConstraint.h:179
ndJointBilateralConstraint
Definition: ndJointBilateralConstraint.h:53
ndBodyKinematic
Definition: ndBodyKinematic.h:40
ndJointPlane
Definition: ndJointPlane.h:19
ndLoadSaveBase::ndLoadDescriptor
Definition: ndSaveLoadSytem.h:59
ndLoadSaveBase::ndSaveDescriptor
Definition: ndSaveLoadSytem.h:93
ndVector
Definition: ndVectorArmNeon.h:41