My Project: dynamics.mod/NewtonDynamics/source/physics/dgSlidingConstraint.h Source File

My Project

dgSlidingConstraint.h
Go to the documentation of this file.
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_H)
23 #define AFX_DGSLIDINGCONSTRAINT_H__3FF7D7AA_90CC_4BA5_B2A4_D3BA51AD2FFD_H
24 #include "dgBilateralConstraint.h"
25
26 //template<class T> class dgPool;
27
28 class dgSlidingConstraint;
29 typedef dgUnsigned32 (dgApi *dgSlidingJointAcceleration) (const dgSlidingConstraint& hinge, dgJointCallbackParam* param);
30
31 class dgSlidingConstraint: public dgBilateralConstraint
32 {
33 public:
34 dgFloat32 GetJointPosit () const;
35 dgFloat32 GetJointVeloc () const;
36 dgVector GetJointForce () const;
37 dgFloat32 CalculateStopAccel (dgFloat32 distance, const dgJointCallbackParam* param) const;
38 void SetJointParameterCallback (dgSlidingJointAcceleration callback);
39
40 private:
41 dgSlidingConstraint();
42 virtual ~dgSlidingConstraint();
43 // virtual void Remove(dgWorld* world);
44
45 virtual dgUnsigned32 JacobianDerivative (dgContraintDescritor& params);
46 // static dgSlidingConstraint* Create(dgWorld* world);
47
48
49 dgFloat32 m_posit;
50 dgSlidingJointAcceleration m_jointAccelFnt;
51
52 //#ifdef _NEWTON_USE_DOUBLE
53 // dgUnsigned32 m_reserve[1];
54 //#else
55 // dgUnsigned32 m_reserve[2];
56 //#endif
57
58 friend class dgWorld;
59 // friend class dgPool<dgSlidingConstraint>;
60 };
61
62 /*
63 class dgSlidingConstraintArray: public dgPoolContainer<dgSlidingConstraint>
64 {
65 };
66 */
67
68 #endif // !defined(AFX_DGSLIDINGCONSTRAINT_H__3FF7D7AA_90CC_4BA5_B2A4_D3BA51AD2FFD_H)
69
dgApi
#define dgApi
Definition: dgTypes.h:263
param
dgJointCallbackParam * param
Definition: dgSlidingConstraint.h:29
dgFloat32
float dgFloat32
Definition: dgTypes.h:233
dgVector
Definition: dgVector.h:639
dgSlidingConstraint::CalculateStopAccel
dgFloat32 CalculateStopAccel(dgFloat32 distance, const dgJointCallbackParam *param) const
Definition: dgSlidingConstraint.cpp:102
dgSlidingConstraint::GetJointVeloc
dgFloat32 GetJointVeloc() const
Definition: dgSlidingConstraint.cpp:86
dgContraintDescritor
Definition: dgConstraint.h:118
dgBilateralConstraint
Definition: dgBilateralConstraint.h:29
dgSlidingConstraint::SetJointParameterCallback
void SetJointParameterCallback(dgSlidingJointAcceleration callback)
Definition: dgSlidingConstraint.cpp:76
dgSlidingConstraint::GetJointForce
dgVector GetJointForce() const
Definition: dgSlidingConstraint.cpp:129
dgJointCallbackParam
Definition: dgConstraint.h:63
dgBilateralConstraint.h
dgUnsigned32
typedef dgUnsigned32(dgApi *dgSlidingJointAcceleration)(const dgSlidingConstraint &hinge
dgSlidingConstraint::GetJointPosit
dgFloat32 GetJointPosit() const
Definition: dgSlidingConstraint.cpp:81
dgUnsigned32
unsigned dgUnsigned32
Definition: dgTypes.h:219
dgSlidingConstraint
Definition: dgSlidingConstraint.h:31
dgWorld
Definition: dgWorld.h:129