| 1 |
/************************************************************************* |
| 2 |
* * |
| 3 |
* Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * |
| 4 |
* All rights reserved. Email: [email protected] Web: www.q12.org * |
| 5 |
* * |
| 6 |
* This library is free software; you can redistribute it and/or * |
| 7 |
* modify it under the terms of EITHER: * |
| 8 |
* (1) The GNU Lesser General Public License as published by the Free * |
| 9 |
* Software Foundation; either version 2.1 of the License, or (at * |
| 10 |
* your option) any later version. The text of the GNU Lesser * |
| 11 |
* General Public License is included with this library in the * |
| 12 |
* file LICENSE.TXT. * |
| 13 |
* (2) The BSD-style license that is included with this library in * |
| 14 |
* the file LICENSE-BSD.TXT. * |
| 15 |
* * |
| 16 |
* This library is distributed in the hope that it will be useful, * |
| 17 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of * |
| 18 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * |
| 19 |
* LICENSE.TXT and LICENSE-BSD.TXT for more details. * |
| 20 |
* * |
| 21 |
*************************************************************************/ |
| 22 |
|
| 23 |
#ifndef _ODE_JOINT_DBALL_H_ |
| 24 |
#define _ODE_JOINT_DBALL_H_ |
| 25 |
|
| 26 |
#include "joint.h" |
| 27 |
|
| 28 |
// ball and socket |
| 29 |
|
| 30 |
struct dxJointDBall : public dxJoint |
| 31 |
{ |
| 32 |
dVector3 anchor1; // anchor w.r.t first body |
| 33 |
dVector3 anchor2; // anchor w.r.t second body |
| 34 |
dReal erp; // error reduction |
| 35 |
dReal cfm; // constraint force mix in |
| 36 |
dReal targetDistance; |
| 37 |
|
| 38 |
void set( int num, dReal value ); |
| 39 |
dReal get( int num ); |
| 40 |
|
| 41 |
void updateTargetDistance(); |
| 42 |
|
| 43 |
dxJointDBall( dxWorld *w ); |
| 44 |
virtual void getSureMaxInfo( SureMaxInfo* info ); |
| 45 |
virtual void getInfo1( Info1* info ); |
| 46 |
virtual void getInfo2( dReal worldFPS, dReal worldERP, |
| 47 |
int rowskip, dReal *J1, dReal *J2, |
| 48 |
int pairskip, dReal *pairRhsCfm, dReal *pairLoHi, |
| 49 |
int *findex ); |
| 50 |
virtual dJointType type() const; |
| 51 |
virtual size_t size() const; |
| 52 |
|
| 53 |
virtual void setRelativeValues(); |
| 54 |
}; |
| 55 |
|
| 56 |
|
| 57 |
#endif |
| 58 |
|