ScummVM API documentation
dgHingeConstraint.h
1 /* Copyright (c) <2003-2011> <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 #if !defined(AFX_DGHINGECONSTRAINT_H__3FF7D7AA_90CC_4BA5_B2A4_D3BA51AD2FFD__INCLUDED_)
23 #define AFX_DGHINGECONSTRAINT_H__3FF7D7AA_90CC_4BA5_B2A4_D3BA51AD2FFD__INCLUDED_
24 #include "dgBilateralConstraint.h"
25 
26 //template<class T> class dgPool;
27 
28 class dgHingeConstraint;
29 
30 typedef dgUnsigned32(dgApi *dgHingeJointAcceleration)(const NewtonJoint *const hinge, NewtonHingeSliderUpdateDesc *const desc);
31 
33 public:
34  dgFloat32 GetJointAngle() const;
35  dgFloat32 GetJointOmega() const;
36  dgVector GetJointForce() const;
37  dgFloat32 CalculateStopAlpha(dgFloat32 angle, const dgJointCallBackParam *param) const;
38  void SetJointParameterCallBack(dgHingeJointAcceleration callback);
39 
40 
41 
42 private:
43  virtual dgUnsigned32 JacobianDerivative(dgContraintDescritor &params);
44 // virtual void Remove(dgWorld* world);
45 
47  virtual ~dgHingeConstraint();
48 // static dgHingeConstraint* Create(dgWorld* world);
49 
50  dgFloat32 m_angle;
51  dgHingeJointAcceleration m_jointAccelFnt;
52 
53 
54 //#ifdef __USE_DOUBLE_PRECISION__
55 // dgUnsigned32 m_reserve[1];
56 //#else
57 // dgUnsigned32 m_reserve[2];
58 //#endif
59 
60  friend class dgWorld;
61 // friend class dgPool<dgHingeConstraint>;
62 };
63 
64 //class dgHingeConstraintArray: public dgPoolContainer<dgHingeConstraint>
65 //{
66 //};
67 
68 
69 #endif // !defined(AFX_DGHINGECONSTRAINT_H__3FF7D7AA_90CC_4BA5_B2A4_D3BA51AD2FFD__INCLUDED_)
70 
Definition: dgVector.h:86
Definition: dgConstraint.h:137
Definition: dgBilateralConstraint.h:28
Definition: dgConstraint.h:85
Definition: dgHingeConstraint.h:32
Definition: dgWorld.h:118
Definition: Newton.h:251