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