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