Fixed: Orphaned declaration of dJointAddPUTorque() was replaced with dJointAddPUTorques()
[ode.git] / ode / src / joints / pu.h
blobbe89daea01c1c3a8b067667cc9b343ab8c915d37
1 /*************************************************************************
2 * *
3 * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. *
4 * All rights reserved. Email: russ@q12.org 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 *************************************************************************/
23 #ifndef _ODE_JOINT_PU_H_
24 #define _ODE_JOINT_PU_H_
26 #include "universal.h"
30 /**
31 * Component of a Prismatic -- Universal joint.
32 * The axisP must be perpendicular to axis1.
33 * The second axis of the universal joint is perpendicular to axis1.
35 * Since the PU joint is derived from the Universal joint. Some variable
36 * are reused.
38 * anchor1: Vector from body1 to the anchor point
39 * This vector is calculated when the body are attached or
40 * when the anchor point is set. It is like the offset of the Slider
41 * joint. Since there is a prismatic between the anchor and the body1
42 * the distance might change as the simulation goes on.
43 * anchor2: Vector from body2 to the anchor point.
44 * <PRE>
45 * Body 2
46 * +-------------+
47 * | x |
48 * +------------\+
49 * Prismatic articulation .. ..
50 * | .. ..
51 * Body 1 v .. ..
52 * +--------------+ --| __.. .. anchor2
53 * <--------| x | .....|.......(__) ..
54 * axisP +--------------+ --| ^ <
55 * |----------------------->|
56 * anchor1 |--- Universal articulation
57 * axis1 going out of the plane
58 * axis2 is perpendicular to axis1
59 * (i.e. 2 rotoides)
60 * </PRE>
62 struct dxJointPU : public dxJointUniversal
65 /// @brief Axis for the prismatic articulation w.r.t first body.
66 /// @note This is considered as axis2 from the parameter view
67 dVector3 axisP1;
69 dxJointLimitMotor limotP; ///< limit and motor information for the prismatic articulation.
72 dxJointPU( dxWorld *w );
73 virtual void getSureMaxInfo( SureMaxInfo* info );
74 virtual void getInfo1( Info1* info );
75 virtual void getInfo2( dReal worldFPS, dReal worldERP,
76 int rowskip, dReal *J1, dReal *J2,
77 int pairskip, dReal *pairRhsCfm, dReal *pairLoHi,
78 int *findex );
79 virtual dJointType type() const;
80 virtual sizeint size() const;
83 virtual void setRelativeValues();
87 #endif